CLI Command Reference
Complete reference for all Contextium CLI commands, flags, and options.
This reference lists every command available in the Contextium CLI. For installation and getting started, see Using CLI.
Command structure
Commands follow this pattern:
contextium <command> [arguments] [options]
All workspace-scoped commands accept -w or --workspace followed by a workspace name, slug, or UUID.
Authentication commands
| Command | Description |
|---|---|
contextium login | Authenticate with your Contextium account (opens browser) |
contextium login --api-key YOUR_API_KEY | Authenticate using an API key directly |
contextium logout | Sign out and remove saved credentials |
contextium whoami | Display the currently authenticated account and workspace |
Setup commands
| Command | Description |
|---|---|
contextium setup | Run the interactive setup wizard — auth, workspace selection, and Claude Code permissions |
contextium init | Initialise Contextium config in the current directory |
contextium setup-claude | Grant Claude Code permission to use the Contextium CLI and MCP tools |
Workspace commands
| Command | Description |
|---|---|
contextium workspaces | List all workspaces you have access to |
Library commands
Context libraries are containers for your documentation files.
| Command | Description |
|---|---|
contextium libraries -w <workspace> | List all context libraries in a workspace |
contextium create-library -w <workspace> -n "Name" | Create a new context library |
contextium update-library <id> -w <workspace> | Update a context library's name or description |
contextium structure <library> -w <workspace> | Show the folder and file tree of a library |
File commands
| Command | Description |
|---|---|
contextium files <libraryId> -w <workspace> | List all files in a context library |
contextium new <library> -t "Title" -p "path.md" -w <workspace> | Create a new file in a library |
contextium new <library> -t "Title" -p "path.md" --stdin -w <workspace> | Create a file with content piped from stdin |
contextium edit <fileId> -c "content" -m "edit message" | Update a file's content |
contextium delete <fileId> --confirm | Delete a file |
contextium find "<query>" -w <workspace> | Search for files by name across all libraries |
contextium versions <fileId> | Show version history for a file |
Content commands
| Command | Description |
|---|---|
contextium cat --all -w <workspace> | Output all file contents from the workspace |
contextium cat <fileId> | Output the content of a specific file |
contextium search "<query>" -w <workspace> | Full-text search across all files in the workspace |
contextium sync -w <workspace> | Download and cache all files from the workspace locally |
contextium status -w <workspace> | Show sync status — which files are up to date, outdated, or not cached |
Workflow commands
Workflows bundle libraries, agents, and skills together for quick loading into an AI session.
| Command | Description |
|---|---|
contextium workflows list -w <workspace> | List all workflows in a workspace |
contextium workflows create -w <workspace> | Create a new workflow |
contextium workflow "<name>" -w <workspace> | Load a workflow, display its resources, and show active tasks |
contextium workflow "<name>" -w <workspace> --sync | Load a workflow and download all its files to local cache |
contextium workflow "<name>" -w <workspace> --activity | Load a workflow and show activity since last session |
Tasks commands
Manage per-workflow and workspace-level tasks. Tasks are automatically shown when loading a workflow.
| Command | Description |
|---|---|
contextium tasks list -w <workspace> --workflow "<name>" | List tasks for a workflow (yours + unassigned by default) |
contextium tasks list -w <workspace> --workflow "<name>" --all | List all tasks for a workflow regardless of assignee |
contextium tasks list -w <workspace> | List workspace-level tasks |
contextium tasks mine -w <workspace> | List tasks assigned to you across all workflows |
contextium tasks add -w <workspace> -t "Title" | Add a workspace-level task |
contextium tasks add -w <workspace> --workflow "<name>" -t "Title" | Add a task to a workflow |
contextium tasks add ... -d "Description" --due YYYY-MM-DD --assign "Name" | Add a task with description, due date, and assignee |
contextium tasks status -w <workspace> --id <taskId> --set <status> | Update task status (not_started, in_progress, done, dismissed) |
contextium tasks done -w <workspace> --id <taskId> | Mark a task as done (shorthand) |
contextium tasks assign -w <workspace> --id <taskId> --to "Name" | Assign a task to a workspace member |
contextium tasks assign -w <workspace> --id <taskId> --to none | Unassign a task |
Filter options for tasks list:
| Option | Description |
|---|---|
--status <status> | Filter by status: not_started, in_progress, done, dismissed |
--all | Show all tasks, not just yours and unassigned |
--format json | Output as JSON |
Ruleset commands
Rulesets hold the standards your agents follow. See Creating your first ruleset.
| Command | Description |
|---|---|
contextium rulesets list -w <workspace> | List rulesets, with rule counts and how many workflows use each |
contextium rulesets get -w <workspace> -r <ruleset> | Show one ruleset and all of its rules |
contextium rulesets in-effect -w <workspace> --workflow <workflow> | Every rule applying to a workflow, and where each came from |
contextium rulesets attach -w <workspace> -r <ruleset> --workflow <workflow> | Attach a ruleset to a workflow |
contextium rulesets detach -w <workspace> -r <ruleset> --workflow <workflow> | Detach a ruleset from a workflow |
-r and --workflow accept a name or a UUID.
in-effect is the one to reach for when an agent behaves unexpectedly. It combines the workspace baseline with the workflow's attached rulesets and also reports what is not applying — duplicates, rules replaced by a more specific one, archived rulesets, and anything held back by permissions.
The baseline cannot be attached or detached; it applies to every workflow automatically.
Agent commands
| Command | Description |
|---|---|
contextium agents list -w <workspace> | List all agents in a workspace |
contextium agents create -w <workspace> -n "Name" | Create a new agent |
contextium agents add-skill -w <workspace> | Attach a skill to an agent |
contextium agents remove-skill -w <workspace> | Remove a skill from an agent |
Skill commands
| Command | Description |
|---|---|
contextium skills list -w <workspace> | List all skills in a workspace |
contextium skills create -w <workspace> -n "Name" | Create a new skill with auto-generated YAML frontmatter |
contextium skills create -w <workspace> -n "Name" -d "Description" | Create a skill with a specific description |
Skills are created with YAML frontmatter by default:
--- name: skill-name description: Provides [what this skill does]. Use when [trigger context]. ---
The description field should be written in third person — describe what knowledge the skill provides and when an AI agent should load it. Example: "Provides the company refund and returns policy. Use when handling customer queries about refunds or exchanges."
Tag commands
Tags are flat and untyped. A tag exists only as a #value token inside a file's content, and Contextium reconciles a file's tags from its body when the file is saved.
| Command | Description |
|---|---|
contextium tags list -w <workspace> | List all tags in a workspace |
contextium tags search "<query>" -w <workspace> | Search files by tags |
contextium tags file-tags <fileId> -w <workspace> | List tags applied to a specific file |
Tags are entirely content-driven — these are read-only commands. There is no tags create, tags update, or tags delete: a tag exists only while some file's content contains its #value, and it appears/disappears as files are edited. Tag a file by adding a #value token to its content (e.g. contextium edit-file <id> --content "… #urgent"); Contextium auto-creates the tag on save and reconciles a file's tags from its body. To untag, remove that token. contextium tags apply, tags apply-bulk, and tags remove are deprecated — they print guidance to author tags inline rather than applying or removing them.
Team commands
| Command | Description |
|---|---|
contextium notify <resourceType> <resourceId> "<name>" -w <workspace> | Notify team members about a resource |
contextium notify file <id> "<name>" --to "Sarah, Tom" | Notify specific members by name |
contextium notify file <id> "<name>" --email "[email protected]" | Notify by email |
contextium notify file <id> "<name>" -m "Please review" | Include a custom message |
Resource types: file, workflow, agent, library
Targeting options:
| Option | Description |
|---|---|
--to <names> | Comma-separated member names (default: everyone in the workspace) |
--email <emails> | Comma-separated email addresses |
--member-id <ids> | Comma-separated member IDs |
-m, --message <message> | Custom message to include in the notification |
If a name matches more than one member, the command fails and lists all matches — re-run with --email to be precise. Notifications respect each member's preferences and Do Not Disturb settings.
Marketplace commands
| Command | Description |
|---|---|
contextium marketplace list --query "<description>" | Browse marketplace listings by description |
contextium marketplace show <slug> | View full details of a marketplace listing |
contextium marketplace install <slug> -w <workspace> | Install a marketplace listing into your workspace |
Global options
These options are available on all commands:
| Option | Description |
|---|---|
-w, --workspace <name|slug|UUID> | Specify the workspace |
--json | Output results in JSON format |
--verbose | Show detailed output and request information |
--help | Display help for a command |
--version | Display the CLI version |
Claude Code slash commands (/ium:)
When the Contextium CLI or MCP server is connected inside Claude Code, a set of /ium: slash commands become available. These commands orchestrate multi-step Contextium workflows directly from the Claude Code chat window — no terminal required.
Getting started
| Command | Description |
|---|---|
/ium:code-audit | Audit an existing codebase for quality and risk — security observations, tech debt, fragile/high-risk areas, test-coverage gaps, and dependency risks — and write a severity-rated audit report to a Contextium library. Use /ium:map-existing instead when you want to document structure and plan a Contextium migration. |
/ium:new-project | Set up a new Contextium project from scratch — walks you through workspace selection, then intelligently suggests and creates context libraries, agents, skills, tags, and a workflow based on your project description. Optionally creates a project state document to track phases, locked decisions, and session handoffs. |
/ium:resume-project | Resume a project from a previous session — loads the workflow, reads the project state document, surfaces locked decisions, and briefs you on exactly where work stopped so you can continue without losing context. |
/ium:help | Display all available /ium: commands with descriptions. |
Workspace
| Command | Description |
|---|---|
/ium:workspace | Switch the active Contextium workspace with full context handoff — saves a note of what you were working on before leaving, then checks for a previous handoff note when arriving at the new workspace. |
/ium:sync | Refresh the local Contextium cache from the current workspace so Claude has access to the latest files. |
/ium:status | Show a health dashboard — auth status, active workspace, cache state, and available libraries, agents, and skills. |
Content
| Command | Description |
|---|---|
/ium:new | Create a new file in a Contextium context library with guided prompts. Always writes complete content — never a placeholder. |
/ium:create | Interactively create an agent, skill, or workflow in the current workspace. |
/ium:search | Search across workspace documentation by query, filename, or tag. Respects loaded workflow scope — asks before expanding to the full workspace. |
/ium:workflow | Load a Contextium workflow and sync its libraries, agents, and skills into the session context for immediate use. |
Marketplace
| Command | Description |
|---|---|
/ium:marketplace | Browse, install, or publish skills, agents, and MCP servers on the Contextium Marketplace. Describe what you need in natural language — it finds the best matches and checks what you already have before suggesting installs. |
Maintenance
| Command | Description |
|---|---|
/ium:update | Check for updates to @contextium/cli and @contextium/mcp-server, show installed vs latest versions, and update globally if confirmed. |
Project state tracking
When you use /ium:new-project with the project planner option, Contextium creates a project-state.md document in your context library. This document tracks:
- Current position — which phase you're on and what the next action is
- Phases — each phase with its status (Not Started, In Progress, Complete)
- Already built — capabilities confirmed by a codebase scan, so they don't get replanned
- Decisions log — locked architectural and technical decisions with rationale, so sessions don't re-debate settled choices
- Seeds — ideas to revisit at a future milestone, with trigger conditions
All project state is stored in Contextium — not locally — so it's available from any machine, survives context resets, and can be shared with your team. Running /ium:resume-project in a new session loads this document and restores full context.