Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@cogita/cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cogita/cli

Command line interface for creating and managing Cogita blogs.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

@cogita/cli

npm version Node.js

中文 | English

Command line interface for creating and managing Cogita blogs.

What is it?

@cogita/cli provides a simple yet powerful set of commands to create, develop, and build Cogita blog projects. Get started in seconds with built-in templates and development tools.

Installation

# Using pnpm
pnpm add -g @cogita/cli

# Using npm
npm install -g @cogita/cli

# Using yarn
yarn global add @cogita/cli

Use without Installation

npx @cogita/cli --help

Quick Start

Create a New Blog

# Interactive creation
cogita create

# Create with name
cogita create my-blog

# Create with template
cogita create my-blog --template minimal

Development

# Start development server
cogita dev

# Custom port and host  
cogita dev --port 8080 --host 0.0.0.0

Build & Deploy

# Build for production
cogita build

# Build to custom directory
cogita build --outDir dist

# Preview build result
cogita preview

Available Commands

cogita create [name]

Create a new Cogita blog project.

Options:

  • -t, --template <name> - Template to use (default: "basic")
  • -p, --package-manager <pm> - Package manager (npm|yarn|pnpm)
  • --no-git - Skip Git initialization
  • --no-install - Skip dependency installation
  • -f, --force - Overwrite existing directory

Templates:

  • basic - Full-featured blog template (default)
  • minimal - Minimal setup with essential features
  • tech - Developer-focused template with code highlighting
  • personal - Personal blog template with social integration

cogita dev

Start development server with hot reload.

Options:

  • -p, --port <port> - Port number (default: 3000)
  • -h, --host <host> - Host address (default: "localhost")
  • --open - Open browser automatically (default: true)
  • --debug - Enable debug mode

cogita build

Build static site for production.

Options:

  • -o, --outDir <dir> - Output directory (default: "dist")
  • --base <base> - Base path for deployment
  • --clean - Clean output directory before build
  • --analyze - Analyze build output

cogita preview

Preview the built site locally.

Options:

  • -p, --port <port> - Port number (default: 4173)
  • --open - Open browser automatically

Example Workflows

Basic Blog Setup

# Create and start developing
cogita create my-blog
cd my-blog
cogita dev

Deploy to GitHub Pages

# Build with correct base path
cogita build --base /my-blog/

# The built files are ready for GitHub Pages

Custom Development

# Use different port and enable debug
cogita dev --port 8080 --debug

# Build and analyze output
cogita build --analyze

Project Templates

Basic Template

Full-featured blog with:

  • Lucid theme pre-configured
  • Example posts and pages
  • Social links setup
  • SEO optimizations

Minimal Template

Lightweight setup with:

  • Essential configuration only
  • Single example post
  • Clean starting point

Tech Template

Developer-oriented with:

  • Code syntax highlighting
  • Technical blog layout
  • GitHub integration
  • Developer-friendly defaults

Personal Template

Personal branding focus:

  • Social media integration
  • About page template
  • Portfolio sections
  • Personal blog styling

Configuration

CLI Configuration

Create .cogitarc.json in your project:

{
  "defaultTemplate": "tech",
  "packageManager": "pnpm",
  "devServer": {
    "port": 3000,
    "open": true
  }
}

Environment Variables

export COGITA_PACKAGE_MANAGER=pnpm
export COGITA_DEFAULT_TEMPLATE=minimal
export COGITA_DEBUG=true

Troubleshooting

Port Already in Use

# Use different port
cogita dev --port 3001

# Auto-select available port
cogita dev --port auto

Build Issues

# Clean build
cogita build --clean

# Debug build
cogita build --debug

Template Issues

# Force recreate
cogita create my-blog --force

# Skip automatic installation
cogita create my-blog --no-install

Learn More

License

MIT © wu9o

Keywords

cogita

FAQs

Package last updated on 04 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts