create-snipara 2.0.12 → 2.0.13
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 +20 -4
- package/dist/index.js +74 -21
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ behind the scenes.
|
|
|
25
25
|
|
|
26
26
|
Use it for:
|
|
27
27
|
|
|
28
|
-
- Hosted MCP onboarding for Claude Code, Cursor,
|
|
28
|
+
- Hosted MCP onboarding for Claude Code, Cursor, Kimi Code CLI, Codex, Gemini, Mistral, VS Code/Copilot, Continue, ChatGPT Desktop, Orca-style MCP clients, LM Studio-backed local stacks, and similar clients
|
|
29
29
|
- free account signup with reviewed Context + Memory
|
|
30
30
|
- local project wiring, `doctor`, `repair`, and `upgrade`
|
|
31
31
|
- local source activation without GitHub, plus optional GitHub repository sync and PR Answer Packs approval when the current folder is a GitHub repo
|
|
@@ -86,7 +86,7 @@ Free onboarding is now **Context + Memory**, not Context-only:
|
|
|
86
86
|
|
|
87
87
|
- Context Free: three projects and 1,000 context queries/month
|
|
88
88
|
- Memory Free: reviewed hosted memories for continuity across sessions
|
|
89
|
-
- Hosted MCP: direct connection for Claude Code, Cursor,
|
|
89
|
+
- Hosted MCP: direct connection for Claude Code, Cursor, Kimi Code CLI, Codex, Gemini, Mistral, VS Code/Copilot, Continue, ChatGPT Desktop, Orca-style MCP clients, LM Studio-backed local stacks, and other MCP clients
|
|
90
90
|
|
|
91
91
|
The CLI opens a browser device-flow login when the user does not already have a key, auto-provisions the free Context + Memory account when needed, then writes the returned API key into the local MCP config.
|
|
92
92
|
|
|
@@ -413,10 +413,26 @@ companion add workflow ergonomics:
|
|
|
413
413
|
- choose `hosted-only` or `--skip-companion` only in locked-down environments
|
|
414
414
|
- use local `snipara-mcp` only for stdio compatibility, development, or tests
|
|
415
415
|
|
|
416
|
-
Claude Code, Cursor, and
|
|
417
|
-
that client has a useful local hook surface.
|
|
416
|
+
Claude Code, Cursor, and Kimi Code CLI can receive generated automation files when
|
|
417
|
+
that client has a useful local hook surface. Kimi receives a project-local MCP
|
|
418
|
+
config and a reviewable plugin that must be installed explicitly; its hooks are
|
|
419
|
+
fail-open. Codex, Gemini, VS Code, Continue,
|
|
418
420
|
Mistral, ChatGPT, and custom clients are treated as MCP-first: they get the hosted MCP
|
|
419
421
|
configuration/reference and agent instructions, not invented local hooks.
|
|
422
|
+
|
|
423
|
+
For Kimi Code CLI:
|
|
424
|
+
|
|
425
|
+
```bash
|
|
426
|
+
npx -y create-snipara@latest init --client kimi --profile hosted-companion --with-hooks
|
|
427
|
+
npx -y snipara-companion@latest automations install --client kimi
|
|
428
|
+
# Then, in Kimi Code after reviewing the plugin:
|
|
429
|
+
/plugins install .kimi-code/snipara-plugin
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Export `SNIPARA_API_KEY` before starting Kimi. The generated
|
|
433
|
+
`.kimi-code/mcp.json` stores only `bearerTokenEnvVar`, never the raw key. Kimi
|
|
434
|
+
installs plugins per user, so the generated handler is project-neutral and
|
|
435
|
+
no-ops outside workspaces carrying a Snipara project or Companion marker.
|
|
420
436
|
For Mistral, request hooks from LangChain are documented as `ChatMistralAI`
|
|
421
437
|
request lifecycle hooks (`beforeRequestHooks`, `requestErrorHooks`, and
|
|
422
438
|
`responseHooks`), not as local agent lifecycle hooks.
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { homedir } from "os";
|
|
|
13
13
|
// package.json
|
|
14
14
|
var package_default = {
|
|
15
15
|
name: "create-snipara",
|
|
16
|
-
version: "2.0.
|
|
16
|
+
version: "2.0.13",
|
|
17
17
|
description: "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
|
|
18
18
|
main: "dist/index.js",
|
|
19
19
|
type: "module",
|
|
@@ -45,7 +45,7 @@ var package_default = {
|
|
|
45
45
|
"chatgpt",
|
|
46
46
|
"openai",
|
|
47
47
|
"cursor",
|
|
48
|
-
"
|
|
48
|
+
"kimi",
|
|
49
49
|
"gemini",
|
|
50
50
|
"mistral",
|
|
51
51
|
"orca",
|
|
@@ -956,9 +956,9 @@ var AI_CLIENT_CHOICES = [
|
|
|
956
956
|
description: "Hosted MCP plus Cursor rules and automation bundles"
|
|
957
957
|
},
|
|
958
958
|
{
|
|
959
|
-
title: "
|
|
960
|
-
value: "
|
|
961
|
-
description: "
|
|
959
|
+
title: "Kimi Code CLI",
|
|
960
|
+
value: "kimi",
|
|
961
|
+
description: "Project MCP plus a reviewable Snipara Companion plugin"
|
|
962
962
|
},
|
|
963
963
|
{
|
|
964
964
|
title: "OpenAI Codex",
|
|
@@ -1001,7 +1001,7 @@ function getCompanionInitClientFlag(aiClient) {
|
|
|
1001
1001
|
const supportedClientMap = {
|
|
1002
1002
|
"claude-code": "claude-code",
|
|
1003
1003
|
cursor: "cursor",
|
|
1004
|
-
|
|
1004
|
+
kimi: "kimi",
|
|
1005
1005
|
codex: "codex",
|
|
1006
1006
|
gemini: "gemini",
|
|
1007
1007
|
mistral: "mistral",
|
|
@@ -1027,7 +1027,7 @@ function buildProgram() {
|
|
|
1027
1027
|
program.name("create-snipara").description("Scaffold hosted Snipara MCP config; advanced flags add local helpers").version(VERSION);
|
|
1028
1028
|
program.command("init").description("Install and configure Snipara for this project").option("--api-key <key>", "Snipara API key").option("--slug <slug>", "Project slug").option("--project-id <id>", "Project ID").option(
|
|
1029
1029
|
"--client <client>",
|
|
1030
|
-
"AI client: claude-code, cursor,
|
|
1030
|
+
"AI client: claude-code, cursor, kimi, codex, gemini, mistral, chatgpt, vscode, continue, claude-desktop, other"
|
|
1031
1031
|
).option("--advanced", "Show advanced profile, project id, hooks, GitHub, and sandbox prompts").option(
|
|
1032
1032
|
"--profile <profile>",
|
|
1033
1033
|
"Install profile: hosted-only, hosted-companion, full-stack, runtime-only"
|
|
@@ -1068,7 +1068,7 @@ function buildProgram() {
|
|
|
1068
1068
|
function addSharedRootOptions(program) {
|
|
1069
1069
|
program.option("--api-key <key>", "Snipara API key").option("--slug <slug>", "Project slug").option("--project-id <id>", "Project ID").option(
|
|
1070
1070
|
"--client <client>",
|
|
1071
|
-
"AI client: claude-code, cursor,
|
|
1071
|
+
"AI client: claude-code, cursor, kimi, codex, gemini, mistral, chatgpt, vscode, continue, claude-desktop, other"
|
|
1072
1072
|
).option("--advanced", "Show advanced profile, project id, hooks, GitHub, and sandbox prompts").option(
|
|
1073
1073
|
"--profile <profile>",
|
|
1074
1074
|
"Install profile: hosted-only, hosted-companion, full-stack, runtime-only"
|
|
@@ -1682,7 +1682,7 @@ function normalizeClientOption(value) {
|
|
|
1682
1682
|
"claude-desktop": "claude-desktop",
|
|
1683
1683
|
claude_desktop: "claude-desktop",
|
|
1684
1684
|
cursor: "cursor",
|
|
1685
|
-
|
|
1685
|
+
kimi: "kimi",
|
|
1686
1686
|
codex: "codex",
|
|
1687
1687
|
gemini: "gemini",
|
|
1688
1688
|
mistral: "mistral",
|
|
@@ -1700,7 +1700,7 @@ function normalizeClientOption(value) {
|
|
|
1700
1700
|
const client = aliases[normalized];
|
|
1701
1701
|
if (!client) {
|
|
1702
1702
|
throw new Error(
|
|
1703
|
-
`Unknown client '${value}'. Use claude, claude-code, cursor, codex, mistral, or other.`
|
|
1703
|
+
`Unknown client '${value}'. Use claude, claude-code, cursor, kimi, codex, mistral, or other.`
|
|
1704
1704
|
);
|
|
1705
1705
|
}
|
|
1706
1706
|
return client;
|
|
@@ -2162,10 +2162,34 @@ async function createMcpConfig(answers) {
|
|
|
2162
2162
|
}
|
|
2163
2163
|
console.log(chalk.green(" \u2713 Created .mcp.json"));
|
|
2164
2164
|
ensureGitignoreEntry(".mcp.json", "# Snipara MCP config (contains API key)");
|
|
2165
|
+
if (answers.aiClient === "kimi" && answers.profile !== "runtime-only") {
|
|
2166
|
+
createKimiMcpConfig(answers);
|
|
2167
|
+
}
|
|
2165
2168
|
if (answers.aiClient === "claude-desktop") {
|
|
2166
2169
|
await createClaudeDesktopConfig(answers);
|
|
2167
2170
|
}
|
|
2168
2171
|
}
|
|
2172
|
+
function createKimiMcpConfig(answers) {
|
|
2173
|
+
const kimiDir = path.join(process.cwd(), ".kimi-code");
|
|
2174
|
+
const configPath = path.join(kimiDir, "mcp.json");
|
|
2175
|
+
const existing = asObjectRecord(readJsonFile(configPath));
|
|
2176
|
+
const existingServers = asObjectRecord(existing.mcpServers);
|
|
2177
|
+
const config = {
|
|
2178
|
+
...existing,
|
|
2179
|
+
mcpServers: {
|
|
2180
|
+
...existingServers,
|
|
2181
|
+
snipara: {
|
|
2182
|
+
url: buildHostedMcpEndpoint(answers),
|
|
2183
|
+
bearerTokenEnvVar: "SNIPARA_API_KEY"
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
};
|
|
2187
|
+
fs.mkdirSync(kimiDir, { recursive: true });
|
|
2188
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
2189
|
+
console.log(
|
|
2190
|
+
chalk.green(" \u2713 Created .kimi-code/mcp.json") + chalk.dim(" - SNIPARA_API_KEY stays in the launch environment")
|
|
2191
|
+
);
|
|
2192
|
+
}
|
|
2169
2193
|
function buildHostedMcpServer(answers) {
|
|
2170
2194
|
return {
|
|
2171
2195
|
type: "http",
|
|
@@ -3449,6 +3473,14 @@ function buildActivationSurfaceContract(client) {
|
|
|
3449
3473
|
nextSurfaceAction: "Start a new Claude Code session and validate Snipara tools before enabling hooks or managed workflows."
|
|
3450
3474
|
};
|
|
3451
3475
|
}
|
|
3476
|
+
if (client === "kimi") {
|
|
3477
|
+
return {
|
|
3478
|
+
...shared,
|
|
3479
|
+
entryPoint: "Kimi Code project MCP plus an explicitly installed Snipara plugin",
|
|
3480
|
+
clientRole: "Agent-first CLI surface: load .kimi-code/mcp.json for Hosted MCP and install the generated Companion plugin only after review.",
|
|
3481
|
+
nextSurfaceAction: "Start Kimi Code with SNIPARA_API_KEY exported, verify /mcp, then install .kimi-code/snipara-plugin when lifecycle automation is desired."
|
|
3482
|
+
};
|
|
3483
|
+
}
|
|
3452
3484
|
return {
|
|
3453
3485
|
...shared,
|
|
3454
3486
|
entryPoint: `${getClientDisplayName(client)} setup generated by create-snipara`,
|
|
@@ -3545,10 +3577,11 @@ function getClientGuidance(client) {
|
|
|
3545
3577
|
"Use the companion CLI only for explicit upload, planning, chunk lookup, doctor, and task commit workflows outside the editor UI."
|
|
3546
3578
|
];
|
|
3547
3579
|
}
|
|
3548
|
-
if (client === "
|
|
3580
|
+
if (client === "kimi") {
|
|
3549
3581
|
return [
|
|
3550
|
-
"
|
|
3551
|
-
"Use npx -y snipara-companion@latest automations install --client
|
|
3582
|
+
"Kimi Code CLI reads the project-local .kimi-code/mcp.json and resolves SNIPARA_API_KEY from the launch environment.",
|
|
3583
|
+
"Use npx -y snipara-companion@latest automations install --client kimi to download the reviewable plugin bundle, then install it explicitly inside Kimi with /plugins install .kimi-code/snipara-plugin.",
|
|
3584
|
+
"Kimi hooks are fail-open. Keep risky tool approvals enabled and use Hosted MCP tenant checks plus Companion guards as the authoritative boundary."
|
|
3552
3585
|
];
|
|
3553
3586
|
}
|
|
3554
3587
|
if (client === "codex") {
|
|
@@ -3765,7 +3798,7 @@ function getClientDisplayName(client) {
|
|
|
3765
3798
|
const names = {
|
|
3766
3799
|
"claude-code": "Claude Code",
|
|
3767
3800
|
cursor: "Cursor",
|
|
3768
|
-
|
|
3801
|
+
kimi: "Kimi Code CLI",
|
|
3769
3802
|
codex: "OpenAI Codex",
|
|
3770
3803
|
gemini: "Gemini",
|
|
3771
3804
|
mistral: "Mistral Le Chat / Vibe",
|
|
@@ -3781,7 +3814,7 @@ function getClientPackFilename(client) {
|
|
|
3781
3814
|
const names = {
|
|
3782
3815
|
"claude-code": "CLAUDE_CODE.md",
|
|
3783
3816
|
cursor: "CURSOR.md",
|
|
3784
|
-
|
|
3817
|
+
kimi: "KIMI.md",
|
|
3785
3818
|
codex: "CODEX.md",
|
|
3786
3819
|
gemini: "GEMINI.md",
|
|
3787
3820
|
mistral: "MISTRAL.md",
|
|
@@ -3800,8 +3833,12 @@ function getClientConfigArtifacts(client) {
|
|
|
3800
3833
|
if (client === "cursor") {
|
|
3801
3834
|
return [".mcp.json", ".cursor/rules/snipara.mdc", "dashboard automation bundle when installed"];
|
|
3802
3835
|
}
|
|
3803
|
-
if (client === "
|
|
3804
|
-
return [
|
|
3836
|
+
if (client === "kimi") {
|
|
3837
|
+
return [
|
|
3838
|
+
"AGENTS.md",
|
|
3839
|
+
".kimi-code/mcp.json",
|
|
3840
|
+
".kimi-code/snipara-plugin when installed through Companion"
|
|
3841
|
+
];
|
|
3805
3842
|
}
|
|
3806
3843
|
if (client === "codex") {
|
|
3807
3844
|
return ["AGENTS.md", ".codex/config.toml", ".snipara/templates/codex-config.toml"];
|
|
@@ -4823,6 +4860,11 @@ function printSuccess(answers, report, activationManifest) {
|
|
|
4823
4860
|
chalk.green(" \u2713 Claude Code") + chalk.dim(" - .mcp.json MCP config, .claude/settings.json hooks when enabled")
|
|
4824
4861
|
);
|
|
4825
4862
|
}
|
|
4863
|
+
if (answers.aiClient === "kimi" && answers.profile !== "runtime-only") {
|
|
4864
|
+
console.log(
|
|
4865
|
+
chalk.green(" \u2713 Kimi Code CLI") + chalk.dim(" - .kimi-code/mcp.json with environment-backed authentication")
|
|
4866
|
+
);
|
|
4867
|
+
}
|
|
4826
4868
|
console.log(
|
|
4827
4869
|
chalk.green(" \u2713 .snipara/companion") + chalk.dim(" - Doctor report and optional command references")
|
|
4828
4870
|
);
|
|
@@ -4859,6 +4901,17 @@ function printSuccess(answers, report, activationManifest) {
|
|
|
4859
4901
|
`If Snipara tools are missing, run: ${CREATE_SNIPARA_NPX_COMMAND} doctor --client claude-desktop`
|
|
4860
4902
|
);
|
|
4861
4903
|
}
|
|
4904
|
+
if (answers.aiClient === "kimi") {
|
|
4905
|
+
printNextStep(
|
|
4906
|
+
"For Kimi Code CLI, export SNIPARA_API_KEY before launch and run /mcp to verify the project-local server."
|
|
4907
|
+
);
|
|
4908
|
+
printNextStep(
|
|
4909
|
+
`To enable Companion lifecycle hooks, run ${COMPANION_NPX_COMMAND} automations install --client kimi, review .kimi-code/snipara-plugin, then install it in Kimi with /plugins install .kimi-code/snipara-plugin.`
|
|
4910
|
+
);
|
|
4911
|
+
printNextStep(
|
|
4912
|
+
"Keep manual approval for risky tools because Kimi hooks are fail-open and are not a standalone security boundary."
|
|
4913
|
+
);
|
|
4914
|
+
}
|
|
4862
4915
|
if (answers.aiClient === "codex") {
|
|
4863
4916
|
printNextStep(
|
|
4864
4917
|
"For Codex, merge .snipara/templates/codex-config.toml into ~/.codex/config.toml if the app does not read project .codex/config.toml."
|
|
@@ -5300,8 +5353,8 @@ function detectAiClient() {
|
|
|
5300
5353
|
if (fs.existsSync(path.join(process.cwd(), ".cursor"))) {
|
|
5301
5354
|
return "cursor";
|
|
5302
5355
|
}
|
|
5303
|
-
if (fs.existsSync(path.join(process.cwd(), ".
|
|
5304
|
-
return "
|
|
5356
|
+
if (fs.existsSync(path.join(process.cwd(), ".kimi-code"))) {
|
|
5357
|
+
return "kimi";
|
|
5305
5358
|
}
|
|
5306
5359
|
if (fs.existsSync(path.join(process.cwd(), ".gemini"))) {
|
|
5307
5360
|
return "gemini";
|
|
@@ -5321,8 +5374,8 @@ function detectAiClient() {
|
|
|
5321
5374
|
if (fs.existsSync(path.join(homedir(), ".cursor")) || process.env.CURSOR_EDITOR) {
|
|
5322
5375
|
return "cursor";
|
|
5323
5376
|
}
|
|
5324
|
-
if (fs.existsSync(path.join(homedir(), ".
|
|
5325
|
-
return "
|
|
5377
|
+
if (fs.existsSync(path.join(homedir(), ".kimi-code")) || process.env.KIMI_CODE_HOME) {
|
|
5378
|
+
return "kimi";
|
|
5326
5379
|
}
|
|
5327
5380
|
if (fs.existsSync(path.join(homedir(), ".gemini")) || process.env.GEMINI_CLI) {
|
|
5328
5381
|
return "gemini";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-snipara",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"chatgpt",
|
|
33
33
|
"openai",
|
|
34
34
|
"cursor",
|
|
35
|
-
"
|
|
35
|
+
"kimi",
|
|
36
36
|
"gemini",
|
|
37
37
|
"mistral",
|
|
38
38
|
"orca",
|