create-snipara 1.1.0 → 1.2.0

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.
Files changed (3) hide show
  1. package/README.md +84 -11
  2. package/dist/index.js +52 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -26,29 +26,59 @@ You'll be prompted for:
26
26
  |--------|-------------|
27
27
  | **Project slug** | Auto-detected from git remote or directory name |
28
28
  | **Project ID** | Optional, for advanced use cases |
29
- | **API key** | Your Snipara API key (or sign up for free) |
29
+ | **API key type** | Project key, Team key, Sign up, or Skip |
30
+ | **API key** | Your Snipara API key |
30
31
  | **AI client** | Claude Code, Cursor, Claude Desktop, or other |
31
32
  | **Packages** | Choose what to install |
33
+ | **LLM provider** | OpenAI, Anthropic, or None (for `rlm run`/`rlm agent` CLI) |
34
+ | **Run rlm init** | Optional - configure execution environment (sandbox/docker/local) |
35
+
36
+ ## API Key Requirements
37
+
38
+ | Tool | Snipara API Key | LLM API Key (OpenAI/Anthropic) |
39
+ |------|-----------------|-------------------------------|
40
+ | `execute_python` MCP | Not needed | Not needed (your AI client is the LLM) |
41
+ | `rlm_context_query` MCP | **Required** | Not needed |
42
+ | `rlm_remember`/`rlm_recall` | **Required** | Not needed |
43
+ | `rlm run` / `rlm agent` CLI | Optional (for context) | **Required** |
44
+
45
+ ### Key Types
46
+
47
+ | Type | Description |
48
+ |------|-------------|
49
+ | **Project API key** | Access to a single project |
50
+ | **Team API key** | Access to all projects in your team |
32
51
 
33
52
  ## Command Line Options
34
53
 
35
54
  ```bash
36
- # Use existing API key
37
- npx create-snipara --api-key rlm_your_key_here
55
+ # Basic usage
56
+ npx create-snipara
57
+
58
+ # With project API key
59
+ npx create-snipara --api-key rlm_your_project_key
60
+
61
+ # With team API key (access all team projects)
62
+ npx create-snipara --team-key rlm_your_team_key
38
63
 
39
64
  # Specify project slug
40
65
  npx create-snipara --slug my-project
41
66
 
67
+ # Runtime only - no Snipara API key needed
68
+ # (for execute_python MCP tool only)
69
+ npx create-snipara --runtime-only
70
+
42
71
  # Skip specific installations
43
72
  npx create-snipara --skip-mcp # Skip snipara-mcp
44
73
  npx create-snipara --skip-runtime # Skip rlm-runtime
45
74
  npx create-snipara --skip-hooks # Skip Claude Code hooks
75
+ npx create-snipara --skip-test # Skip connection test
46
76
 
47
- # Accept all defaults
48
- npx create-snipara -y
77
+ # Accept all defaults (non-interactive)
78
+ npx create-snipara -y --api-key rlm_xxx --slug my-project
49
79
 
50
- # Full example
51
- npx create-snipara --api-key rlm_xxx --slug my-project --skip-hooks
80
+ # Full example with team key
81
+ npx create-snipara --team-key rlm_team_xxx --slug my-project --skip-hooks
52
82
  ```
53
83
 
54
84
  ## What Gets Created
@@ -85,8 +115,14 @@ npx create-snipara --api-key rlm_xxx --slug my-project --skip-hooks
85
115
  Updates `.env.example` and `.env.local` with:
86
116
 
87
117
  ```bash
118
+ # Snipara Configuration
88
119
  SNIPARA_API_KEY=your_api_key
89
120
  SNIPARA_PROJECT_SLUG=your-project
121
+
122
+ # RLM-Runtime LLM Provider (if configured)
123
+ OPENAI_API_KEY=sk-...
124
+ # or
125
+ ANTHROPIC_API_KEY=sk-ant-...
90
126
  ```
91
127
 
92
128
  ## After Installation
@@ -101,12 +137,48 @@ SNIPARA_PROJECT_SLUG=your-project
101
137
  1. Restart Claude Desktop
102
138
  2. Config is at `~/Library/Application Support/Claude/claude_desktop_config.json`
103
139
 
104
- ### RLM-Runtime Commands
140
+ ### RLM-Runtime Usage
141
+
142
+ **MCP Tools (no LLM API key needed):**
143
+
144
+ Your AI client (Claude, GPT, etc.) provides the LLM - no additional API key required.
145
+
146
+ ```
147
+ • execute_python - Run Python in sandbox
148
+ • get_repl_context - Get session variables
149
+ • set_repl_context - Set session variables
150
+ • clear_repl_context - Clear session
151
+ ```
152
+
153
+ **Execution Environments:**
154
+
155
+ | Environment | Description | Use Case |
156
+ |-------------|-------------|----------|
157
+ | **sandbox** | RestrictedPython, safe stdlib only | Default, most secure |
158
+ | **docker** | Full Python in isolated container | Recommended for full features |
159
+ | **local** | Full access, no isolation | Development only |
160
+
161
+ During setup, you can run `rlm init` to configure the default environment.
162
+ Or configure later:
105
163
 
106
164
  ```bash
165
+ rlm init # Interactive configuration
166
+ ```
167
+
168
+ **CLI Commands (requires LLM API key):**
169
+
170
+ For `rlm run` and `rlm agent`, you need an LLM provider API key:
171
+
172
+ ```bash
173
+ # Set your LLM provider
174
+ export OPENAI_API_KEY=sk-...
175
+ # or
176
+ export ANTHROPIC_API_KEY=sk-ant-...
177
+
178
+ # Run commands
107
179
  rlm init # Initialize configuration
108
180
  rlm run --env docker # Run with Docker isolation
109
- rlm serve # Start MCP server
181
+ rlm agent "task" # Autonomous agent mode
110
182
  rlm visualize # Launch trajectory dashboard
111
183
  ```
112
184
 
@@ -119,7 +191,7 @@ After setup, you have access to 43+ MCP tools:
119
191
  | **Context** | `rlm_context_query`, `rlm_ask`, `rlm_search`, `rlm_sections` |
120
192
  | **Planning** | `rlm_plan`, `rlm_decompose`, `rlm_multi_query` |
121
193
  | **Memory** | `rlm_remember`, `rlm_recall`, `rlm_memories`, `rlm_forget` |
122
- | **Execution** | `execute_python`, `rlm_agent_run` (via RLM-Runtime) |
194
+ | **Execution** | `execute_python`, `get_repl_context` (via RLM-Runtime) |
123
195
  | **Swarms** | `rlm_swarm_create`, `rlm_claim`, `rlm_task_create` |
124
196
 
125
197
  ## Requirements
@@ -133,7 +205,8 @@ After setup, you have access to 43+ MCP tools:
133
205
  - **Website**: https://snipara.com
134
206
  - **Documentation**: https://snipara.com/docs
135
207
  - **Dashboard**: https://snipara.com/dashboard
136
- - **Support**: hello@snipara.com
208
+ - **npm**: https://www.npmjs.com/package/create-snipara
209
+ - **Support**: hello@starbox-group.com
137
210
 
138
211
  ## License
139
212
 
package/dist/index.js CHANGED
@@ -7,9 +7,9 @@ import chalk from "chalk";
7
7
  import ora from "ora";
8
8
  import fs from "fs";
9
9
  import path from "path";
10
- import { execSync } from "child_process";
10
+ import { execSync, spawn } from "child_process";
11
11
  import { homedir } from "os";
12
- var VERSION = "1.1.0";
12
+ var VERSION = "1.2.0";
13
13
  var BASE_URL = "https://www.snipara.com";
14
14
  var API_URL = "https://api.snipara.com";
15
15
  async function main() {
@@ -29,6 +29,9 @@ async function main() {
29
29
  await testConnection(answers);
30
30
  }
31
31
  printSuccess(answers);
32
+ if (answers.runRlmInit && answers.installRuntime) {
33
+ await runRlmInit();
34
+ }
32
35
  }
33
36
  function printBanner() {
34
37
  console.log(
@@ -247,6 +250,20 @@ async function gatherConfiguration(options) {
247
250
  llmProvider = llmResponse.llmProvider;
248
251
  llmApiKey = llmResponse.llmApiKey;
249
252
  }
253
+ let runRlmInit2 = false;
254
+ if (packages.includes("runtime")) {
255
+ console.log(chalk.cyan("\n \u2139\uFE0F RLM-Runtime Execution Environments:\n"));
256
+ console.log(chalk.dim(" \u2022 sandbox - RestrictedPython, safe stdlib only (default)"));
257
+ console.log(chalk.dim(" \u2022 docker - Full Python in isolated container (recommended)"));
258
+ console.log(chalk.dim(" \u2022 local - Full access, no isolation (development only)\n"));
259
+ const initResponse = await prompts({
260
+ type: "confirm",
261
+ name: "runRlmInit",
262
+ message: "Run 'rlm init' now to configure execution environment?",
263
+ initial: false
264
+ });
265
+ runRlmInit2 = initResponse.runRlmInit || false;
266
+ }
250
267
  return {
251
268
  projectSlug: response.projectSlug,
252
269
  projectId: response.projectId || "",
@@ -257,7 +274,8 @@ async function gatherConfiguration(options) {
257
274
  installHooks: packages.includes("hooks"),
258
275
  aiClient: response.aiClient || detectedClient,
259
276
  llmProvider,
260
- llmApiKey
277
+ llmApiKey,
278
+ runRlmInit: runRlmInit2
261
279
  };
262
280
  }
263
281
  async function handleSignup() {
@@ -610,6 +628,32 @@ ${envVars}
610
628
  }
611
629
  }
612
630
  }
631
+ async function runRlmInit() {
632
+ console.log(chalk.bold("\n\u{1F527} Running RLM-Runtime Configuration\n"));
633
+ console.log(chalk.dim(" Starting 'rlm init' - follow the prompts to configure execution environment...\n"));
634
+ return new Promise((resolve) => {
635
+ const child = spawn("rlm", ["init"], {
636
+ stdio: "inherit",
637
+ shell: true
638
+ });
639
+ child.on("close", (code) => {
640
+ if (code === 0) {
641
+ console.log(chalk.green("\n \u2713 RLM-Runtime configured successfully"));
642
+ } else if (code !== null) {
643
+ console.log(chalk.yellow(`
644
+ \u26A0\uFE0F rlm init exited with code ${code}`));
645
+ console.log(chalk.dim(" You can run 'rlm init' manually later to configure execution environment."));
646
+ }
647
+ resolve();
648
+ });
649
+ child.on("error", (error) => {
650
+ console.log(chalk.yellow(`
651
+ \u26A0\uFE0F Could not run rlm init: ${error.message}`));
652
+ console.log(chalk.dim(" Run 'rlm init' manually after installation completes."));
653
+ resolve();
654
+ });
655
+ });
656
+ }
613
657
  async function testConnection(answers) {
614
658
  console.log(chalk.bold("\n\u{1F50C} Testing Connection\n"));
615
659
  const spinner = ora("Connecting to Snipara API...").start();
@@ -708,10 +752,14 @@ function printSuccess(answers) {
708
752
  console.log(chalk.dim(" \u2022 rlm run - Requires OPENAI_API_KEY or ANTHROPIC_API_KEY"));
709
753
  console.log(chalk.dim(" \u2022 rlm agent - Requires OPENAI_API_KEY or ANTHROPIC_API_KEY"));
710
754
  }
755
+ if (!answers.runRlmInit) {
756
+ console.log(chalk.dim("\n To configure execution environment (sandbox/docker/local):"));
757
+ console.log(chalk.cyan(" rlm init"));
758
+ }
711
759
  }
712
760
  console.log(chalk.dim(`
713
761
  Docs: ${BASE_URL}/docs`));
714
- console.log(chalk.dim(" Support: hello@snipara.com\n"));
762
+ console.log(chalk.dim(" Support: hello@starbox-group.com\n"));
715
763
  }
716
764
  function detectProjectSlug() {
717
765
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Initialize Snipara MCP + RLM-Runtime with a single command - context optimization, semantic memory, and safe code execution",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",