@contextforge/cli
v0.1.10
Published
CLI that installs curated AI-agent instruction packs into existing codebases.
Maintainers
Readme
ContextForge CLI
Website: https://contextforge.org
ContextForge is a registry-powered CLI that installs curated AI-agent instruction packs into existing codebases.
npx @contextforge/cli initWhat Is ContextForge?
ContextForge makes any repo AI-agent ready.
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.
ContextForge fixes this by installing repo-level instruction packs that guide agent behavior.
It is not an MCP gateway, tool proxy, API gateway, or replacement for skills.sh. It is a repo-level AI-agent instruction installer.
How It Works
Remote registry
https://registry.contextforge.org/index.json
|
v
ContextForge CLI
npx @contextforge/cli init
|
v
User repo
.contextforge/
config.json
lock.json
agents/
skills/
|
v
Tiny root pointers
AGENTS.md
CLAUDE.mdContextForge fetches packs from the official registry, writes useful instructions under .contextforge, and creates tiny root pointer files for supported agents.
Root files stay small. Full prompt and instruction content lives inside .contextforge.
Quick Start
Run this inside an existing project:
npx @contextforge/cli initThen choose which AI tool to configure:
All agents
Codex only
Claude Code only
Cursor only
GitHub Copilot onlyAdd a pack:
npx @contextforge/cli add supabaseSync installed packs:
npx @contextforge/cli syncCheck health:
npx @contextforge/cli doctorList registry packs:
npx @contextforge/cli listSearch packs:
npx @contextforge/cli search reactCommands
init
npx @contextforge/cli initFirst setup. Detects the project stack, installs mandatory core packs, installs detected stack packs, writes .contextforge, and creates root pointer files.
add
npx @contextforge/cli add <pack>Installs one extra pack from the registry.
Examples:
npx @contextforge/cli add supabase
npx @contextforge/cli add nextjs-best-practices
npx @contextforge/cli add system-designsync
npx @contextforge/cli syncRepairs and updates the local ContextForge setup. It re-detects the stack, fetches current pack files, and regenerates .contextforge outputs.
doctor
npx @contextforge/cli doctorChecks whether ContextForge is correctly installed.
list
npx @contextforge/cli listLists available registry packs grouped by topic.
search
npx @contextforge/cli search <query>Searches pack name, title, description, and topic.
Generated Project Structure
ContextForge stores pack content here:
.contextforge/
config.json
lock.json
agents/
codex/<pack>.md
claude/<pack>.md
cursor/<pack>.md
copilot/<pack>.md
skills/
<pack>/SKILL.mdFor auto-discovery, ContextForge may also create small root pointer files:
AGENTS.md
CLAUDE.mdThese files only tell the agent to read .contextforge. They do not contain full pack content.
Core Packs
Every project starts with mandatory core behavior packs:
verification-before-completionsystematic-debuggingcode-reviewgit-workflowdependency-managementdiataxis-docs
These packs help agents verify work, debug systematically, review code, handle Git safely, manage dependencies carefully, and keep documentation useful.
Stack Packs
ContextForge can install detected stack packs such as:
nextjs-best-practicesreact-performancereact-compositionshadcn-uitailwind-v4ui-ux-designfrontend-aestheticstypescript-advanced-typessupabasesecurity-baselinesystem-designfrontend-system-designapi-designtest-driven-development
Official Registry
The official registry is:
https://registry.contextforge.org/index.jsonNormal users do not need to pass a registry URL.
For testing custom registries:
npx @contextforge/cli list --registry https://example.com/index.jsonSafety
ContextForge preserves user-written root file content. It only updates generated blocks between:
<!-- contextforge:start -->
<!-- contextforge:end -->Content outside that block is left alone.
Links
- Website: https://contextforge.org
- Main repo: https://github.com/Alone-Y154/ContextForge
- Registry repo: https://github.com/Alone-Y154/ContextForge-registry
- Website repo: https://github.com/Alone-Y154/Contextforge-web
- npm CLI: https://www.npmjs.com/package/@contextforge/cli
- npm Core: https://www.npmjs.com/package/@contextforge/core
- Registry: https://registry.contextforge.org/index.json
License
MIT
