@nolrm/contextkit 0.11.0 → 0.12.3
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 +10 -3
- package/bin/contextkit.js +13 -0
- package/lib/commands/install.js +3 -2
- package/lib/integrations/index.js +3 -1
- package/lib/integrations/opencode-integration.js +45 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Context Engineering for AI Development
|
|
4
4
|
|
|
5
|
-
Give your AI assistants (Cursor, Claude, Copilot, Codex, Gemini, Aider, Continue, Windsurf) structured context through markdown files. ContextKit creates a knowledge base that ensures AI generates code matching your exact patterns, style, and architecture—no more hallucinated code or mismatched conventions.
|
|
5
|
+
Give your AI assistants (Cursor, Claude, Copilot, Codex, OpenCode, Gemini, Aider, Continue, Windsurf) structured context through markdown files. ContextKit creates a knowledge base that ensures AI generates code matching your exact patterns, style, and architecture—no more hallucinated code or mismatched conventions.
|
|
6
6
|
|
|
7
7
|
ContextKit is a CLI tool that provides **context-engineering** capabilities by creating `.contextkit/` directories with project standards, guidelines, and patterns that AI assistants read automatically.
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ Update `.md` files as your project evolves; the AI follows.
|
|
|
21
21
|
|
|
22
22
|
## Multi-Platform Support
|
|
23
23
|
|
|
24
|
-
Works with: **Cursor** • **Claude Code** • **GitHub Copilot** • **Codex CLI** • **Gemini CLI** • **Aider** • **Continue** • **Windsurf**
|
|
24
|
+
Works with: **Cursor** • **Claude Code** • **GitHub Copilot** • **Codex CLI** • **OpenCode** • **Gemini CLI** • **Aider** • **Continue** • **Windsurf**
|
|
25
25
|
|
|
26
26
|
Each platform gets auto-loaded bridge files (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.windsurfrules`, etc.) so your AI tools read project standards automatically. Claude Code uses `@` imports in CLAUDE.md to load standards content directly into context — no extra token cost from manual file reads.
|
|
27
27
|
|
|
@@ -76,6 +76,7 @@ ck claude # creates CLAUDE.md + .claude/rules/
|
|
|
76
76
|
ck cursor # creates .cursor/rules/ (scoped .mdc files)
|
|
77
77
|
ck copilot # creates .github/copilot-instructions.md
|
|
78
78
|
ck codex # creates AGENTS.md
|
|
79
|
+
ck opencode # creates AGENTS.md
|
|
79
80
|
ck gemini # creates GEMINI.md + .gemini/settings.json
|
|
80
81
|
ck aider # creates CONVENTIONS.md + .aider/rules.md
|
|
81
82
|
ck continue # creates .continue/rules/ + config.yaml
|
|
@@ -136,6 +137,11 @@ claude "create checkout flow for customer"
|
|
|
136
137
|
codex "create checkout flow for customer"
|
|
137
138
|
```
|
|
138
139
|
|
|
140
|
+
**OpenCode** — reads `AGENTS.md` automatically
|
|
141
|
+
```bash
|
|
142
|
+
opencode "create checkout flow for customer"
|
|
143
|
+
```
|
|
144
|
+
|
|
139
145
|
**CLI** (Chat with AI)
|
|
140
146
|
```bash
|
|
141
147
|
ck ai "create a button"
|
|
@@ -284,7 +290,7 @@ Hooks are optional and can be skipped with `ck install --no-hooks`.
|
|
|
284
290
|
- 🧠 **Context Engineering** - Structured MD files your AI reads automatically
|
|
285
291
|
- 🔍 **Smart Analysis** - AI generates standards content based on your codebase
|
|
286
292
|
- 🌍 **Project Agnostic** - Works with React, Vue, Node.js, PHP, Python, Rust, monorepos—any project type
|
|
287
|
-
- 🤖 **Multi-Platform** - Works with Cursor, Claude Code, Copilot, Codex, Gemini, Aider, Continue, Windsurf
|
|
293
|
+
- 🤖 **Multi-Platform** - Works with Cursor, Claude Code, Copilot, Codex, OpenCode, Gemini, Aider, Continue, Windsurf
|
|
288
294
|
- 🛡️ **Safe Install** - Backs up existing files with rollback support
|
|
289
295
|
- ⚡ **Zero Config** - Auto-detects project type and package manager
|
|
290
296
|
- ✅ **Policy Enforcement** - Configurable validation with `ck check`
|
|
@@ -303,6 +309,7 @@ ck claude # add Claude Code integration (CLAUDE.md + rules)
|
|
|
303
309
|
ck cursor # add Cursor integration (scoped .mdc rules)
|
|
304
310
|
ck copilot # add GitHub Copilot integration
|
|
305
311
|
ck codex # add Codex CLI integration (AGENTS.md)
|
|
312
|
+
ck opencode # add OpenCode integration (AGENTS.md)
|
|
306
313
|
ck gemini # add Gemini CLI integration (GEMINI.md)
|
|
307
314
|
ck aider # add Aider integration (CONVENTIONS.md)
|
|
308
315
|
ck continue # add Continue integration
|
package/bin/contextkit.js
CHANGED
|
@@ -275,6 +275,19 @@ program
|
|
|
275
275
|
}
|
|
276
276
|
});
|
|
277
277
|
|
|
278
|
+
program
|
|
279
|
+
.command('opencode')
|
|
280
|
+
.description('Install OpenCode integration only')
|
|
281
|
+
.option('--non-interactive', 'Skip interactive prompts')
|
|
282
|
+
.action(async (options) => {
|
|
283
|
+
try {
|
|
284
|
+
await install({ platform: 'opencode', ...options });
|
|
285
|
+
} catch (error) {
|
|
286
|
+
console.error(chalk.red('Installation failed:'), error.message);
|
|
287
|
+
process.exit(1);
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
|
|
278
291
|
program
|
|
279
292
|
.command('copilot')
|
|
280
293
|
.description('Install GitHub Copilot integration only')
|
package/lib/commands/install.js
CHANGED
|
@@ -127,7 +127,7 @@ class InstallCommand {
|
|
|
127
127
|
|
|
128
128
|
if (!integration) {
|
|
129
129
|
console.log(chalk.red(`❌ Unknown platform: ${platform}`));
|
|
130
|
-
console.log(chalk.yellow('💡 Available: claude, cursor, copilot, codex, gemini, aider, continue, windsurf'));
|
|
130
|
+
console.log(chalk.yellow('💡 Available: claude, cursor, copilot, codex, opencode, gemini, aider, continue, windsurf'));
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -178,6 +178,7 @@ class InstallCommand {
|
|
|
178
178
|
{ name: 'Cursor', value: 'cursor' },
|
|
179
179
|
{ name: 'Copilot (GitHub)', value: 'copilot' },
|
|
180
180
|
{ name: 'Codex (OpenAI)', value: 'codex' },
|
|
181
|
+
{ name: 'OpenCode', value: 'opencode' },
|
|
181
182
|
{ name: 'Gemini', value: 'gemini' },
|
|
182
183
|
{ name: 'Windsurf', value: 'windsurf' },
|
|
183
184
|
{ name: 'Aider', value: 'aider' },
|
|
@@ -1515,7 +1516,7 @@ If standards are still skeletons, warn that @imports in CLAUDE.md are loading em
|
|
|
1515
1516
|
console.log(''.padEnd(48, '─'));
|
|
1516
1517
|
console.log(`ck status → Check installation & integrations`);
|
|
1517
1518
|
console.log(`ck ai <cmd> → Use AI with project context`);
|
|
1518
|
-
console.log(`ck <platform> → Add platform (claude, cursor, copilot, codex, gemini, aider, continue, windsurf)`);
|
|
1519
|
+
console.log(`ck <platform> → Add platform (claude, cursor, copilot, codex, opencode, gemini, aider, continue, windsurf)`);
|
|
1519
1520
|
console.log('');
|
|
1520
1521
|
console.log(`Docs → ${chalk.blue('https://contextkit-docs.vercel.app')}`);
|
|
1521
1522
|
console.log(`Issues → ${chalk.blue('https://github.com/nolrm/contextkit/issues')}`);
|
|
@@ -2,6 +2,7 @@ const ClaudeIntegration = require('./claude-integration');
|
|
|
2
2
|
const CursorIntegration = require('./cursor-integration');
|
|
3
3
|
const CopilotIntegration = require('./copilot-integration');
|
|
4
4
|
const CodexIntegration = require('./codex-integration');
|
|
5
|
+
const OpencodeIntegration = require('./opencode-integration');
|
|
5
6
|
const GeminiIntegration = require('./gemini-integration');
|
|
6
7
|
const AiderIntegration = require('./aider-integration');
|
|
7
8
|
const ContinueIntegration = require('./continue-integration');
|
|
@@ -13,6 +14,7 @@ const INTEGRATIONS = {
|
|
|
13
14
|
copilot: CopilotIntegration,
|
|
14
15
|
vscode: CopilotIntegration, // backward compat alias
|
|
15
16
|
codex: CodexIntegration,
|
|
17
|
+
opencode: OpencodeIntegration,
|
|
16
18
|
gemini: GeminiIntegration,
|
|
17
19
|
aider: AiderIntegration,
|
|
18
20
|
continue: ContinueIntegration,
|
|
@@ -27,7 +29,7 @@ function getIntegration(name) {
|
|
|
27
29
|
|
|
28
30
|
function getAllIntegrationNames() {
|
|
29
31
|
// Return unique names (exclude aliases like vscode)
|
|
30
|
-
return ['claude', 'cursor', 'copilot', 'codex', 'gemini', 'aider', 'continue', 'windsurf'];
|
|
32
|
+
return ['claude', 'cursor', 'copilot', 'codex', 'opencode', 'gemini', 'aider', 'continue', 'windsurf'];
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
module.exports = { getIntegration, getAllIntegrationNames, INTEGRATIONS };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const BaseIntegration = require('./base-integration');
|
|
3
|
+
|
|
4
|
+
class OpencodeIntegration extends BaseIntegration {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.name = 'opencode';
|
|
8
|
+
this.displayName = 'OpenCode';
|
|
9
|
+
this.bridgeFiles = ['AGENTS.md'];
|
|
10
|
+
this.generatedFiles = [];
|
|
11
|
+
this.platformDir = '';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async generateFiles() {
|
|
15
|
+
// Bridge file: AGENTS.md (auto-loaded by OpenCode)
|
|
16
|
+
const bridgeContent = `# Project Standards (ContextKit)
|
|
17
|
+
|
|
18
|
+
This project uses [ContextKit](https://github.com/nolrm/contextkit) for AI development standards.
|
|
19
|
+
|
|
20
|
+
${this.getStandardsBlock()}
|
|
21
|
+
|
|
22
|
+
## Corrections Log
|
|
23
|
+
|
|
24
|
+
- \`.contextkit/corrections.md\` — Track AI performance improvements
|
|
25
|
+
|
|
26
|
+
## Quick Reference
|
|
27
|
+
|
|
28
|
+
Before writing code, check the relevant standards files above. Always follow the project's established patterns and conventions.`;
|
|
29
|
+
|
|
30
|
+
await this.writeBridgeFile('AGENTS.md', bridgeContent);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
showUsage() {
|
|
34
|
+
console.log('');
|
|
35
|
+
console.log(chalk.bold(' OpenCode Usage:'));
|
|
36
|
+
console.log(' AGENTS.md is auto-loaded by OpenCode');
|
|
37
|
+
console.log(' Just run: opencode "create a button component"');
|
|
38
|
+
console.log(' Standards are automatically included via AGENTS.md');
|
|
39
|
+
console.log('');
|
|
40
|
+
console.log(chalk.dim(' Files created:'));
|
|
41
|
+
console.log(chalk.dim(' AGENTS.md (bridge - auto-loaded)'));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = OpencodeIntegration;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nolrm/contextkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "ContextKit - Context Engineering for AI Development. Provide rich context to AI through structured MD files with standards, code guides, and documentation. Works with Cursor, Claude, Aider, VS Code Copilot, and more.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|