@contextium/cli 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +193 -84
  2. package/package.json +5 -1
package/README.md CHANGED
@@ -1,14 +1,29 @@
1
1
  # Contextium CLI
2
2
 
3
- CLI for managing Contextium workspaces, context libraries, files, workflows, agents, skills, tags, and marketplace installs.
3
+ [![npm version](https://img.shields.io/npm/v/@contextium/cli.svg)](https://www.npmjs.com/package/@contextium/cli)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ 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.
7
+
8
+ ## What is Contextium?
9
+
10
+ Contextium is a central file system for team knowledge that AI assistants can read directly. Use it to store:
11
+
12
+ - **Coding standards** and style guides your AI should always follow
13
+ - **SOPs** for onboarding, deployments, incident response
14
+ - **AI agent configs** — pre-configured assistants with defined roles and skills
15
+ - **Workflows** — bundles of context that load in one command
16
+ - **Tags** for organising and searching across all your documentation
17
+
18
+ The CLI lets you manage all of this from your terminal and pipe content into any AI workflow.
4
19
 
5
20
  ## Install
6
21
 
7
22
  ```bash
8
- npm i -g @contextium/cli
23
+ npm install -g @contextium/cli
9
24
  ```
10
25
 
11
- Or run without installing globally:
26
+ Or run without installing:
12
27
 
13
28
  ```bash
14
29
  npx @contextium/cli --help
@@ -17,133 +32,227 @@ npx @contextium/cli --help
17
32
  ## Quick Start
18
33
 
19
34
  ```bash
20
- # 1) Sign in
35
+ # 1. Authenticate
21
36
  contextium login
22
37
 
23
- # 2) Optional guided setup
24
- contextium setup
25
-
26
- # 3) See your workspaces
38
+ # 2. See your workspaces
27
39
  contextium workspaces
28
40
 
29
- # 4) List context libraries in a workspace
41
+ # 3. List context libraries
30
42
  contextium libraries -w my-workspace
31
43
 
32
- # 5) Find and read files
33
- contextium find auth -w my-workspace
34
- contextium cat README.md -w my-workspace
44
+ # 4. Pull all content into your clipboard (pipe to Claude, Cursor, etc.)
45
+ contextium cat --all -w my-workspace | pbcopy
46
+
47
+ # 5. Find a specific file
48
+ contextium find "authentication" -w my-workspace
35
49
  ```
36
50
 
37
- ## Command Groups
51
+ ## Connect to Claude and Cursor
52
+
53
+ The CLI pairs with the [Contextium MCP server](https://www.npmjs.com/package/@contextium/mcp-server) so Claude and Cursor can read your workspace automatically.
54
+
55
+ **Quickest setup:**
56
+
57
+ ```bash
58
+ contextium setup-claude
59
+ ```
60
+
61
+ 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.
62
+
63
+ Or connect via the hosted remote MCP (no local install needed):
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "contextium": {
69
+ "type": "sse",
70
+ "url": "https://mcp.contextium.io/sse"
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## Commands
38
77
 
39
78
  ### Auth
40
79
 
41
- - `contextium login`
42
- - `contextium logout`
43
- - `contextium whoami`
80
+ ```bash
81
+ contextium login # Authenticate with your Contextium account
82
+ contextium logout # Sign out
83
+ contextium whoami # Show current user and workspace
84
+ ```
44
85
 
45
86
  ### Setup
46
87
 
47
- - `contextium setup`
48
- - `contextium init`
49
- - `contextium setup-claude`
88
+ ```bash
89
+ contextium setup # Guided interactive setup
90
+ contextium init # Initialise Contextium in current project
91
+ contextium setup-claude # Auto-write Claude Desktop MCP config
92
+ ```
50
93
 
51
- ### Workspace and Libraries
94
+ ### Workspaces and Libraries
52
95
 
53
- - `contextium workspaces`
54
- - `contextium libraries -w <workspace>`
55
- - `contextium create-library -w <workspace> -n "Docs"`
56
- - `contextium update-library <libraryId> -n "New Name"`
96
+ ```bash
97
+ contextium workspaces # List workspaces
98
+ contextium libraries -w <workspace> # List context libraries
99
+ contextium create-library -w <workspace> -n "Docs" # Create a library
100
+ contextium update-library <libraryId> -n "New Name" # Rename a library
101
+ ```
57
102
 
58
103
  ### Files and Content
59
104
 
60
- - `contextium files <library> -w <workspace>`
61
- - `contextium new <library> -t "Guide" -p guide.md -w <workspace>`
62
- - `contextium edit <fileId> -c "Updated content" -m "Update summary"`
63
- - `contextium delete <fileId> --confirm`
64
- - `contextium versions <fileId>`
65
- - `contextium structure <library> -w <workspace>`
66
- - `contextium cat --all -w <workspace>`
67
- - `contextium sync -w <workspace>`
68
- - `contextium status -w <workspace>`
105
+ ```bash
106
+ # List and browse
107
+ contextium files <library> -w <workspace> # List files in a library
108
+ contextium structure <library> -w <workspace> # Show folder tree
109
+ contextium cat <fileId> -w <workspace> # Read a file
110
+ contextium cat --all -w <workspace> # Dump all files (pipe to AI)
111
+
112
+ # Create and edit
113
+ contextium new <library> -t "Title" -p path.md -w <workspace> # Create file
114
+ contextium edit <fileId> -c "Updated content" -m "summary" # Update file
115
+ contextium delete <fileId> --confirm # Delete (trash)
116
+
117
+ # Version history
118
+ contextium versions <fileId>
119
+
120
+ # Sync local cache
121
+ contextium sync -w <workspace>
122
+ contextium status -w <workspace>
123
+ ```
69
124
 
70
125
  ### Search
71
126
 
72
- - `contextium search "authentication" -w <workspace>`
73
- - `contextium find "api" -w <workspace>`
127
+ ```bash
128
+ contextium search "authentication flow" -w <workspace> # Full-text search
129
+ contextium find "api" -w <workspace> # Find files by name/content
130
+ ```
74
131
 
75
132
  ### Tags
76
133
 
77
- - `contextium tags types -w <workspace>`
78
- - `contextium tags create-type -w <workspace> -n "Topic"`
79
- - `contextium tags list -w <workspace>`
80
- - `contextium tags create -w <workspace> --type <typeId> --value authentication`
81
- - `contextium tags apply -w <workspace> --tag topic:authentication --file <fileId>`
82
- - `contextium tags apply-bulk -w <workspace> --tag <tagId> --files <file1,file2>`
83
- - `contextium tags remove -w <workspace> --tag <tagId> --file <fileId>`
84
- - `contextium tags search -w <workspace> --tags topic:authentication`
85
- - `contextium tags file-tags -w <workspace> --file <fileId>`
86
- - `contextium tags update -w <workspace> --tag <tagId> --value auth`
87
- - `contextium tags type-get -w <workspace> --type <typeId>`
88
- - `contextium tags type-update -w <workspace> --type <typeId> --name "Topic"`
134
+ ```bash
135
+ # Tag types (categories)
136
+ contextium tags types -w <workspace>
137
+ contextium tags create-type -w <workspace> -n "Topic"
138
+ contextium tags type-get -w <workspace> --type <typeId>
139
+ contextium tags type-update -w <workspace> --type <typeId> --name "Topic"
140
+
141
+ # Tags
142
+ contextium tags list -w <workspace>
143
+ contextium tags create -w <workspace> --type <typeId> --value authentication
144
+ contextium tags update -w <workspace> --tag <tagId> --value auth
145
+
146
+ # Apply / remove
147
+ contextium tags apply -w <workspace> --tag topic:authentication --file <fileId>
148
+ contextium tags apply-bulk -w <workspace> --tag <tagId> --files <file1,file2>
149
+ contextium tags remove -w <workspace> --tag <tagId> --file <fileId>
150
+
151
+ # Search by tags
152
+ contextium tags search -w <workspace> --tags topic:authentication
153
+ contextium tags file-tags -w <workspace> --file <fileId>
154
+ ```
89
155
 
90
156
  ### Agents and Skills
91
157
 
92
- - `contextium agents list -w <workspace>`
93
- - `contextium agents create -w <workspace> -n "Code Reviewer"`
94
- - `contextium agents add-skill -w <workspace> --agent <agentId> --skill <skillId>`
95
- - `contextium agents remove-skill -w <workspace> --agent <agentId> --skill <skillId>`
96
- - `contextium agents update -w <workspace> --agent <agentId> --name "Reviewer"`
97
- - `contextium skills list -w <workspace>`
98
- - `contextium skills create -w <workspace> -n "API Patterns"`
158
+ ```bash
159
+ # Agents AI assistants with defined roles
160
+ contextium agents list -w <workspace>
161
+ contextium agents create -w <workspace> -n "Code Reviewer"
162
+ contextium agents update -w <workspace> --agent <agentId> --name "Reviewer"
163
+ contextium agents add-skill -w <workspace> --agent <agentId> --skill <skillId>
164
+ contextium agents remove-skill -w <workspace> --agent <agentId> --skill <skillId>
165
+
166
+ # Skills — reusable knowledge blocks
167
+ contextium skills list -w <workspace>
168
+ contextium skills create -w <workspace> -n "API Patterns"
169
+ ```
99
170
 
100
171
  ### Workflows
101
172
 
102
- - `contextium workflows list -w <workspace>`
103
- - `contextium workflows create -w <workspace> -n "Backend Task"`
104
- - `contextium workflows update -w <workspace> --id <workflowId> --name "Backend Delivery"`
105
- - `contextium workflow "Backend Task" -w <workspace>`
173
+ ```bash
174
+ contextium workflows list -w <workspace>
175
+ contextium workflows create -w <workspace> -n "Backend Task"
176
+ contextium workflows update -w <workspace> --id <workflowId> --name "Backend Delivery"
177
+
178
+ # Load a workflow — returns all associated agents, skills, and files
179
+ contextium workflow "Backend Task" -w <workspace>
180
+ ```
106
181
 
107
182
  ### Marketplace
108
183
 
109
- - `contextium marketplace list`
110
- - `contextium marketplace list --type skill --category backend`
111
- - `contextium marketplace show code-review-assistant`
112
- - `contextium marketplace install code-review-assistant -w <workspace>`
184
+ ```bash
185
+ contextium marketplace list # Browse all listings
186
+ contextium marketplace list --type skill --category backend # Filter
187
+ contextium marketplace show code-review-assistant # View details
188
+ contextium marketplace install code-review-assistant -w <workspace> # Install
189
+ ```
113
190
 
114
191
  ## Global Flags
115
192
 
116
- - `-w, --workspace <name|slug|id>`: workspace selector for workspace-scoped commands
117
- - `-h, --help`: show command help
118
- - `-V, --version`: show CLI version
193
+ | Flag | Description |
194
+ |------|-------------|
195
+ | `-w, --workspace <name\|slug\|id>` | Workspace selector |
196
+ | `-h, --help` | Show command help |
197
+ | `-V, --version` | Show CLI version |
119
198
 
120
- Run `contextium <command> --help` for command-specific flags.
199
+ Run `contextium <command> --help` for command-specific options.
121
200
 
122
- ## Typical Workflow
201
+ ## Example Workflows
123
202
 
124
- ```bash
125
- # Authenticate and inspect available resources
126
- contextium login
127
- contextium workspaces
128
- contextium libraries -w my-workspace
203
+ ### Pipe team docs into an AI prompt
129
204
 
130
- # Pull context into your AI workflow
205
+ ```bash
206
+ # Get all docs and copy to clipboard
131
207
  contextium cat --all -w my-workspace | pbcopy
132
208
 
133
- # Create and evolve content
134
- contextium new my-library -t "Runbook" -p runbook.md -w my-workspace
135
- contextium edit <fileId> -c "Updated runbook content" -m "refresh steps"
209
+ # Get just a specific library
210
+ contextium cat --all -w my-workspace -l coding-standards | pbcopy
211
+
212
+ # Search and pipe results
213
+ contextium search "deployment process" -w my-workspace
214
+ ```
215
+
216
+ ### Set up a new team member
217
+
218
+ ```bash
219
+ # Authenticate
220
+ contextium login
221
+
222
+ # See what's available
223
+ contextium workspaces
224
+ contextium libraries -w acme-corp
136
225
 
137
- # Organize with tags
138
- contextium tags create-type -w my-workspace -n "Topic"
139
- contextium tags create -w my-workspace --type <typeId> --value reliability
140
- contextium tags apply -w my-workspace --tag topic:reliability --file <fileId>
226
+ # Load the onboarding workflow
227
+ contextium workflow "Onboarding" -w acme-corp
141
228
  ```
142
229
 
143
- ## Development
230
+ ### Organise docs with tags
144
231
 
145
232
  ```bash
146
- npm run build
147
- npm run dev
148
- npm run type-check
233
+ # Create a tag type
234
+ contextium tags create-type -w my-workspace -n "Topic" --slug topic
235
+
236
+ # Create tags
237
+ contextium tags create -w my-workspace --type <typeId> --value authentication
238
+ contextium tags create -w my-workspace --type <typeId> --value deployment
239
+
240
+ # Tag files
241
+ contextium tags apply -w my-workspace --tag topic:authentication --file <fileId>
242
+
243
+ # Find all authentication files
244
+ contextium tags search -w my-workspace --tags topic:authentication
149
245
  ```
246
+
247
+ ## Links
248
+
249
+ - **Website**: https://contextium.io
250
+ - **Documentation**: https://contextium.io/docs/cli
251
+ - **MCP Server**: https://www.npmjs.com/package/@contextium/mcp-server
252
+ - **Remote MCP**: https://mcp.contextium.io
253
+ - **GitHub**: https://github.com/tomjutla/contextium
254
+ - **Support**: support@contextium.io
255
+
256
+ ## License
257
+
258
+ MIT © Contextium
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextium/cli",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Command-line tool for managing Contextium documentation, agents, skills, and workflows — pipe context to AI coding assistants",
5
5
  "keywords": [
6
6
  "contextium",
@@ -23,6 +23,10 @@
23
23
  ],
24
24
  "author": "Contextium",
25
25
  "license": "MIT",
26
+ "funding": {
27
+ "type": "commercial",
28
+ "url": "https://contextium.io/pricing"
29
+ },
26
30
  "repository": {
27
31
  "type": "git",
28
32
  "url": "git+https://github.com/tomjutla/contextium.git",