sidecar-cli 0.1.1 → 0.1.2-beta.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 +132 -1
- package/dist/cli.js +656 -68
- package/dist/lib/output.js +3 -0
- package/dist/lib/paths.js +3 -0
- package/dist/lib/ui.js +109 -0
- package/dist/prompts/prompt-compiler.js +88 -0
- package/dist/prompts/prompt-service.js +35 -0
- package/dist/runners/claude-runner.js +38 -0
- package/dist/runners/codex-runner.js +38 -0
- package/dist/runners/config.js +39 -0
- package/dist/runners/factory.js +10 -0
- package/dist/runners/runner-adapter.js +1 -0
- package/dist/runs/run-record.js +97 -0
- package/dist/runs/run-repository.js +99 -0
- package/dist/runs/run-service.js +27 -0
- package/dist/services/capabilities-service.js +193 -14
- package/dist/services/event-ingest-service.js +72 -0
- package/dist/services/export-service.js +79 -0
- package/dist/services/run-orchestrator-service.js +59 -0
- package/dist/services/run-review-service.js +76 -0
- package/dist/services/task-orchestration-service.js +94 -0
- package/dist/tasks/task-packet.js +132 -0
- package/dist/tasks/task-repository.js +78 -0
- package/dist/tasks/task-service.js +79 -0
- package/dist/types/api.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,6 +21,12 @@ Install globally (stable):
|
|
|
21
21
|
npm install -g sidecar-cli
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
Note on npm deprecation warnings:
|
|
25
|
+
|
|
26
|
+
- You may see a transitive warning for `prebuild-install@7.1.3` during install.
|
|
27
|
+
- This currently comes from `better-sqlite3` (Sidecar's SQLite dependency), not from Sidecar code directly.
|
|
28
|
+
- Sidecar still installs/works normally; we will update when upstream dependency chain moves off it.
|
|
29
|
+
|
|
24
30
|
Install beta:
|
|
25
31
|
|
|
26
32
|
```bash
|
|
@@ -103,7 +109,11 @@ Global:
|
|
|
103
109
|
|
|
104
110
|
- `sidecar init [--force] [--name <project-name>] [--json]`
|
|
105
111
|
- `sidecar status [--json]`
|
|
112
|
+
- `sidecar preferences show [--json]`
|
|
113
|
+
- `sidecar ui [--no-open] [--port <port>] [--install-only] [--project <path>] [--reinstall]`
|
|
106
114
|
- `sidecar capabilities --json`
|
|
115
|
+
- `sidecar event add ... [--json]`
|
|
116
|
+
- `sidecar export [--format json|jsonl] [--output <path>]`
|
|
107
117
|
- `sidecar help`
|
|
108
118
|
|
|
109
119
|
Context and summary:
|
|
@@ -168,7 +178,18 @@ Optional local enforcement:
|
|
|
168
178
|
npm run install:hooks
|
|
169
179
|
```
|
|
170
180
|
|
|
171
|
-
This
|
|
181
|
+
This is optional and per-repository clone. `sidecar init` does not install git hooks automatically.
|
|
182
|
+
|
|
183
|
+
This installs a pre-commit guard that checks staged non-doc code changes.
|
|
184
|
+
If staged code changes are present, commit is blocked unless both are recorded since the last commit:
|
|
185
|
+
|
|
186
|
+
- a `worklog` event
|
|
187
|
+
- a `summary refresh` event
|
|
188
|
+
|
|
189
|
+
The guard command is:
|
|
190
|
+
|
|
191
|
+
- `npm run sidecar:reminder -- --staged --enforce`
|
|
192
|
+
|
|
172
193
|
If a pre-commit hook already exists, Sidecar will not overwrite it unless you run:
|
|
173
194
|
|
|
174
195
|
```bash
|
|
@@ -205,6 +226,54 @@ Primary tables:
|
|
|
205
226
|
|
|
206
227
|
No network dependency is required for normal operation.
|
|
207
228
|
|
|
229
|
+
## Optional local UI
|
|
230
|
+
|
|
231
|
+
`sidecar ui` launches a local browser UI for the selected Sidecar project.
|
|
232
|
+
|
|
233
|
+
Lazy-install behavior:
|
|
234
|
+
|
|
235
|
+
1. `sidecar ui` resolves the nearest `.sidecar` project root (or uses `--project`).
|
|
236
|
+
2. Sidecar checks for `@sidecar/ui` in `~/.sidecar/ui`.
|
|
237
|
+
3. If missing/incompatible, Sidecar installs or updates it automatically.
|
|
238
|
+
4. Sidecar starts a local UI server and opens the browser (unless `--no-open`).
|
|
239
|
+
|
|
240
|
+
UI runtime location:
|
|
241
|
+
|
|
242
|
+
- `~/.sidecar/ui`
|
|
243
|
+
- the CLI installs `@sidecar/ui` here (not in your project repo)
|
|
244
|
+
|
|
245
|
+
Version compatibility rule:
|
|
246
|
+
|
|
247
|
+
- CLI and UI must share the same major version.
|
|
248
|
+
- If majors differ, `sidecar ui` auto-reinstalls/updates UI.
|
|
249
|
+
|
|
250
|
+
Common examples:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
sidecar ui
|
|
254
|
+
sidecar ui --no-open --port 4311
|
|
255
|
+
sidecar ui --install-only
|
|
256
|
+
sidecar ui --project ../other-repo
|
|
257
|
+
sidecar ui --reinstall
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Initial UI screens:
|
|
261
|
+
|
|
262
|
+
- Overview: project info, active session, recent decisions/worklogs, open tasks, recent notes
|
|
263
|
+
- Timeline: recent events in chronological order
|
|
264
|
+
- Tasks: open and completed tasks
|
|
265
|
+
- Decisions: decision records with summary and timestamps
|
|
266
|
+
- Preferences: `.sidecar/preferences.json` and `.sidecar/summary.md`
|
|
267
|
+
|
|
268
|
+
UI write support (v1):
|
|
269
|
+
|
|
270
|
+
- Add notes from Overview
|
|
271
|
+
- Add open tasks from Overview
|
|
272
|
+
- Edit `.sidecar/preferences.json` from Preferences
|
|
273
|
+
- `output.humanTime` controls timestamp style in human-readable CLI output:
|
|
274
|
+
- `true`: friendly local times (for example `3/18/2026, 11:51 AM`)
|
|
275
|
+
- `false`: raw ISO-style timestamps
|
|
276
|
+
|
|
208
277
|
## JSON output
|
|
209
278
|
|
|
210
279
|
Most commands support `--json` and return structured output:
|
|
@@ -216,6 +285,68 @@ Most commands support `--json` and return structured output:
|
|
|
216
285
|
|
|
217
286
|
This makes Sidecar easy to automate from scripts and AI agents.
|
|
218
287
|
|
|
288
|
+
## Integration API
|
|
289
|
+
|
|
290
|
+
Sidecar CLI is the first integration API for scripts, agents, and local tooling.
|
|
291
|
+
|
|
292
|
+
Standard JSON envelope:
|
|
293
|
+
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"ok": true,
|
|
297
|
+
"version": "1.0",
|
|
298
|
+
"command": "task add",
|
|
299
|
+
"data": {},
|
|
300
|
+
"errors": []
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Failure envelope:
|
|
305
|
+
|
|
306
|
+
```json
|
|
307
|
+
{
|
|
308
|
+
"ok": false,
|
|
309
|
+
"version": "1.0",
|
|
310
|
+
"command": "task add",
|
|
311
|
+
"data": null,
|
|
312
|
+
"errors": ["..."]
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Generic event ingest:
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
sidecar event add --type decision --title "Use SQLite" --summary "Simple local storage for v1" --created-by agent --source cli --json
|
|
320
|
+
sidecar event add --json-input '{"type":"note","summary":"Captured context","created_by":"agent"}' --json
|
|
321
|
+
cat event.json | sidecar event add --stdin --json
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Capabilities metadata:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
sidecar capabilities --json
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Includes:
|
|
331
|
+
|
|
332
|
+
- `cli_version`
|
|
333
|
+
- `json_contract_version`
|
|
334
|
+
- `features`
|
|
335
|
+
- command and option metadata
|
|
336
|
+
|
|
337
|
+
Export project memory:
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
sidecar export --format json
|
|
341
|
+
sidecar export --format json --output ./exports/sidecar.json
|
|
342
|
+
sidecar export --format jsonl > sidecar-events.jsonl
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
JSONL note:
|
|
346
|
+
|
|
347
|
+
- JSONL export currently emits events only, one JSON object per line.
|
|
348
|
+
- each JSONL line includes `"version": "1.0"` and `"record_type": "event"`.
|
|
349
|
+
|
|
219
350
|
## Release and distribution
|
|
220
351
|
|
|
221
352
|
See [RELEASE.md](./RELEASE.md) for publishing/release details.
|