@dashclaw/cli 0.7.4 → 0.8.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.
- package/README.md +0 -61
- package/bin/dashclaw.js +2 -770
- package/lib/claude/install.js +411 -402
- package/lib/codex/install.js +10 -9
- package/lib/up/db.js +14 -0
- package/package.json +37 -37
- package/lib/code/apply.js +0 -164
- package/lib/code/codex-parser.vendored.js +0 -360
- package/lib/code/ingest-codex.js +0 -244
- package/lib/code/ingest.js +0 -261
- package/lib/code/memo.js +0 -57
- package/lib/code/vendored.js +0 -219
- package/lib/cost.js +0 -108
- package/lib/env.js +0 -69
- package/lib/posture.js +0 -45
package/README.md
CHANGED
|
@@ -119,18 +119,6 @@ dashclaw install claude --trial # browser signup on hosted.dash
|
|
|
119
119
|
|
|
120
120
|
Flow: preflight (`/api/health` + an authenticated read — nothing is written until it passes), hooks downloaded from your instance's `/downloads/dashclaw-claude-code-hooks.zip` (or copied from a repo checkout), `python3`/`python` resolved automatically, managed hook entries merged into `~/.claude/settings.json` (`.dashclaw-bak` backup, replace-on-reinstall), credentials written to `~/.dashclaw/claude-hooks/.env` (mode 600 — no secret lands in settings.json). Installs in **observe mode**; flip to enforce by setting `DASHCLAW_HOOK_MODE=enforce` in that `.env`. `--trial` defaults to the public trial at `https://hosted.dashclaw.io`; point it at your own hosted instance with `--endpoint <url>` (or `DASHCLAW_HOSTED_URL`).
|
|
121
121
|
|
|
122
|
-
### `dashclaw cost`
|
|
123
|
-
|
|
124
|
-
Spend readback from `GET /api/finops/spend` — your own Claude Code cost or the fleet rollup, straight from the terminal.
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
dashclaw cost # Claude Code spend, last 7 days (defaults)
|
|
128
|
-
dashclaw cost --lens claude-code --period 30d
|
|
129
|
-
dashclaw cost --lens fleet --period 90d # agent LLM cost + x402 purchases
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Outputs an aligned table (total, sessions, cache savings, by-project breakdown for the Claude-Code lens; Agent LLM / x402 / Total for the Fleet lens) plus a one-line summary. Unconfigured exits non-zero with a `dashclaw install claude` hint; bad `--lens`/`--period` values are rejected with usage text.
|
|
133
|
-
|
|
134
122
|
### `dashclaw doctor`
|
|
135
123
|
|
|
136
124
|
Diagnose your DashClaw instance **and this machine**. Remote checks cover database, configuration, auth, deployment, SDK reachability, governance, and data hygiene; local checks cover what the server can't see — a stale compiled `mcp-server/lib`, `.gitattributes` drift, a local DB schema behind code, a disabled OpenClaw runtime plugin, a stale global CLI shim, broken Claude hook installs, and leaked machine-scope `DASHCLAW_*` env vars.
|
|
@@ -148,28 +136,6 @@ dashclaw doctor --no-fix # accepted no-op alias (report-only is
|
|
|
148
136
|
|
|
149
137
|
Detect-only classes are never auto-fixed: leaked machine env vars (removal instructions printed) and OpenClaw gateway configs (remediation text printed). The `.gitattributes` restore runs only when the diff is provably line-ending/whitespace-only. Remote fixes go through `POST /api/doctor/fix`; fixes that need server filesystem access remain self-hoster territory via `npm run doctor` (also report-only by default now, same `--fix` opt-in).
|
|
150
138
|
|
|
151
|
-
### `dashclaw code`
|
|
152
|
-
|
|
153
|
-
Subcommand group for Code Sessions (Claude Code analytics, ported from AgentLens). Three actions:
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
dashclaw code ingest # walk ~/.claude/projects and POST every .jsonl
|
|
157
|
-
dashclaw code ingest --dry-run # preview the file list and payload shape without POSTing
|
|
158
|
-
dashclaw code ingest --projects-dir <p> # override the default projects directory (also reads $CLAUDE_PROJECTS_DIR)
|
|
159
|
-
|
|
160
|
-
dashclaw code memo --project <slug> # show the most recent weekly memo for a project
|
|
161
|
-
dashclaw code memo --project <slug> --save # write the memo to ./memos/<iso-week>.md
|
|
162
|
-
|
|
163
|
-
dashclaw code apply <manifest-id> --dest=<project-cwd> # apply an Optimal Files manifest locally
|
|
164
|
-
dashclaw code apply <manifest-id> --dest=<project-cwd> --dry-run
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
`ingest` stream-reads each session JSONL line-by-line and ships raw lines; large request bodies are brotli-compressed on the wire (via the `x-dashclaw-encoding: br` header — no base64 inflation) to fit Vercel's 4.5 MB per-request limit. It retries 429s and 5xxs with exponential backoff and throttles 150 ms between POSTs. Files over 40 MB raw are skipped with a `too_large` log entry. Never logs raw transcript content.
|
|
168
|
-
|
|
169
|
-
There is also `dashclaw code ingest-codex [--dry-run]`, which backfills Codex CLI transcripts from `~/.codex/sessions` (`--sessions-dir <path>` to override; `--out <dir>` for the local output directory).
|
|
170
|
-
|
|
171
|
-
`apply` fetches a manifest from `/api/code-sessions/manifests/<id>`, re-runs the secret scan, and writes the bundled files to `--dest`. Existing files get a three-way merge via the section-aware markdown merger; new files are written directly. Refuses any path outside `--dest` (path-traversal guard).
|
|
172
|
-
|
|
173
139
|
### `dashclaw install codex`
|
|
174
140
|
|
|
175
141
|
Provision DashClaw governance into the Codex CLI: writes an AGENTS.md governance block into the target project and (optionally) wires Codex's notify config.
|
|
@@ -184,33 +150,6 @@ dashclaw install codex --include-notify # also wire notify → dashclaw
|
|
|
184
150
|
|
|
185
151
|
Records a Codex turn-complete event as a DashClaw action record. Called by Codex's notify config (wired by `install codex --include-notify`); always exits 0 so Codex never sees an error from the spawn.
|
|
186
152
|
|
|
187
|
-
### `dashclaw prompts`
|
|
188
|
-
|
|
189
|
-
Prompt-library client: `list [--category C]`, `get <id>`, `versions <id>`, `render <templateId> [--version-id <vid>] [--var key=value] [--record]`, `create --name N --description D --category C` (admin), `add-version <id> --content C` (admin), `activate <id> <vid>` (admin), `stats [--template-id X]`.
|
|
190
|
-
|
|
191
|
-
### `dashclaw inbox`
|
|
192
|
-
|
|
193
|
-
Agent message inbox: `inbox list [--unread] [--limit N]`, `inbox read <id> [...]`, `inbox archive <id> [...]`.
|
|
194
|
-
|
|
195
|
-
### `dashclaw behavior`
|
|
196
|
-
|
|
197
|
-
Behavior Learning readback: `behavior status` (local recorder sample counts) and `behavior suggestions [--agent-id <id>]` (evidence-backed policy suggestions).
|
|
198
|
-
|
|
199
|
-
### `dashclaw posture` / `dashclaw next`
|
|
200
|
-
|
|
201
|
-
`posture` prints the governance posture score and the remediation queue; `posture resolve <key> [--snooze | --accept-risk] [--note "..."]` dispositions a finding. `next` prints the single top open governance gap and its fix.
|
|
202
|
-
|
|
203
|
-
### `dashclaw env`
|
|
204
|
-
|
|
205
|
-
Run a command with managed secrets injected in-memory (values never touch disk or the terminal):
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
dashclaw env [--agent <id>] -- node my-agent.js # inject managed secrets into the child env
|
|
209
|
-
dashclaw env # list secret NAMES + count (never values)
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
Fail-closed: if the secrets fetch fails, the child is not spawned.
|
|
213
|
-
|
|
214
153
|
### `dashclaw logout`
|
|
215
154
|
|
|
216
155
|
Remove the saved config at `~/.dashclaw/config.json`.
|