Skip to main content

Installation

Python (pip)

# Basic installation
pip install cognitive-modules

# With OpenAI support
pip install cognitive-modules[openai]

# With Anthropic support
pip install cognitive-modules[anthropic]

# All LLM support
pip install cognitive-modules[all]

Node.js (npm)

# Global installation
npm install -g cogn

# Or use npx for zero-install (recommended)
npx cogn --help

Command Reference

PlatformPackageCommand
pipcognitive-modulescogn
npmcogncog

Verify Installation

cog --version
# Output: Cognitive Runtime v1.3.0

cog doctor

cogn doctor / cog doctor displays environment status:

Cognitive Modules - Environment Check

LLM Providers
┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Provider ┃ Installed ┃ Configured ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ openai │ ✓ │ ✓ │
│ anthropic │ ✗ │ – │
│ minimax │ ✓ │ – │
│ ollama │ ✗ │ – │
└───────────┴───────────┴────────────┘

Installed Modules: 5

Installing Modules

After installing the CLI, you can add modules from GitHub:

# Install module from GitHub (recommended)
cogn add ziel-io/cognitive-modules -m code-simplifier

# Install specific version
cogn add ziel-io/cognitive-modules -m code-reviewer --tag v1.0.0

# List installed modules
cogn list

Version Management

# Update module to latest version
cogn update code-simplifier # or cog update

# Update to specific version
cogn update code-simplifier --tag v2.0.0

# List available versions
cogn versions ziel-io/cognitive-modules

# Remove module
cogn remove code-simplifier

Module Locations

Modules are loaded from these locations in priority order:

  1. ./cognitive/modules/ - Project local
  2. ~/.cognitive/modules/ - User global (cogn add / cog add installation location)
  3. Built-in package modules

Other Installation Methods

# Git repository
cogn install github:user/repo/path/to/module

# Public registry
cogn install registry:module-name

# Local path
cogn install ./path/to/module

Install from Source

git clone https://github.com/ziel-io/cognitive-modules.git
cd cognitive-modules

# Install dev dependencies
pip install ".[dev]"

# Run tests
pytest tests/ -v

Next Steps