@ai-dossier/cli 0.5.0 → 0.6.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 +351 -23
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/checksum.d.ts.map +1 -1
- package/dist/commands/checksum.js +1 -2
- package/dist/commands/checksum.js.map +1 -1
- package/dist/commands/config-cmd.js +1 -1
- package/dist/commands/create.js +3 -3
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/export.d.ts +1 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +9 -0
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/get.d.ts.map +1 -1
- package/dist/commands/get.js +6 -5
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/info.js +1 -2
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/list.d.ts +1 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +155 -146
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/publish.js +1 -2
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/pull.d.ts +1 -0
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +12 -2
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +10 -12
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/search.d.ts +1 -0
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +22 -34
- package/dist/commands/search.js.map +1 -1
- package/dist/config.d.ts +11 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/credentials.d.ts +9 -1
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +10 -1
- package/dist/credentials.js.map +1 -1
- package/dist/helpers.d.ts +49 -0
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +102 -2
- package/dist/helpers.js.map +1 -1
- package/dist/multi-registry.d.ts +6 -4
- package/dist/multi-registry.d.ts.map +1 -1
- package/dist/multi-registry.js +38 -22
- package/dist/multi-registry.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ai-dossier/cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@ai-dossier/cli)
|
|
4
|
+
[](https://www.npmjs.com/package/@ai-dossier/cli)
|
|
5
|
+
[](https://github.com/imboard-ai/ai-dossier/blob/main/LICENSE)
|
|
2
6
|
|
|
3
7
|
**Enforce cryptographic verification before executing dossiers.**
|
|
4
8
|
|
|
@@ -148,10 +152,126 @@ safe-run-dossier https://example.com/dossier.ds.md cursor
|
|
|
148
152
|
|
|
149
153
|
---
|
|
150
154
|
|
|
155
|
+
## Registry Commands
|
|
156
|
+
|
|
157
|
+
### Search
|
|
158
|
+
|
|
159
|
+
Search for dossiers across all configured registries:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Basic search
|
|
163
|
+
ai-dossier search "deployment"
|
|
164
|
+
|
|
165
|
+
# Filter by category
|
|
166
|
+
ai-dossier search "ci" --category devops
|
|
167
|
+
|
|
168
|
+
# Search dossier body content (-c is short for --content)
|
|
169
|
+
ai-dossier search "docker" -c
|
|
170
|
+
|
|
171
|
+
# Limit total results
|
|
172
|
+
ai-dossier search "setup" --limit 50
|
|
173
|
+
|
|
174
|
+
# Paginate results
|
|
175
|
+
ai-dossier search "setup" --page 2 --per-page 10
|
|
176
|
+
|
|
177
|
+
# JSON output
|
|
178
|
+
ai-dossier search "auth" --json
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### List
|
|
182
|
+
|
|
183
|
+
List dossiers from the registry, a local directory, or a GitHub repo:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# List all registry dossiers
|
|
187
|
+
ai-dossier list --source registry
|
|
188
|
+
|
|
189
|
+
# List with JSON output
|
|
190
|
+
ai-dossier list --source registry --json
|
|
191
|
+
|
|
192
|
+
# Paginate registry results
|
|
193
|
+
ai-dossier list --source registry --page 2 --per-page 10
|
|
194
|
+
|
|
195
|
+
# Filter by category (registry mode)
|
|
196
|
+
ai-dossier list --source registry --category security
|
|
197
|
+
|
|
198
|
+
# List local dossiers (-r is short for --recursive)
|
|
199
|
+
ai-dossier list .
|
|
200
|
+
ai-dossier list ./dossiers -r
|
|
201
|
+
|
|
202
|
+
# List from a GitHub repo
|
|
203
|
+
ai-dossier list github:owner/repo
|
|
204
|
+
|
|
205
|
+
# Filter local/GitHub results by risk level or signed status
|
|
206
|
+
ai-dossier list . --risk high
|
|
207
|
+
ai-dossier list . --signed-only
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Pull
|
|
211
|
+
|
|
212
|
+
Download dossiers from the registry to the local cache (`~/.dossier/cache/`):
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Pull a dossier (latest version)
|
|
216
|
+
ai-dossier pull org/my-dossier
|
|
217
|
+
|
|
218
|
+
# Pull a specific version
|
|
219
|
+
ai-dossier pull org/my-dossier@1.2.0
|
|
220
|
+
|
|
221
|
+
# Pull multiple dossiers
|
|
222
|
+
ai-dossier pull org/dossier-a org/dossier-b
|
|
223
|
+
|
|
224
|
+
# Force re-download
|
|
225
|
+
ai-dossier pull org/my-dossier --force
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Pulled dossiers are cached locally with checksum verification. Subsequent `pull` calls skip the download if the version is already cached (use `--force` to override).
|
|
229
|
+
|
|
230
|
+
### Export
|
|
231
|
+
|
|
232
|
+
Download a dossier and save it to a local file:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# Export to default filename (org-name.ds.md)
|
|
236
|
+
ai-dossier export org/my-dossier
|
|
237
|
+
|
|
238
|
+
# Export to a specific file
|
|
239
|
+
ai-dossier export org/my-dossier -o ./local-copy.ds.md
|
|
240
|
+
|
|
241
|
+
# Print to stdout (for piping)
|
|
242
|
+
ai-dossier export org/my-dossier --stdout
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
151
247
|
## Multi-Registry Resolution
|
|
152
248
|
|
|
153
249
|
The CLI queries all configured registries in parallel when resolving dossiers (e.g., `dossier get`, `dossier run`, `dossier pull`). This uses `Promise.allSettled()` so a single registry failure does not block results from other registries.
|
|
154
250
|
|
|
251
|
+
### Exit Codes
|
|
252
|
+
|
|
253
|
+
Multi-registry commands use the following exit codes:
|
|
254
|
+
|
|
255
|
+
| Command | `0` (Success) | `1` (Failure) | `2` (Config/Runtime Error) |
|
|
256
|
+
|---------|---------------|---------------|---------------------------|
|
|
257
|
+
| `get` | Dossier found | Not found in any registry, or all registries failed | — |
|
|
258
|
+
| `list --source registry` | Results returned, including when all registries fail (empty list + warnings) | Unexpected runtime error | — |
|
|
259
|
+
| `search` | Results returned, including when all registries fail (no matches + warnings) | Unexpected runtime error | — |
|
|
260
|
+
| `pull` | At least one item pulled successfully (per-item errors are printed as warnings) | All requested items failed to pull | — |
|
|
261
|
+
| `run` | Dossier executed successfully | Not found, fetch failed, or verification failed | No LLM detected, unknown LLM, or execution failed |
|
|
262
|
+
|
|
263
|
+
**Partial failures**: When some registries fail but at least one succeeds, `list` returns exit `0` with a warning showing which registries failed:
|
|
264
|
+
```
|
|
265
|
+
⚠️ Registry 'internal': connection timeout
|
|
266
|
+
⚠️ Showing partial results (1/2 registries responded)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
When **all** registries fail, `list` and `search` still exit `0` but display per-registry error warnings and report no results found.
|
|
270
|
+
|
|
271
|
+
### No Registries Configured
|
|
272
|
+
|
|
273
|
+
If no registries are configured (no user config, no project `.dossierrc.json`, no `DOSSIER_REGISTRY_URL` env var), the CLI falls back to the hardcoded public registry (`https://dossier-registry.vercel.app`). Commands proceed normally — there is no error or special exit code for this scenario.
|
|
274
|
+
|
|
155
275
|
### Error Handling
|
|
156
276
|
|
|
157
277
|
All multi-registry operations return structured errors alongside results:
|
|
@@ -164,7 +284,7 @@ $ dossier get org/my-dossier
|
|
|
164
284
|
|
|
165
285
|
When **all registries fail**, the CLI displays per-registry error details showing which registry failed and why. When at least one registry succeeds, the result is returned without surfacing errors from other registries.
|
|
166
286
|
|
|
167
|
-
This means you can configure multiple registries for redundancy — the CLI will succeed as long as at least one registry can serve the requested dossier. Registries are queried in
|
|
287
|
+
This means you can configure multiple registries for redundancy — the CLI will succeed as long as at least one registry can serve the requested dossier. Registries are queried in parallel; for `get` and `run`, the first successful result (by configuration order) is used.
|
|
168
288
|
|
|
169
289
|
### Configuration
|
|
170
290
|
|
|
@@ -172,6 +292,74 @@ See `dossier config` for managing registry URLs. Multiple registries are queried
|
|
|
172
292
|
|
|
173
293
|
---
|
|
174
294
|
|
|
295
|
+
## Config Command
|
|
296
|
+
|
|
297
|
+
Manage CLI settings and registry configuration.
|
|
298
|
+
|
|
299
|
+
### General Settings
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# List all configuration
|
|
303
|
+
dossier config --list
|
|
304
|
+
|
|
305
|
+
# Get a setting
|
|
306
|
+
dossier config defaultLlm
|
|
307
|
+
|
|
308
|
+
# Set a setting
|
|
309
|
+
dossier config defaultLlm claude-code
|
|
310
|
+
|
|
311
|
+
# Reset to defaults (preserves registry settings)
|
|
312
|
+
dossier config --reset
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Registry Management
|
|
316
|
+
|
|
317
|
+
All registry URLs **must use HTTPS** to protect credentials in transit.
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# List configured registries
|
|
321
|
+
dossier config --list-registries
|
|
322
|
+
dossier config --list-registries --json
|
|
323
|
+
|
|
324
|
+
# Add a registry
|
|
325
|
+
dossier config --add-registry internal --url https://dossier.company.com
|
|
326
|
+
|
|
327
|
+
# Add as default + read-only
|
|
328
|
+
dossier config --add-registry mirror --url https://mirror.example.com --default --readonly
|
|
329
|
+
|
|
330
|
+
# Remove a registry
|
|
331
|
+
dossier config --remove-registry mirror
|
|
332
|
+
|
|
333
|
+
# Change the default registry
|
|
334
|
+
dossier config --set-default-registry internal
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Project-Level Config (`.dossierrc.json`)
|
|
338
|
+
|
|
339
|
+
Place a `.dossierrc.json` in your project root for team-shared registry settings:
|
|
340
|
+
|
|
341
|
+
```json
|
|
342
|
+
{
|
|
343
|
+
"registries": {
|
|
344
|
+
"internal": { "url": "https://dossier.company.com" }
|
|
345
|
+
},
|
|
346
|
+
"defaultRegistry": "internal"
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Project registries are merged with user registries. User-configured registries take precedence on name conflicts to prevent credential exfiltration.
|
|
351
|
+
|
|
352
|
+
### Environment Variables
|
|
353
|
+
|
|
354
|
+
| Variable | Description |
|
|
355
|
+
|----------|-------------|
|
|
356
|
+
| `DOSSIER_REGISTRY_URL` | Override/add a registry URL (creates virtual "env" registry) |
|
|
357
|
+
| `DOSSIER_REGISTRY_TOKEN` | Auth token for the virtual "env" registry (ephemeral, never persisted to disk). Recommended for CI/CD and agent contexts. |
|
|
358
|
+
| `DOSSIER_REGISTRY_USER` | Username for registry authentication |
|
|
359
|
+
| `DOSSIER_REGISTRY_ORGS` | Comma-separated org scopes for registry queries |
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
175
363
|
## What It Checks
|
|
176
364
|
|
|
177
365
|
### 1. Integrity (Checksum)
|
|
@@ -312,11 +500,11 @@ claude-run-dossier https://example.com/dossier.ds.md
|
|
|
312
500
|
|
|
313
501
|
## Registry Configuration
|
|
314
502
|
|
|
315
|
-
The CLI supports multiple registries for discovering, pulling, and publishing dossiers.
|
|
503
|
+
The CLI supports multiple registries for discovering, pulling, and publishing dossiers. Use `dossier config` to manage registries — see [Config Command](#config-command) for CLI usage.
|
|
316
504
|
|
|
317
505
|
### Configuration File (`~/.dossier/config.json`)
|
|
318
506
|
|
|
319
|
-
|
|
507
|
+
The CLI **auto-creates** `~/.dossier/config.json` the first time you modify settings (e.g., via `dossier config --add-registry`). You do not need to create this file manually. If the file does not exist, the CLI uses built-in defaults (the public registry at `https://dossier-registry.vercel.app`).
|
|
320
508
|
|
|
321
509
|
```json
|
|
322
510
|
{
|
|
@@ -337,40 +525,52 @@ Configure registries in your user config:
|
|
|
337
525
|
}
|
|
338
526
|
```
|
|
339
527
|
|
|
340
|
-
|
|
528
|
+
See [Read-Only Registries](#read-only-registries) for how the `"readonly"` flag affects operations.
|
|
341
529
|
|
|
342
|
-
|
|
530
|
+
To create the config manually:
|
|
343
531
|
|
|
344
|
-
```
|
|
532
|
+
```bash
|
|
533
|
+
mkdir -p -m 700 ~/.dossier
|
|
534
|
+
cat > ~/.dossier/config.json << 'EOF'
|
|
345
535
|
{
|
|
346
536
|
"registries": {
|
|
347
|
-
"
|
|
348
|
-
"url": "https://dossier.
|
|
537
|
+
"public": {
|
|
538
|
+
"url": "https://dossier-registry.vercel.app",
|
|
539
|
+
"default": true
|
|
349
540
|
}
|
|
350
|
-
}
|
|
351
|
-
"defaultRegistry": "team"
|
|
541
|
+
}
|
|
352
542
|
}
|
|
543
|
+
EOF
|
|
544
|
+
chmod 600 ~/.dossier/config.json
|
|
353
545
|
```
|
|
354
546
|
|
|
355
|
-
|
|
547
|
+
### Resolution Priority
|
|
356
548
|
|
|
357
|
-
|
|
549
|
+
1. `--registry` flag on the command
|
|
550
|
+
2. `DOSSIER_REGISTRY_URL` environment variable
|
|
551
|
+
3. Project-level `.dossierrc.json`
|
|
552
|
+
4. User-level `~/.dossier/config.json`
|
|
553
|
+
5. Hardcoded default (public registry)
|
|
358
554
|
|
|
359
|
-
|
|
555
|
+
To verify which registries are active and their resolution order, run:
|
|
360
556
|
|
|
361
557
|
```bash
|
|
362
|
-
|
|
558
|
+
dossier config --list-registries
|
|
363
559
|
```
|
|
364
560
|
|
|
365
|
-
###
|
|
561
|
+
### Read-Only Registries
|
|
366
562
|
|
|
367
|
-
|
|
563
|
+
Registries marked `"readonly": true` can be used for read operations (`search`, `get`, `pull`) but **block write operations** (`publish`, `remove`). Attempting a write operation against a read-only registry produces:
|
|
368
564
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
565
|
+
```
|
|
566
|
+
❌ Registry 'readonly-mirror' is read-only
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
When resolving a write target (e.g., for `publish`), the CLI skips read-only registries and falls back to the first writable registry. If all configured registries are read-only, the CLI returns:
|
|
570
|
+
|
|
571
|
+
```
|
|
572
|
+
❌ No writable registry configured. All registries are read-only.
|
|
573
|
+
```
|
|
374
574
|
|
|
375
575
|
### Per-Command Registry Flag
|
|
376
576
|
|
|
@@ -491,12 +691,19 @@ Exit 0 (safe) or 1 (unsafe)
|
|
|
491
691
|
- ✅ CLI parity with dossier-tools
|
|
492
692
|
- ✅ `@ai-dossier` npm scope and CI/CD publishing
|
|
493
693
|
|
|
494
|
-
### v0.4.0
|
|
694
|
+
### v0.4.0
|
|
495
695
|
- ✅ Unified dossier parser across core/cli/mcp
|
|
496
696
|
- ✅ JSON output mode (`--json` flag on commands)
|
|
497
697
|
- ✅ Registry integration (publish, remove, install-skill)
|
|
498
698
|
- ✅ Non-TTY stdin detection
|
|
499
699
|
|
|
700
|
+
### v0.5.0 (Current)
|
|
701
|
+
- ✅ Multi-registry support with parallel resolution
|
|
702
|
+
- ✅ `dossier create` command with meta-dossier templates
|
|
703
|
+
- ✅ `dossier export` and `dossier pull` commands
|
|
704
|
+
- ✅ Agent discovery (`--agent` flag)
|
|
705
|
+
- ✅ Enhanced auth: browser OAuth and env-based tokens
|
|
706
|
+
|
|
500
707
|
### v1.0.0 (Stable)
|
|
501
708
|
- ⏳ Complete signature verification
|
|
502
709
|
- ⏳ Trust management UI
|
|
@@ -532,6 +739,127 @@ ai-dossier verify ../examples/security/validate-project-config.ds.md
|
|
|
532
739
|
|
|
533
740
|
---
|
|
534
741
|
|
|
742
|
+
## Troubleshooting
|
|
743
|
+
|
|
744
|
+
### "insecure permissions" warning
|
|
745
|
+
|
|
746
|
+
```
|
|
747
|
+
⚠️ Warning: ~/.dossier/credentials.json has insecure permissions (644). Expected 0600. Credentials may have been compromised. Fixing permissions.
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
**What it means**: The credentials file is readable by other users on the system. The CLI expects `0600` (owner read/write only) to protect your authentication tokens.
|
|
751
|
+
|
|
752
|
+
**How to fix**:
|
|
753
|
+
|
|
754
|
+
```bash
|
|
755
|
+
chmod 600 ~/.dossier/credentials.json
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
The CLI will also attempt to fix permissions automatically when it detects this issue.
|
|
759
|
+
|
|
760
|
+
**Common causes**:
|
|
761
|
+
- Manually creating or editing the file with a text editor
|
|
762
|
+
- Copying the file from another system without preserving permissions
|
|
763
|
+
- Running the CLI as a different user than the file owner
|
|
764
|
+
|
|
765
|
+
### "Failed to save credentials"
|
|
766
|
+
|
|
767
|
+
```
|
|
768
|
+
Failed to save credentials to ~/.dossier/credentials.json: <reason>
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
**What it means**: The CLI could not write to the credentials file after `dossier login` or a token refresh.
|
|
772
|
+
|
|
773
|
+
**How to fix**:
|
|
774
|
+
|
|
775
|
+
1. **Check directory exists**: The config directory `~/.dossier/` must exist. The CLI creates it automatically, but if creation failed:
|
|
776
|
+
```bash
|
|
777
|
+
mkdir -p ~/.dossier
|
|
778
|
+
chmod 700 ~/.dossier
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
2. **Check write permissions**: Ensure your user owns the directory and file:
|
|
782
|
+
```bash
|
|
783
|
+
ls -la ~/.dossier/
|
|
784
|
+
# If ownership is wrong:
|
|
785
|
+
sudo chown -R $(whoami) ~/.dossier
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
3. **Check disk space**: Ensure the filesystem has available space.
|
|
789
|
+
|
|
790
|
+
4. **Check for read-only filesystem**: In some container or CI environments, the home directory may be read-only. Use the `DOSSIER_REGISTRY_TOKEN` environment variable instead:
|
|
791
|
+
```bash
|
|
792
|
+
export DOSSIER_REGISTRY_TOKEN=<your-token>
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
### "Registry not found"
|
|
796
|
+
|
|
797
|
+
```
|
|
798
|
+
Registry 'myregistry' not found. Available: public. Run 'dossier config --list-registries' to see configured registries.
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
**What it means**: The `--registry` flag references a registry name that isn't configured.
|
|
802
|
+
|
|
803
|
+
**How to fix**:
|
|
804
|
+
|
|
805
|
+
1. List configured registries to see what's available:
|
|
806
|
+
```bash
|
|
807
|
+
dossier config --list-registries
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
2. Add the missing registry:
|
|
811
|
+
```bash
|
|
812
|
+
dossier config --add-registry myregistry --url https://dossier.example.com
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
### "Unreachable registry URL"
|
|
816
|
+
|
|
817
|
+
When a registry is unreachable, the error appears as part of per-registry error output:
|
|
818
|
+
|
|
819
|
+
```
|
|
820
|
+
❌ Not found in any registry: org/my-dossier
|
|
821
|
+
internal: fetch failed
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
**What it means**: The registry URL is not reachable — the server may be down, the URL may be wrong, or there may be a network/firewall issue. When using multiple registries, the CLI succeeds as long as at least one registry responds (see [Multi-Registry Resolution](#multi-registry-resolution)).
|
|
825
|
+
|
|
826
|
+
**How to fix**:
|
|
827
|
+
|
|
828
|
+
1. Verify the URL is correct:
|
|
829
|
+
```bash
|
|
830
|
+
dossier config --list-registries
|
|
831
|
+
curl -s https://dossier.company.com/health
|
|
832
|
+
```
|
|
833
|
+
|
|
834
|
+
2. If the URL is wrong, remove and re-add:
|
|
835
|
+
```bash
|
|
836
|
+
dossier config --remove-registry internal
|
|
837
|
+
dossier config --add-registry internal --url https://correct-url.company.com
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
### "Malformed config file"
|
|
841
|
+
|
|
842
|
+
```
|
|
843
|
+
⚠️ Warning: Could not read config file (Unexpected token ...), using defaults
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
**What it means**: The config file contains invalid JSON. The CLI **does not fail** — it logs a warning and falls back to built-in defaults.
|
|
847
|
+
|
|
848
|
+
**How to fix**:
|
|
849
|
+
|
|
850
|
+
1. Validate the JSON:
|
|
851
|
+
```bash
|
|
852
|
+
python3 -m json.tool < ~/.dossier/config.json
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
2. Fix syntax errors, or delete and recreate:
|
|
856
|
+
```bash
|
|
857
|
+
rm ~/.dossier/config.json
|
|
858
|
+
dossier config --add-registry public --url https://dossier-registry.vercel.app --default
|
|
859
|
+
```
|
|
860
|
+
|
|
861
|
+
---
|
|
862
|
+
|
|
535
863
|
## FAQ
|
|
536
864
|
|
|
537
865
|
### Q: Why a separate CLI tool?
|
package/dist/cli.js
CHANGED
|
@@ -48,6 +48,9 @@ commander_1.program
|
|
|
48
48
|
.addHelpText('after', `Quick Start:
|
|
49
49
|
$ ai-dossier init Set up ~/.dossier/ directory
|
|
50
50
|
$ ai-dossier search <query> Find dossiers in the registry
|
|
51
|
+
$ ai-dossier list --source registry List all registry dossiers
|
|
52
|
+
$ ai-dossier pull <name> Download a dossier to local cache
|
|
53
|
+
$ ai-dossier export <name> Save a dossier to a local file
|
|
51
54
|
$ ai-dossier run <file-or-name> Verify and execute a dossier
|
|
52
55
|
$ ai-dossier create [file] Create a new dossier
|
|
53
56
|
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,yCAAoC;AAEpC,eAAe;AACf,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC,4CAAwD;AACxD,kDAA8D;AAC9D,kD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xB,uBAAuB;gBACvB,uBAAuB;aACxB;YACD,cAAc,EAAE,iBAAiB;SAClC;QACD,WAAW,EAAE;YACX,0EAA0E;YAC1E,4DAA4D;YAC5D,wDAAwD;YACxD,wEAAwE;YACxE,0EAA0E;YAC1E,6FAA6F;SAC9F;KACF,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,oBAAoB;AACpB,mBAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,mCAAmC;AACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,mBAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checksum.d.ts","sourceRoot":"","sources":["../../src/commands/checksum.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checksum.d.ts","sourceRoot":"","sources":["../../src/commands/checksum.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2G9D"}
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.registerChecksumCommand = registerChecksumCommand;
|
|
7
|
-
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
7
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
9
|
const core_1 = require("@ai-dossier/core");
|
|
@@ -34,7 +33,7 @@ function registerChecksumCommand(program) {
|
|
|
34
33
|
console.log(`❌ ${err.message}`);
|
|
35
34
|
process.exit(1);
|
|
36
35
|
}
|
|
37
|
-
const calculatedHash =
|
|
36
|
+
const calculatedHash = (0, core_1.sha256Hex)(body);
|
|
38
37
|
const existingHash = frontmatter.checksum?.hash;
|
|
39
38
|
if (options.quiet && !options.verify && !options.update) {
|
|
40
39
|
console.log(calculatedHash);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checksum.js","sourceRoot":"","sources":["../../src/commands/checksum.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"checksum.js","sourceRoot":"","sources":["../../src/commands/checksum.ts"],"names":[],"mappings":";;;;;AAKA,0DA2GC;AAhHD,sDAAyB;AACzB,0DAA6B;AAC7B,2CAA2F;AAG3F,SAAgB,uBAAuB,CAAC,OAAgB;IACtD,OAAO;SACJ,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,+CAA+C,CAAC;SAC5D,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;SAClC,MAAM,CAAC,UAAU,EAAE,gCAAgC,CAAC;SACpD,MAAM,CAAC,UAAU,EAAE,0DAA0D,CAAC;SAC9E,MAAM,CAAC,SAAS,EAAE,sCAAsC,CAAC;SACzD,MAAM,CAAC,CAAC,IAAY,EAAE,OAAgE,EAAE,EAAE;QACzF,MAAM,WAAW,GAAG,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,WAAW,EAAE,CAAC,CAAC;YAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,OAAO,GAAG,iBAAE,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAErD,IAAI,WAA+B,CAAC;QACpC,IAAI,IAAY,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;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,kCAAkC;QAClC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,YAAY,mBAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,cAAc,cAAc,EAAE,CAAC,CAAC;QAE5C,IAAI,YAAY,EAAE,CAAC;YACjB,IAAI,YAAY,KAAK,cAAc,EAAE,CAAC;gBACpC,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YACrD,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;gBAC5D,OAAO,CAAC,GAAG,CAAC,mBAAmB,YAAY,EAAE,CAAC,CAAC;gBAC/C,OAAO,CAAC,GAAG,CAAC,8BAA8B,IAAI,mBAAmB,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,8BAA8B,IAAI,mBAAmB,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -249,7 +249,7 @@ Project-level config:
|
|
|
249
249
|
|
|
250
250
|
Environment variables:
|
|
251
251
|
DOSSIER_REGISTRY_URL Override/add a registry URL (creates virtual "env" registry)
|
|
252
|
-
DOSSIER_REGISTRY_TOKEN Auth token for the
|
|
252
|
+
DOSSIER_REGISTRY_TOKEN Auth token for the "env" registry (set via DOSSIER_REGISTRY_URL)
|
|
253
253
|
DOSSIER_REGISTRY_USER Username for registry authentication
|
|
254
254
|
DOSSIER_REGISTRY_ORGS Comma-separated org scopes for registry queries
|
|
255
255
|
`)
|
package/dist/commands/create.js
CHANGED
|
@@ -45,7 +45,7 @@ const config = __importStar(require("../config"));
|
|
|
45
45
|
const helpers_1 = require("../helpers");
|
|
46
46
|
const multi_registry_1 = require("../multi-registry");
|
|
47
47
|
const registry_client_1 = require("../registry-client");
|
|
48
|
-
const DEFAULT_CREATE_TEMPLATE = 'imboard-ai/meta/create-dossier';
|
|
48
|
+
const DEFAULT_CREATE_TEMPLATE = 'imboard-ai/meta/create-dossier-and-skill';
|
|
49
49
|
function registerCreateCommand(program) {
|
|
50
50
|
program
|
|
51
51
|
.command('create')
|
|
@@ -135,9 +135,9 @@ ${options.objective ? `- **Objective**: ${options.objective}` : '- **Objective**
|
|
|
135
135
|
${options.risk ? `- **Risk level**: ${options.risk}` : '- **Risk level**: Not specified (prompt user)'}
|
|
136
136
|
${options.category ? `- **Category**: ${options.category}` : '- **Category**: Not specified (prompt user)'}
|
|
137
137
|
${options.tags ? `- **Tags**: ${options.tags}` : '- **Tags**: Not specified (optional)'}
|
|
138
|
-
${options.template !== DEFAULT_CREATE_TEMPLATE ? `- **Template reference**: ${options.template}` : '- **Template**: Default (create-dossier)'}
|
|
138
|
+
${options.template !== DEFAULT_CREATE_TEMPLATE ? `- **Template reference**: ${options.template}` : '- **Template**: Default (create-dossier-and-skill)'}
|
|
139
139
|
|
|
140
|
-
**Instructions**: Use the values provided above. For any fields marked "Not specified", prompt the user interactively. When all required information is gathered, create the dossier file according to the meta-dossier instructions below.
|
|
140
|
+
**Instructions**: Use the values provided above. For any fields marked "Not specified", prompt the user interactively. When all required information is gathered, create both the dossier file and its companion Claude Code skill according to the meta-dossier instructions below.
|
|
141
141
|
|
|
142
142
|
---
|
|
143
143
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,sDA8JC;AA1KD,2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AAC,OAAO,EAAE,CAAC,CAAC;YACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,CACF,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,yFAAyF;AACzF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwE5D"}
|
package/dist/commands/export.js
CHANGED
|
@@ -9,6 +9,7 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
9
9
|
const helpers_1 = require("../helpers");
|
|
10
10
|
const multi_registry_1 = require("../multi-registry");
|
|
11
11
|
const registry_client_1 = require("../registry-client");
|
|
12
|
+
/** Registers the `export` command — downloads a dossier and saves it to a local file. */
|
|
12
13
|
function registerExportCommand(program) {
|
|
13
14
|
program
|
|
14
15
|
.command('export')
|
|
@@ -48,6 +49,14 @@ function registerExportCommand(program) {
|
|
|
48
49
|
process.exit(0);
|
|
49
50
|
}
|
|
50
51
|
const outputPath = options.output || `${dossierName.replace(/\//g, '-')}.ds.md`;
|
|
52
|
+
try {
|
|
53
|
+
(0, helpers_1.validateRelativePath)(outputPath);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
console.error(`\n❌ ${err.message}\n`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
51
60
|
const outputDir = node_path_1.default.dirname(node_path_1.default.resolve(outputPath));
|
|
52
61
|
try {
|
|
53
62
|
if (!node_fs_1.default.existsSync(outputDir)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":";;;;;AAQA,sDAwEC;AAhFD,sDAAyB;AACzB,0DAA6B;AAE7B,wCAAuE;AACvE,sDAA4D;AAC5D,wDAAsD;AAEtD,yFAAyF;AACzF,SAAgB,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,kFAAkF,CAAC;SAC/F,QAAQ,CAAC,QAAQ,EAAE,wDAAwD,CAAC;SAC5E,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;SACjD,MAAM,CAAC,UAAU,EAAE,2CAA2C,CAAC;SAC/D,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,OAA8C,EAAE,EAAE;QAC7E,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,IAAA,kCAAgB,EAAC,IAAI,CAAC,CAAC;QAEtD,IAAI,OAAe,CAAC;QACpB,IAAI,MAAqB,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,wCAAuB,EAAC,WAAW,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;YACvF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO,CAAC,KAAK,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;gBACxC,IAAA,6BAAmB,EAAC,MAAM,CAAC,CAAC;gBAC5B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAChB,OAAO;YACT,CAAC;YACD,OAAO,GAAG,MAAM,CAAC,O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AC/C,CAAC;YAED,iBAAE,CAAC,aAAa,CAAC,mBAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAC9D,CAAC;QAAC,OAAO,QAAiB,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CACX,6BAA6B,mBAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAO,QAAkB,CAAC,OAAO,IAAI,CAC3F,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,iBAAiB,UAAU,EAAE,CAAC,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,cAAc,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxE,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,GAAG,CAAC,cAAc,MAAM,EAAE,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/commands/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/commands/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+EzD"}
|
package/dist/commands/get.js
CHANGED
|
@@ -41,14 +41,15 @@ function registerGetCommand(program) {
|
|
|
41
41
|
const showLabel = (0, config_1.resolveRegistries)().length > 1;
|
|
42
42
|
const label = showLabel && meta._registry ? ` [${meta._registry}]` : '';
|
|
43
43
|
console.log(`\n📄 Dossier: ${meta.name || dossierName}${label}\n`);
|
|
44
|
+
const formatted = (0, helpers_1.formatDossierFields)(meta);
|
|
44
45
|
const fields = [
|
|
45
|
-
['Name',
|
|
46
|
-
['Title',
|
|
47
|
-
['Version',
|
|
46
|
+
['Name', formatted.name],
|
|
47
|
+
['Title', formatted.title],
|
|
48
|
+
['Version', formatted.version],
|
|
48
49
|
['Status', meta.status || ''],
|
|
49
|
-
['Category',
|
|
50
|
+
['Category', formatted.category],
|
|
50
51
|
['Risk Level', meta.risk_level || ''],
|
|
51
|
-
['Objective',
|
|
52
|
+
['Objective', formatted.description],
|
|
52
53
|
];
|
|
53
54
|
for (const [label, value] of fields) {
|
|
54
55
|
if (value) {
|