@ai-driven-dev/cli 2.13.2 → 3.1.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 +2 -357
  2. package/dist/cli.js +3197 -3178
  3. package/package.json +2 -3
package/README.md CHANGED
@@ -1,362 +1,7 @@
1
- # AIDD CLI
1
+ # @ai-driven-dev/cli
2
2
 
3
- The **AIDD CLI** (`@ai-driven-dev/cli`) distributes the [AI-Driven Development Framework](https://github.com/ai-driven-dev/aidd-framework) consistently across AI coding assistants. It downloads a canonical framework from GitHub, rewrites files to match each tool's conventions, and tracks every installed file in a hash-based manifest to detect drift.
4
-
5
- **Supported tools:** Claude Code · Cursor · GitHub Copilot · OpenCode
6
-
7
- ---
8
-
9
- ## Prerequisites
10
-
11
- | Prerequisite | Version | Notes |
12
- | ----------------------- | ------- | ------------------------------------------------------- |
13
- | **Node.js** | >= 24 | [nodejs.org](https://nodejs.org) |
14
- | **tar** | — | Pre-installed on macOS, Linux, WSL and Windows 10 1803+ |
15
- | **gh CLI** _(optional)_ | — | Can be used as an authentication method via `aidd auth login --gh` |
16
-
17
- > **Windows:** works natively on Windows 10 1803+ (PowerShell or cmd) and on WSL.
18
- > If you encounter permission issues with `npm install -g`, use an administrator terminal or WSL.
19
-
20
- ---
21
-
22
- ## Installation
3
+ AI-Driven Development CLI distribute the AIDD framework across AI coding assistants.
23
4
 
24
5
  ```bash
25
6
  npm install -g @ai-driven-dev/cli
26
-
27
- # Verify
28
- aidd --version
29
- ```
30
-
31
- > Run `which aidd` to identify the active binary and use the matching package manager (`npm`, `pnpm`, `yarn`, `bun`).
32
-
33
- ---
34
-
35
- ## Authentication
36
-
37
- The AIDD framework repository requires a GitHub token. Authenticate once with `aidd auth login` — the credential is stored securely in `~/.config/aidd/auth.json` (permissions `600`).
38
-
39
- ### Method 1 — Personal Access Token (recommended)
40
-
41
- Create a [GitHub Personal Access Token](https://github.com/settings/tokens/new) with the **`repo`** scope, then:
42
-
43
- ```bash
44
- aidd auth login --token <YOUR_TOKEN> --level user
45
- ```
46
-
47
- ### Method 2 — GitHub CLI
48
-
49
- ```bash
50
- gh auth login # authenticate gh CLI once
51
- aidd auth login --gh --level user
52
- ```
53
-
54
- The token is resolved at runtime via `gh auth token` — no token is stored in the AIDD config.
55
-
56
- ### Method 3 — Environment variable
57
-
58
- ```bash
59
- export AIDD_TOKEN=<YOUR_TOKEN>
60
- ```
61
-
62
- Add to `~/.bashrc`, `~/.zshrc`, or `~/.profile` to make it persistent. Takes precedence over all stored credentials.
63
-
64
- ### Token resolution order
65
-
66
- `AIDD_TOKEN` env → project `.aidd/auth.json` → user `~/.config/aidd/auth.json` → `gh auth token` (only if stored config uses `method: "gh"`)
67
-
68
- ### Storage levels
69
-
70
- | Level | File | Use case |
71
- | --------- | ----------------------------- | ------------------------------------------- |
72
- | `user` | `~/.config/aidd/auth.json` | Shared across all projects (default) |
73
- | `project` | `.aidd/auth.json` | Per-project credential (add to `.gitignore`) |
74
-
75
- ### Auth commands
76
-
77
- ```bash
78
- aidd auth login --token <TOKEN> --level user # store a PAT
79
- aidd auth login --gh --level user # use gh CLI token
80
- aidd auth status # check current auth (exit 1 if not authenticated)
81
- aidd auth logout # remove stored credential
82
- ```
83
-
84
- ---
85
-
86
- ## Quickstart
87
-
88
- ```bash
89
- # Authenticate first
90
- aidd auth login --token <YOUR_TOKEN> --level user
91
-
92
- # Run interactive setup (init + install in one step)
93
- aidd setup
94
-
95
- # Or manually:
96
- # 1. Initialize the docs structure and the manifest
97
- # aidd init
98
-
99
- # 2. Install for one or more tools
100
- # aidd install claude cursor
101
-
102
- # 3. Verify the installation
103
- aidd status
104
- ```
105
-
106
- ---
107
-
108
- ## User Flows
109
-
110
- ### Migrating from a manual install
111
-
112
- If you already have AIDD files installed manually (no `.aidd/manifest.json`), use `adopt` to bootstrap a manifest from what's on disk — no download, no overwrite.
113
-
114
- ```bash
115
- aidd adopt --tools claude --from v3.4.0
116
-
117
- # Multiple tools
118
- aidd adopt --tools claude,cursor --from v3.4.0
119
-
120
- # Local framework path (no auth required)
121
- aidd adopt --tools claude --from /path/to/framework
122
- ```
123
-
124
- `--from <version|path>` is required: it pins the version the manifest will record. After adoption, run `aidd status` to see drift and `aidd update` to align with the latest framework version.
125
-
126
- ### Updating the framework
127
-
128
- ```bash
129
- aidd status # see what changed (drift + available update)
130
- aidd update # update all tools and docs to the latest version
131
- aidd update --dry-run # preview changes without applying them
132
- aidd update --tool claude # update a single tool only (must already be installed)
133
- aidd update --docs # update docs only
134
- aidd update --force # overwrite conflicts without prompting
135
- ```
136
-
137
- ### Restoring modified files
138
-
139
- ```bash
140
- aidd status # identify modified (~) files
141
- aidd restore claude # restore all modified/deleted files for a tool
142
- aidd restore --docs # restore docs only
143
- aidd restore claude rules/naming.md # restore a specific file
144
- aidd restore claude --force # skip confirmation prompts (CI-safe)
145
- ```
146
-
147
- Restore uses the version pinned in the manifest. It does not touch untracked files.
148
-
149
- ### Syncing changes across tools
150
-
151
- ```bash
152
- aidd sync --source claude # propagate claude changes to all other tools
153
- aidd sync --source claude --target cursor # propagate to a specific tool only
154
- aidd sync --source claude --force # overwrite conflicting target files
155
- ```
156
-
157
- Excluded from sync: memory bank files, MCP configs, VS Code settings, docs.
158
-
159
- ### Uninstalling a tool
160
-
161
- ```bash
162
- aidd uninstall cursor # remove cursor files and clean up the manifest
163
- aidd uninstall --all # uninstall all tools
164
- ```
165
-
166
- ---
167
-
168
- ## Commands
169
-
170
- | Command | Description | Key options |
171
- | ---------------------------- | ------------------------------------------------------------------ | -------------------------------------------- |
172
- | `aidd auth` | Manage authentication (login, logout, status) | `--token`, `--gh`, `--level` |
173
- | `aidd setup` | Interactive onboarding: init, adopt, install, or update as needed | `--release`, `--repo`, `--path` |
174
- | `aidd install <tools...>` | Generate and write tool-specific files (requires existing manifest) | `--all`, `--force`, `--release`, `--path` |
175
- | `aidd uninstall <tools...>` | Remove tool files and update manifest | `--all` |
176
- | `aidd status` | Show drift between disk and manifest + available update | `--tool`, `--docs` |
177
- | `aidd doctor` | Structural integrity check — exits 1 on errors or warnings | — |
178
- | `aidd update` | Apply new framework version | `--force`, `--dry-run`, `--tool`, `--docs`, `--release`, `--path` |
179
- | `aidd restore [files...]` | Revert modified/deleted files to the pinned framework version | `--force`, `--tool`, `--docs`, `--release`, `--path` |
180
- | `aidd sync` | Propagate local changes from one tool to the others | `--source` (required), `--target`, `--force` |
181
- | `aidd clean` | Remove all AIDD files — dry-run without `--force` | `--force` |
182
- | `aidd cache list\|clear` | List or remove cached framework versions | `--all`, `[version]` |
183
- | `aidd config list\|get\|set` | Read or update manifest-backed config (`docsDir`, `repo`, `tools`) | `--force` |
184
- | `aidd self-update` | Update the CLI itself to the latest version | `--check`, `--dry-run`, `--force` |
185
-
186
- ### `aidd auth`
187
-
188
- Manages stored GitHub credentials used to download the framework.
189
-
190
- ```bash
191
- aidd auth login --token <TOKEN> --level user # store a PAT at user level
192
- aidd auth login --token <TOKEN> --level project # store a PAT at project level
193
- aidd auth login --gh --level user # use gh CLI as token source
194
- aidd auth status # show current auth (exit 1 if not authenticated)
195
- aidd auth logout # remove the active credential
196
- ```
197
-
198
- Credentials are stored in JSON files with `600` permissions. The `project` level stores in `.aidd/auth.json` — add it to `.gitignore` to avoid committing secrets.
199
-
200
- ### `aidd setup`
201
-
202
- Interactive onboarding for new and existing projects. Detects the current state and guides through init, install, or update as appropriate.
203
-
204
- ```bash
205
- aidd setup
206
- aidd setup --release v3.4.0 # pin a specific framework version
207
- aidd setup --path ./local # use a local framework copy
208
- ```
209
-
210
- ### `aidd install`
211
-
212
- Generates and writes tool-specific distribution files (agents, commands, rules, skills, config).
213
-
214
- > Requires an existing AIDD project (manifest). For first-time setup, use `aidd setup` instead.
215
-
216
- ```bash
217
- aidd install claude
218
- aidd install claude cursor copilot opencode
219
- aidd install --all # all supported tools
220
- aidd install claude --force # overwrite existing files
221
- aidd install claude --release v3.4.0 # pin a specific framework version
222
- ```
223
-
224
- ### `aidd uninstall`
225
-
226
- Removes a tool's generated files and updates the manifest.
227
-
228
- ```bash
229
- aidd uninstall cursor
230
- aidd uninstall --all
231
- ```
232
-
233
- ### `aidd status`
234
-
235
- Compares files on disk with the manifest. Shows drift and available framework updates.
236
-
237
- ```bash
238
- aidd status # all tools + docs
239
- aidd status --tool claude # filter to one tool
240
- aidd status --docs # docs only
241
7
  ```
242
-
243
- Legend: `~` modified · `-` deleted · `+` untracked (on disk, not in manifest)
244
-
245
- ### `aidd doctor`
246
-
247
- Checks structural integrity. Exits 1 if errors or warnings are found; exits 0 with a warning message if only the auth credential is missing (non-blocking in CI).
248
-
249
- ```bash
250
- aidd doctor
251
- ```
252
-
253
- Detects: missing or corrupted manifest, orphaned tool directories, broken `@path` includes and markdown links in tracked files.
254
-
255
- > Drift (modified/deleted files) is not a structural issue — use `aidd status` for that.
256
-
257
- ### `aidd update`
258
-
259
- Downloads the latest framework version and applies changes. See [Updating the framework](#updating-the-framework) for examples.
260
-
261
- > `--tool <name>` only updates tools already present in the manifest. Use `aidd install <tool>` to add a new tool.
262
-
263
- ### `aidd restore`
264
-
265
- Reverts modified or deleted files to the framework version pinned in the manifest. See [Restoring modified files](#restoring-modified-files) for examples.
266
-
267
- ### `aidd sync`
268
-
269
- Propagates local modifications from one tool's files to the others via reverse + forward content rewriting. See [Syncing changes across tools](#syncing-changes-across-tools) for examples.
270
-
271
- ### `aidd adopt`
272
-
273
- Bootstraps a manifest for projects with existing manually installed AIDD files. See [Migrating from a manual install](#migrating-from-a-manual-install) for examples.
274
-
275
- > Auth is not required when `--from` is a local path.
276
-
277
- ### `aidd clean`
278
-
279
- Removes all AIDD-generated files and the manifest.
280
-
281
- ```bash
282
- aidd clean # dry-run: shows what will be removed
283
- aidd clean --force # actual removal
284
- ```
285
-
286
- ### `aidd self-update`
287
-
288
- Updates the CLI itself to the latest published version.
289
-
290
- ```bash
291
- aidd self-update # install latest version
292
- aidd self-update --check # check availability without installing
293
- aidd self-update --dry-run # preview without installing
294
- aidd self-update --force # reinstall even if already up to date
295
- ```
296
-
297
- ### `aidd cache`
298
-
299
- Manages locally cached framework versions (stored in `.aidd/cache/`).
300
-
301
- ```bash
302
- aidd cache list # list cached versions with path and size
303
- aidd cache clear # remove all cached versions
304
- aidd cache clear v3.4.0 # remove a specific version
305
- ```
306
-
307
- ### `aidd config`
308
-
309
- Reads or updates project-level configuration backed by the manifest.
310
-
311
- ```bash
312
- aidd config list # show all config values
313
- aidd config get repo # read a value (docsDir, repo, tools)
314
- aidd config set repo owner/repo # update repo (writable: docsDir, repo)
315
- ```
316
-
317
- `tools` is read-only — use `install`/`uninstall` to change it.
318
-
319
- ---
320
-
321
- ## Options
322
-
323
- ### Global (all commands)
324
-
325
- ```bash
326
- aidd update --verbose # detailed logs
327
- aidd update --repo owner/repo # alternative framework repository
328
- ```
329
-
330
- ### Framework source (setup, install, update, restore)
331
-
332
- ```bash
333
- aidd setup --release v3.4.0 # pin a specific framework version (first-time)
334
- aidd update --release v3.4.0 # pin a specific framework version (existing project)
335
- aidd update --path ./local # local framework path (dev/testing)
336
- ```
337
-
338
- **Environment variables:**
339
-
340
- | Variable | Description |
341
- | -------------- | ----------------------------------------------------------------------- |
342
- | `AIDD_TOKEN` | GitHub token with `repo` scope — takes precedence over stored credentials |
343
- | `AIDD_REPO` | Custom framework repository (`owner/repo`) |
344
- | `AIDD_VERBOSE` | Verbose mode (`true`/`false`) |
345
-
346
- ---
347
-
348
- ## Contributing
349
-
350
- See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contribution guide.
351
-
352
- Code contributions are open to certified **Obsidian+** members.
353
-
354
- ---
355
-
356
- ## License
357
-
358
- Private repository — all AIDD team members.
359
-
360
- ---
361
-
362
- ← [Back to aidd-framework](https://github.com/ai-driven-dev/aidd-framework)