@cortex-context/cli 0.0.5
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.
- package/LICENSE +21 -0
- package/README.md +98 -0
- package/dist/index.js +28124 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/local/cortex.config.template.yaml +50 -0
- package/dist/templates/local/docker-compose.local.yml +57 -0
- package/dist/templates/rules/copilot-instructions-cortex.md +22 -0
- package/dist/templates/skills/cortex-dimensions/SKILL.md +150 -0
- package/dist/templates/skills/cortex-generate-spec/SKILL.md +265 -0
- package/dist/templates/skills/cortex-ingest/SKILL.md +178 -0
- package/dist/templates/skills/cortex-research/SKILL.md +168 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rodrigo Roldan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# cortex-context CLI
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@cortex-context/cli)
|
|
4
|
+
[](https://github.com/rodrigoroldan/cli-cortex-context/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
|
+
|
|
8
|
+
CLI to initialize and manage [Cortex Context](https://github.com/rodrigoroldan/cortex-context) (Knowledge Graph) tooling in any VS Code workspace.
|
|
9
|
+
|
|
10
|
+
Installs:
|
|
11
|
+
|
|
12
|
+
- **Skills** — VS Code Copilot Agent skills for Cortex (`cortex-research`, `cortex-dimensions`, `cortex-ingest`, `generate-spec`)
|
|
13
|
+
- **MCP Server** — TypeScript stdio server exposing Cortex tools to GitHub Copilot (bundled — no Python needed)
|
|
14
|
+
- **VS Code Config** — Injects `cortex` entry into `.vscode/mcp.json`
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- Node.js 18+
|
|
19
|
+
- A running [Cortex server](https://github.com/rodrigoroldan/cortex-context)
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Install globally
|
|
25
|
+
npm install -g @cortex-context/cli
|
|
26
|
+
|
|
27
|
+
# Or run directly without installing
|
|
28
|
+
npx @cortex-context/cli init
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Initialize Cortex Context in the current workspace
|
|
35
|
+
cortex-context init
|
|
36
|
+
|
|
37
|
+
# Initialize with specific options (non-interactive)
|
|
38
|
+
cortex-context init --url http://localhost:8082 --token <your-token>
|
|
39
|
+
|
|
40
|
+
# Initialize in a specific workspace folder
|
|
41
|
+
cortex-context init --workspace /path/to/your/workspace
|
|
42
|
+
|
|
43
|
+
# Sync Skills/MCP to latest bundled version
|
|
44
|
+
cortex-context sync
|
|
45
|
+
|
|
46
|
+
# Preview what sync would change
|
|
47
|
+
cortex-context sync --dry-run
|
|
48
|
+
|
|
49
|
+
# Validate installation and connectivity
|
|
50
|
+
cortex-context doctor
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## What `init` Does
|
|
54
|
+
|
|
55
|
+
1. Prompts for Cortex server URL and optional API token
|
|
56
|
+
2. Tests connectivity to the Cortex server
|
|
57
|
+
3. Copies Skills into `{workspace}/.github/skills/`
|
|
58
|
+
4. Injects `cortex` entry into `{workspace}/.vscode/mcp.json` (uses `npx @cortex-context/cli mcp-serve`)
|
|
59
|
+
5. Saves configuration to `~/.cortex-context/config.json`
|
|
60
|
+
|
|
61
|
+
## After Init
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Reload VS Code (Cmd/Ctrl+Shift+P → "Reload Window")
|
|
65
|
+
# Then run doctor to verify:
|
|
66
|
+
cortex-context doctor
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Commands
|
|
70
|
+
|
|
71
|
+
| Command | Description |
|
|
72
|
+
| ------------------------------- | ------------------------------------------------ |
|
|
73
|
+
| `cortex-context init` | Full interactive setup |
|
|
74
|
+
| `cortex-context sync` | Update Skills + MCP to latest bundled version |
|
|
75
|
+
| `cortex-context sync --dry-run` | Preview sync changes |
|
|
76
|
+
| `cortex-context doctor` | Validate installation + test Cortex connectivity |
|
|
77
|
+
|
|
78
|
+
## Options (init)
|
|
79
|
+
|
|
80
|
+
| Flag | Description |
|
|
81
|
+
| --------------- | ------------------------------------ |
|
|
82
|
+
| `--url <url>` | Cortex server URL (skips prompt) |
|
|
83
|
+
| `--token <tok>` | API token (skips prompt) |
|
|
84
|
+
| `--workspace` | Target workspace path (default: cwd) |
|
|
85
|
+
| `--skip-mcp` | Don't install MCP server |
|
|
86
|
+
| `--skip-skills` | Don't install Skills |
|
|
87
|
+
| `--force` | Overwrite existing files |
|
|
88
|
+
|
|
89
|
+
## Contributing
|
|
90
|
+
|
|
91
|
+
Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.
|
|
92
|
+
|
|
93
|
+
Found a bug? [Open a bug report](https://github.com/rodrigoroldan/cli-cortex-context/issues/new?template=bug_report.yml).
|
|
94
|
+
Have an idea? [Open a feature request](https://github.com/rodrigoroldan/cli-cortex-context/issues/new?template=feature_request.yml).
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|