@contextforge/cli 0.1.8 → 0.1.10
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/README.md +252 -0
- package/dist/index.js +1 -1
- package/package.json +27 -3
package/README.md
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# ContextForge CLI
|
|
2
|
+
|
|
3
|
+
Website: https://contextforge.org
|
|
4
|
+
|
|
5
|
+
ContextForge is a registry-powered CLI that installs curated AI-agent instruction packs into existing codebases.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @contextforge/cli init
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What Is ContextForge?
|
|
12
|
+
|
|
13
|
+
ContextForge makes any repo AI-agent ready.
|
|
14
|
+
|
|
15
|
+
AI coding agents are powerful, but most repositories do not clearly tell them how to work. Agents may guess the architecture, skip verification, add unnecessary dependencies, mishandle Git operations, or ignore project conventions.
|
|
16
|
+
|
|
17
|
+
ContextForge fixes this by installing repo-level instruction packs that guide agent behavior.
|
|
18
|
+
|
|
19
|
+
It is not an MCP gateway, tool proxy, API gateway, or replacement for skills.sh. It is a repo-level AI-agent instruction installer.
|
|
20
|
+
|
|
21
|
+
## How It Works
|
|
22
|
+
|
|
23
|
+
```txt
|
|
24
|
+
Remote registry
|
|
25
|
+
https://registry.contextforge.org/index.json
|
|
26
|
+
|
|
|
27
|
+
v
|
|
28
|
+
ContextForge CLI
|
|
29
|
+
npx @contextforge/cli init
|
|
30
|
+
|
|
|
31
|
+
v
|
|
32
|
+
User repo
|
|
33
|
+
.contextforge/
|
|
34
|
+
config.json
|
|
35
|
+
lock.json
|
|
36
|
+
agents/
|
|
37
|
+
skills/
|
|
38
|
+
|
|
|
39
|
+
v
|
|
40
|
+
Tiny root pointers
|
|
41
|
+
AGENTS.md
|
|
42
|
+
CLAUDE.md
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
ContextForge fetches packs from the official registry, writes useful instructions under `.contextforge`, and creates tiny root pointer files for supported agents.
|
|
46
|
+
|
|
47
|
+
Root files stay small. Full prompt and instruction content lives inside `.contextforge`.
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
Run this inside an existing project:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx @contextforge/cli init
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Then choose which AI tool to configure:
|
|
58
|
+
|
|
59
|
+
```txt
|
|
60
|
+
All agents
|
|
61
|
+
Codex only
|
|
62
|
+
Claude Code only
|
|
63
|
+
Cursor only
|
|
64
|
+
GitHub Copilot only
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Add a pack:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx @contextforge/cli add supabase
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Sync installed packs:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx @contextforge/cli sync
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Check health:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx @contextforge/cli doctor
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
List registry packs:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npx @contextforge/cli list
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Search packs:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npx @contextforge/cli search react
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Commands
|
|
98
|
+
|
|
99
|
+
### init
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npx @contextforge/cli init
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
First setup. Detects the project stack, installs mandatory core packs, installs detected stack packs, writes `.contextforge`, and creates root pointer files.
|
|
106
|
+
|
|
107
|
+
### add
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npx @contextforge/cli add <pack>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Installs one extra pack from the registry.
|
|
114
|
+
|
|
115
|
+
Examples:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npx @contextforge/cli add supabase
|
|
119
|
+
npx @contextforge/cli add nextjs-best-practices
|
|
120
|
+
npx @contextforge/cli add system-design
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### sync
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npx @contextforge/cli sync
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Repairs and updates the local ContextForge setup. It re-detects the stack, fetches current pack files, and regenerates `.contextforge` outputs.
|
|
130
|
+
|
|
131
|
+
### doctor
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npx @contextforge/cli doctor
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Checks whether ContextForge is correctly installed.
|
|
138
|
+
|
|
139
|
+
### list
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
npx @contextforge/cli list
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Lists available registry packs grouped by topic.
|
|
146
|
+
|
|
147
|
+
### search
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npx @contextforge/cli search <query>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Searches pack name, title, description, and topic.
|
|
154
|
+
|
|
155
|
+
## Generated Project Structure
|
|
156
|
+
|
|
157
|
+
ContextForge stores pack content here:
|
|
158
|
+
|
|
159
|
+
```txt
|
|
160
|
+
.contextforge/
|
|
161
|
+
config.json
|
|
162
|
+
lock.json
|
|
163
|
+
agents/
|
|
164
|
+
codex/<pack>.md
|
|
165
|
+
claude/<pack>.md
|
|
166
|
+
cursor/<pack>.md
|
|
167
|
+
copilot/<pack>.md
|
|
168
|
+
skills/
|
|
169
|
+
<pack>/SKILL.md
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
For auto-discovery, ContextForge may also create small root pointer files:
|
|
173
|
+
|
|
174
|
+
```txt
|
|
175
|
+
AGENTS.md
|
|
176
|
+
CLAUDE.md
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
These files only tell the agent to read `.contextforge`. They do not contain full pack content.
|
|
180
|
+
|
|
181
|
+
## Core Packs
|
|
182
|
+
|
|
183
|
+
Every project starts with mandatory core behavior packs:
|
|
184
|
+
|
|
185
|
+
- `verification-before-completion`
|
|
186
|
+
- `systematic-debugging`
|
|
187
|
+
- `code-review`
|
|
188
|
+
- `git-workflow`
|
|
189
|
+
- `dependency-management`
|
|
190
|
+
- `diataxis-docs`
|
|
191
|
+
|
|
192
|
+
These packs help agents verify work, debug systematically, review code, handle Git safely, manage dependencies carefully, and keep documentation useful.
|
|
193
|
+
|
|
194
|
+
## Stack Packs
|
|
195
|
+
|
|
196
|
+
ContextForge can install detected stack packs such as:
|
|
197
|
+
|
|
198
|
+
- `nextjs-best-practices`
|
|
199
|
+
- `react-performance`
|
|
200
|
+
- `react-composition`
|
|
201
|
+
- `shadcn-ui`
|
|
202
|
+
- `tailwind-v4`
|
|
203
|
+
- `ui-ux-design`
|
|
204
|
+
- `frontend-aesthetics`
|
|
205
|
+
- `typescript-advanced-types`
|
|
206
|
+
- `supabase`
|
|
207
|
+
- `security-baseline`
|
|
208
|
+
- `system-design`
|
|
209
|
+
- `frontend-system-design`
|
|
210
|
+
- `api-design`
|
|
211
|
+
- `test-driven-development`
|
|
212
|
+
|
|
213
|
+
## Official Registry
|
|
214
|
+
|
|
215
|
+
The official registry is:
|
|
216
|
+
|
|
217
|
+
```txt
|
|
218
|
+
https://registry.contextforge.org/index.json
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Normal users do not need to pass a registry URL.
|
|
222
|
+
|
|
223
|
+
For testing custom registries:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
npx @contextforge/cli list --registry https://example.com/index.json
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Safety
|
|
230
|
+
|
|
231
|
+
ContextForge preserves user-written root file content. It only updates generated blocks between:
|
|
232
|
+
|
|
233
|
+
```md
|
|
234
|
+
<!-- contextforge:start -->
|
|
235
|
+
<!-- contextforge:end -->
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Content outside that block is left alone.
|
|
239
|
+
|
|
240
|
+
## Links
|
|
241
|
+
|
|
242
|
+
- Website: https://contextforge.org
|
|
243
|
+
- Main repo: https://github.com/Alone-Y154/ContextForge
|
|
244
|
+
- Registry repo: https://github.com/Alone-Y154/ContextForge-registry
|
|
245
|
+
- Website repo: https://github.com/Alone-Y154/Contextforge-web
|
|
246
|
+
- npm CLI: https://www.npmjs.com/package/@contextforge/cli
|
|
247
|
+
- npm Core: https://www.npmjs.com/package/@contextforge/core
|
|
248
|
+
- Registry: https://registry.contextforge.org/index.json
|
|
249
|
+
|
|
250
|
+
## License
|
|
251
|
+
|
|
252
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -264,7 +264,7 @@ async function syncCommand(options = {}) {
|
|
|
264
264
|
|
|
265
265
|
// src/index.ts
|
|
266
266
|
var program = new Command();
|
|
267
|
-
program.name("contextforge").description("Make existing codebases AI-agent ready").version("0.1.
|
|
267
|
+
program.name("contextforge").description("Make existing codebases AI-agent ready").version("0.1.10");
|
|
268
268
|
program.command("init").description("Initialize AI-agent instructions").option("--registry <url>", "Static remote registry index URL", collectRegistryOption, []).action(initCommand);
|
|
269
269
|
program.command("add").argument("<pack>").description("Add an instruction pack").option("--registry <url>", "Static remote registry index URL", collectRegistryOption, []).option("--force", "Re-download and regenerate even when the pack is already installed").option("--dry-run", "Show what would be installed without writing files").action(addCommand);
|
|
270
270
|
program.command("sync").description("Sync generated AI instruction files").option("--registry <url>", "Static remote registry index URL", collectRegistryOption, []).action(syncCommand);
|
package/package.json
CHANGED
|
@@ -1,19 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contextforge/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
|
+
"description": "CLI that installs curated AI-agent instruction packs into existing codebases.",
|
|
4
5
|
"type": "module",
|
|
6
|
+
"homepage": "https://contextforge.org",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Alone-Y154/ContextForge.git",
|
|
11
|
+
"directory": "packages/cli"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Alone-Y154/ContextForge/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ai",
|
|
18
|
+
"agents",
|
|
19
|
+
"codex",
|
|
20
|
+
"claude-code",
|
|
21
|
+
"cursor",
|
|
22
|
+
"github-copilot",
|
|
23
|
+
"developer-tools",
|
|
24
|
+
"cli",
|
|
25
|
+
"prompt-engineering",
|
|
26
|
+
"typescript"
|
|
27
|
+
],
|
|
5
28
|
"bin": {
|
|
6
29
|
"contextforge": "dist/index.js"
|
|
7
30
|
},
|
|
8
31
|
"files": [
|
|
9
|
-
"dist"
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md"
|
|
10
34
|
],
|
|
11
35
|
"dependencies": {
|
|
12
36
|
"@inquirer/prompts": "^7.8.0",
|
|
13
37
|
"commander": "^14.0.0",
|
|
14
38
|
"ora": "^8.2.0",
|
|
15
39
|
"picocolors": "^1.1.1",
|
|
16
|
-
"@contextforge/core": "0.1.
|
|
40
|
+
"@contextforge/core": "0.1.10"
|
|
17
41
|
},
|
|
18
42
|
"devDependencies": {
|
|
19
43
|
"tsx": "^4.20.0"
|