create-snipara 1.2.0 → 1.3.1
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 +134 -148
- package/dist/index.js +842 -317
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -1,213 +1,199 @@
|
|
|
1
1
|
# create-snipara
|
|
2
2
|
|
|
3
|
-
One-command setup for **Snipara MCP +
|
|
3
|
+
One-command setup and maintenance CLI for **Snipara MCP + snipara-companion + optional RLM-Runtime**.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx create-snipara
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
`create-snipara` is the entry point. It bootstraps and maintains a complete local Snipara setup for one project. It does not replace the runtime packages. Instead, it installs and wires them together:
|
|
10
|
+
|
|
11
|
+
- `snipara-mcp` for hosted MCP access
|
|
12
|
+
- `snipara-companion` for local `rlm-hook` workflows
|
|
13
|
+
- `rlm-runtime` for optional local code execution
|
|
14
|
+
- local config, env files, hook scripts, and a project companion pack
|
|
15
|
+
|
|
16
|
+
## Install Profiles
|
|
17
|
+
|
|
18
|
+
The CLI now works around explicit install profiles:
|
|
19
|
+
|
|
20
|
+
| Profile | What it installs | Best for |
|
|
21
|
+
| ------------------ | ----------------------------------------- | ----------------------------------------- |
|
|
22
|
+
| `hosted-only` | MCP config only | SaaS-first setups without local workflows |
|
|
23
|
+
| `hosted-companion` | MCP + `snipara-companion` | Recommended default |
|
|
24
|
+
| `full-stack` | MCP + `snipara-companion` + `rlm-runtime` | Hosted context plus local execution |
|
|
25
|
+
| `runtime-only` | `rlm-runtime` only | Local execution without hosted API |
|
|
26
|
+
|
|
27
|
+
Default profile: `hosted-companion`
|
|
28
|
+
|
|
9
29
|
## What It Does
|
|
10
30
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
31
|
+
- detects local environment and project state
|
|
32
|
+
- installs `snipara-companion` by default for local workflows
|
|
33
|
+
- installs `snipara-mcp` and optional `rlm-runtime`
|
|
34
|
+
- configures `.mcp.json`
|
|
35
|
+
- updates `.env`, `.env.local`, and `.env.example`
|
|
36
|
+
- generates `.snipara/companion/README.md`
|
|
37
|
+
- generates `.snipara/companion/commands.json`
|
|
38
|
+
- generates `.snipara/companion/doctor.json`
|
|
39
|
+
- optionally installs Claude Code hooks
|
|
40
|
+
- supports `doctor`, `repair`, `upgrade`, and `print-config`
|
|
16
41
|
|
|
17
|
-
##
|
|
42
|
+
## Quick Start
|
|
18
43
|
|
|
19
44
|
```bash
|
|
20
45
|
npx create-snipara
|
|
21
46
|
```
|
|
22
47
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| Prompt | Description |
|
|
26
|
-
|--------|-------------|
|
|
27
|
-
| **Project slug** | Auto-detected from git remote or directory name |
|
|
28
|
-
| **Project ID** | Optional, for advanced use cases |
|
|
29
|
-
| **API key type** | Project key, Team key, Sign up, or Skip |
|
|
30
|
-
| **API key** | Your Snipara API key |
|
|
31
|
-
| **AI client** | Claude Code, Cursor, Claude Desktop, or other |
|
|
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) |
|
|
48
|
+
The interactive flow now asks for:
|
|
35
49
|
|
|
36
|
-
|
|
50
|
+
- install profile
|
|
51
|
+
- project slug
|
|
52
|
+
- optional project id
|
|
53
|
+
- API key type and key when needed
|
|
54
|
+
- AI client
|
|
55
|
+
- whether hooks should be generated
|
|
56
|
+
- optional runtime provider config when `rlm-runtime` is installed
|
|
37
57
|
|
|
38
|
-
|
|
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** |
|
|
58
|
+
## Main Commands
|
|
44
59
|
|
|
45
|
-
###
|
|
60
|
+
### Install or initialize
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
```bash
|
|
63
|
+
npx create-snipara
|
|
64
|
+
npx create-snipara init
|
|
65
|
+
```
|
|
51
66
|
|
|
52
|
-
|
|
67
|
+
### Inspect local setup
|
|
53
68
|
|
|
54
69
|
```bash
|
|
55
|
-
|
|
56
|
-
|
|
70
|
+
npx create-snipara doctor
|
|
71
|
+
```
|
|
57
72
|
|
|
58
|
-
|
|
59
|
-
npx create-snipara --api-key rlm_your_project_key
|
|
73
|
+
Writes `.snipara/companion/doctor.json` and validates:
|
|
60
74
|
|
|
61
|
-
|
|
62
|
-
|
|
75
|
+
- local config files
|
|
76
|
+
- companion CLI presence
|
|
77
|
+
- runtime CLI presence
|
|
78
|
+
- environment files
|
|
79
|
+
- hosted MCP reachability when a live API key is available
|
|
63
80
|
|
|
64
|
-
|
|
65
|
-
npx create-snipara --slug my-project
|
|
81
|
+
### Repair local setup
|
|
66
82
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
```bash
|
|
84
|
+
npx create-snipara repair
|
|
85
|
+
```
|
|
70
86
|
|
|
71
|
-
|
|
72
|
-
npx create-snipara --skip-mcp # Skip snipara-mcp
|
|
73
|
-
npx create-snipara --skip-runtime # Skip rlm-runtime
|
|
74
|
-
npx create-snipara --skip-hooks # Skip Claude Code hooks
|
|
75
|
-
npx create-snipara --skip-test # Skip connection test
|
|
87
|
+
Rebuilds local project wiring:
|
|
76
88
|
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
- `.mcp.json`
|
|
90
|
+
- env files
|
|
91
|
+
- companion pack
|
|
92
|
+
- hooks when relevant
|
|
79
93
|
|
|
80
|
-
|
|
81
|
-
npx create-snipara --team-key rlm_team_xxx --slug my-project --skip-hooks
|
|
82
|
-
```
|
|
94
|
+
### Upgrade local pieces
|
|
83
95
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
### .mcp.json
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"mcpServers": {
|
|
91
|
-
"snipara": {
|
|
92
|
-
"type": "http",
|
|
93
|
-
"url": "https://api.snipara.com/mcp/your-project",
|
|
94
|
-
"headers": {
|
|
95
|
-
"X-API-Key": "rlm_your_key"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"rlm-runtime": {
|
|
99
|
-
"type": "http",
|
|
100
|
-
"url": "http://localhost:8765/mcp",
|
|
101
|
-
"headers": {}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
96
|
+
```bash
|
|
97
|
+
npx create-snipara upgrade
|
|
105
98
|
```
|
|
106
99
|
|
|
107
|
-
|
|
100
|
+
Upgrades installed local components and refreshes the companion pack.
|
|
108
101
|
|
|
109
|
-
|
|
110
|
-
- `snipara-session.sh` - Auto-remembers commits
|
|
111
|
-
- `snipara-compact.sh` - Saves context before compaction
|
|
102
|
+
### Print inferred config
|
|
112
103
|
|
|
113
|
-
|
|
104
|
+
```bash
|
|
105
|
+
npx create-snipara print-config
|
|
106
|
+
npx create-snipara print-config --json
|
|
107
|
+
```
|
|
114
108
|
|
|
115
|
-
|
|
109
|
+
## Common Flags
|
|
116
110
|
|
|
117
111
|
```bash
|
|
118
|
-
#
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
#
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
# Use an explicit install profile
|
|
113
|
+
npx create-snipara --profile hosted-companion
|
|
114
|
+
npx create-snipara --profile full-stack
|
|
115
|
+
|
|
116
|
+
# Runtime-only local execution
|
|
117
|
+
npx create-snipara --runtime-only
|
|
118
|
+
|
|
119
|
+
# Non-interactive setup
|
|
120
|
+
npx create-snipara -y --api-key rlm_xxx --slug my-project
|
|
121
|
+
|
|
122
|
+
# Skip selected layers
|
|
123
|
+
npx create-snipara --skip-companion
|
|
124
|
+
npx create-snipara --skip-mcp
|
|
125
|
+
npx create-snipara --skip-runtime
|
|
126
|
+
npx create-snipara --skip-hooks
|
|
127
|
+
|
|
128
|
+
# Force extra layers during maintenance
|
|
129
|
+
npx create-snipara repair --with-hooks
|
|
130
|
+
npx create-snipara upgrade --with-runtime
|
|
126
131
|
```
|
|
127
132
|
|
|
128
|
-
##
|
|
133
|
+
## Packaging Model
|
|
129
134
|
|
|
130
|
-
|
|
135
|
+
The intended split is:
|
|
131
136
|
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
- `create-snipara`: install, inspect, repair, and upgrade the local project setup
|
|
138
|
+
- `snipara-companion`: ongoing local runtime workflows through `rlm-hook`
|
|
139
|
+
- `snipara-mcp`: hosted MCP bridge
|
|
140
|
+
- `rlm-runtime`: optional local execution engine
|
|
134
141
|
|
|
135
|
-
|
|
142
|
+
This keeps setup and runtime separated while still giving the user one obvious command to start from.
|
|
136
143
|
|
|
137
|
-
|
|
138
|
-
2. Config is at `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
144
|
+
## Generated Local Pack
|
|
139
145
|
|
|
140
|
-
|
|
146
|
+
After setup, the project gets a local pack at `.snipara/companion/`:
|
|
141
147
|
|
|
142
|
-
|
|
148
|
+
- `README.md`: local usage guidance
|
|
149
|
+
- `commands.json`: starter commands for the current project
|
|
150
|
+
- `doctor.json`: most recent validation report
|
|
143
151
|
|
|
144
|
-
|
|
152
|
+
This pack is meant to be the local source of truth for machine-level setup.
|
|
145
153
|
|
|
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
|
-
```
|
|
154
|
+
## API Key Requirements
|
|
152
155
|
|
|
153
|
-
|
|
156
|
+
| Tooling | Snipara API key | LLM API key |
|
|
157
|
+
| ------------------------------------ | -------------------- | ----------- |
|
|
158
|
+
| Hosted MCP queries | Required | Not needed |
|
|
159
|
+
| Memory / planning tools | Required | Not needed |
|
|
160
|
+
| `snipara-companion` hosted workflows | Required | Not needed |
|
|
161
|
+
| `rlm-runtime` `execute_python` MCP | Not needed | Not needed |
|
|
162
|
+
| `rlm run` / `rlm agent` CLI | Optional for context | Required |
|
|
154
163
|
|
|
155
|
-
|
|
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 |
|
|
164
|
+
## Example Flows
|
|
160
165
|
|
|
161
|
-
|
|
162
|
-
Or configure later:
|
|
166
|
+
### Default recommended setup
|
|
163
167
|
|
|
164
168
|
```bash
|
|
165
|
-
|
|
169
|
+
npx create-snipara --profile hosted-companion
|
|
166
170
|
```
|
|
167
171
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
For `rlm run` and `rlm agent`, you need an LLM provider API key:
|
|
172
|
+
### Full local stack
|
|
171
173
|
|
|
172
174
|
```bash
|
|
173
|
-
|
|
174
|
-
export OPENAI_API_KEY=sk-...
|
|
175
|
-
# or
|
|
176
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
177
|
-
|
|
178
|
-
# Run commands
|
|
179
|
-
rlm init # Initialize configuration
|
|
180
|
-
rlm run --env docker # Run with Docker isolation
|
|
181
|
-
rlm agent "task" # Autonomous agent mode
|
|
182
|
-
rlm visualize # Launch trajectory dashboard
|
|
175
|
+
npx create-snipara --profile full-stack
|
|
183
176
|
```
|
|
184
177
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
After setup, you have access to 43+ MCP tools:
|
|
178
|
+
### Repair after a broken workstation or new shell
|
|
188
179
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
| **Memory** | `rlm_remember`, `rlm_recall`, `rlm_memories`, `rlm_forget` |
|
|
194
|
-
| **Execution** | `execute_python`, `get_repl_context` (via RLM-Runtime) |
|
|
195
|
-
| **Swarms** | `rlm_swarm_create`, `rlm_claim`, `rlm_task_create` |
|
|
180
|
+
```bash
|
|
181
|
+
npx create-snipara repair
|
|
182
|
+
npx create-snipara doctor
|
|
183
|
+
```
|
|
196
184
|
|
|
197
|
-
|
|
185
|
+
### Check what the CLI inferred from this project
|
|
198
186
|
|
|
199
|
-
|
|
200
|
-
-
|
|
201
|
-
|
|
187
|
+
```bash
|
|
188
|
+
npx create-snipara print-config --json
|
|
189
|
+
```
|
|
202
190
|
|
|
203
|
-
##
|
|
191
|
+
## Local Tarball Testing
|
|
204
192
|
|
|
205
|
-
|
|
206
|
-
- **Documentation**: https://snipara.com/docs
|
|
207
|
-
- **Dashboard**: https://snipara.com/dashboard
|
|
208
|
-
- **npm**: https://www.npmjs.com/package/create-snipara
|
|
209
|
-
- **Support**: hello@starbox-group.com
|
|
193
|
+
When testing a locally packed tarball, use `npm exec --package` instead of `npx`, for example:
|
|
210
194
|
|
|
211
|
-
|
|
195
|
+
```bash
|
|
196
|
+
npm exec --package ./create-snipara-1.3.1.tgz create-snipara -- --help
|
|
197
|
+
```
|
|
212
198
|
|
|
213
|
-
|
|
199
|
+
This avoids `npx` resolution issues with unpublished tarballs.
|