JSPM

  • Created
  • Published
  • Downloads 807
  • Score
    100M100P100Q101782F
  • License MIT

Command-line tool for managing Contextium documentation, agents, skills, and workflows — pipe context to AI coding assistants

Package Exports

  • @contextium/cli
  • @contextium/cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@contextium/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Contextium CLI

npm version License: MIT

Command-line tool for managing Contextium — your team's AI knowledge store. Create and manage context libraries, agents, skills, workflows, and tags from the terminal. Pipe your team's documentation directly into Claude, Cursor, Copilot, and any other AI coding assistant.

What is Contextium?

Contextium is a central file system for team knowledge that AI assistants can read directly. Use it to store:

  • Coding standards and style guides your AI should always follow
  • SOPs for onboarding, deployments, incident response
  • AI agent configs — pre-configured assistants with defined roles and skills
  • Workflows — bundles of context that load in one command
  • Tags for organising and searching across all your documentation

The CLI lets you manage all of this from your terminal and pipe content into any AI workflow.

Install

npm install -g @contextium/cli

Or run without installing:

npx @contextium/cli --help

Quick Start

# 1. Authenticate
contextium login

# 2. See your workspaces
contextium workspaces

# 3. List context libraries
contextium libraries -w my-workspace

# 4. Pull all content into your clipboard (pipe to Claude, Cursor, etc.)
contextium cat --all -w my-workspace | pbcopy

# 5. Find a specific file
contextium find "authentication" -w my-workspace

Connect to Claude and Cursor

The CLI pairs with the Contextium MCP server so Claude and Cursor can read your workspace automatically.

Quickest setup:

contextium setup-claude

This writes the MCP config to ~/Library/Application Support/Claude/claude_desktop_config.json for you. Restart Claude Desktop and your team's docs are live in Claude.

Or connect via the hosted remote MCP (no local install needed):

{
  "mcpServers": {
    "contextium": {
      "type": "sse",
      "url": "https://mcp.contextium.io/sse"
    }
  }
}

Commands

Auth

contextium login           # Authenticate with your Contextium account
contextium logout          # Sign out
contextium whoami          # Show current user and workspace

Setup

contextium setup           # Guided interactive setup
contextium init            # Initialise Contextium in current project
contextium setup-claude    # Auto-write Claude Desktop MCP config

Workspaces and Libraries

contextium workspaces                                  # List workspaces
contextium libraries -w <workspace>                    # List context libraries
contextium create-library -w <workspace> -n "Docs"    # Create a library
contextium update-library <libraryId> -n "New Name"   # Rename a library

Files and Content

# List and browse
contextium files <library> -w <workspace>              # List files in a library
contextium structure <library> -w <workspace>          # Show folder tree
contextium cat <fileId> -w <workspace>                 # Read a file
contextium cat --all -w <workspace>                    # Dump all files (pipe to AI)

# Create and edit
contextium new <library> -t "Title" -p path.md -w <workspace>   # Create file
contextium edit <fileId> -c "Updated content" -m "summary"      # Update file
contextium delete <fileId> --confirm                             # Delete (trash)

# Version history
contextium versions <fileId>

# Sync local cache
contextium sync -w <workspace>
contextium status -w <workspace>
contextium search "authentication flow" -w <workspace>   # Full-text search
contextium find "api" -w <workspace>                     # Find files by name/content

Tags

Tags are flat and untyped — a tag is just a #value (no categories, no type:value format). A file is tagged by typing #value inside its content; the tag is reconciled when the file is saved.

# Read-only — tags are content-driven, so there are no create/update/delete commands
contextium tags list -w <workspace>
contextium tags search -w <workspace> --tags authentication
contextium tags file-tags -w <workspace> --file <fileId>

To tag a file, author the tag inline — add a #authentication token to the file's content (e.g. contextium edit-file <id> --content "… #authentication"); the tag is created on save. To untag, remove the token. There are no tags create, tags update, or tags delete commands, and tags apply/apply-bulk/remove are deprecated — tagging is entirely inline.

Agents and Skills

# Agents — AI assistants with defined roles
contextium agents list -w <workspace>
contextium agents create -w <workspace> -n "Code Reviewer"
contextium agents update -w <workspace> --agent <agentId> --name "Reviewer"
contextium agents add-skill -w <workspace> --agent <agentId> --skill <skillId>
contextium agents remove-skill -w <workspace> --agent <agentId> --skill <skillId>

# Skills — reusable knowledge blocks
contextium skills list -w <workspace>
contextium skills create -w <workspace> -n "API Patterns"

Workflows

contextium workflows list -w <workspace>
contextium workflows create -w <workspace> -n "Backend Task"
contextium workflows update -w <workspace> --id <workflowId> --name "Backend Delivery"

# Load a workflow — returns all associated agents, skills, and files
contextium workflow "Backend Task" -w <workspace>

Marketplace

contextium marketplace list                                        # Browse all listings
contextium marketplace list --type skill --category backend        # Filter
contextium marketplace show code-review-assistant                  # View details
contextium marketplace install code-review-assistant -w <workspace> # Install

Global Flags

Flag Description
-w, --workspace <name|slug|id> Workspace selector
-h, --help Show command help
-V, --version Show CLI version

Run contextium <command> --help for command-specific options.

Example Workflows

Pipe team docs into an AI prompt

# Get all docs and copy to clipboard
contextium cat --all -w my-workspace | pbcopy

# Get just a specific library
contextium cat --all -w my-workspace -l coding-standards | pbcopy

# Search and pipe results
contextium search "deployment process" -w my-workspace

Set up a new team member

# Authenticate
contextium login

# See what's available
contextium workspaces
contextium libraries -w acme-corp

# Load the onboarding workflow
contextium workflow "Onboarding" -w acme-corp

Organise docs with tags

# Tag a file by adding #authentication inside its content, then save —
# the tag is created and reconciled from the file content automatically.
contextium edit-file <fileId> --content "… #authentication"

# Find all authentication files
contextium tags search -w my-workspace --tags authentication

License

MIT © Contextium