@przeprogramowani/10x-cli 1.20.0 → 1.22.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 CHANGED
@@ -21,42 +21,145 @@ npm install -g @przeprogramowani/10x-cli
21
21
  # https://github.com/przeprogramowani/10x-cli/releases
22
22
  ```
23
23
 
24
+ ## Install the bundled CLI helpers (unreleased)
25
+
26
+ `10x helpers install` is implemented on this branch for the next CLI release;
27
+ it is **not available in 1.21.0 or the 1.22.0 master baseline**. A checkout build
28
+ may still print 1.22.0 until the release process assigns a version. Check
29
+ `10x helpers --help` on your actual executable before using this command; do not
30
+ assume that installing today's npm version includes it.
31
+
32
+ Once your release includes it, run from the intended project directory:
33
+
34
+ ```bash
35
+ 10x helpers install --tool copilot --dry-run
36
+ 10x helpers install --tool copilot
37
+ ```
38
+
39
+ This installs **both** `10x-cli-setup` and `10x-cli-guide`, each with its complete
40
+ `SKILL.md` and `references/compatibility.md`, into `.github/skills/`. Use
41
+ `--tool claude-code`, `cursor`, `codex`, `devin-desktop`, `gemini`, or `generic`
42
+ when that is your intended tool. The target must be explicit; installation is
43
+ project-only. There is no `--global`, automatic agent detection, `skills`/npx
44
+ subprocess, authentication, or network access. The helper bytes come from the
45
+ same CLI build, including the standalone binary; fetching the npm CLI itself
46
+ still requires npm/network in the usual way.
47
+
48
+ Identical existing files are unchanged; missing files are created. If any existing
49
+ helper file differs, neither helper is written and the command exits 1. Keep the
50
+ existing copy or back up your changes outside managed skill directories before
51
+ replacing it deliberately. Files managed by course `10x get`/`sync` remain under
52
+ that channel; this command does not register or take over a course manifest.
53
+ It never deletes extra local files. A filesystem failure also exits 1; any files
54
+ already created remain, and rerunning safely checks them again. `--dry-run`
55
+ performs the same path/conflict checks without writes. Invalid/missing targets or
56
+ unsupported flags exit 2 in both human and JSON use.
57
+
58
+ For Copilot CLI, run `/skills reload`, then `/skills info 10x-cli-setup` and
59
+ `/skills info 10x-cli-guide` in the same project. Installing helpers does not
60
+ execute them or authenticate the course CLI. VS Code Copilot also reads project
61
+ `.github/skills`; open the same project there.
62
+
63
+ To try the **unreleased source checkout** without changing a global installation:
64
+ run `bun run /absolute/path/to/10x-cli/src/index.ts helpers install --tool copilot`
65
+ from a disposable project, with dependencies already installed in the checkout.
66
+ The public `skills` route below remains available for older CLI releases. Its
67
+ Copilot agent ID is `github-copilot`, whereas this CLI uses `--tool copilot`.
68
+
24
69
  ## Agentic Installation
25
70
 
26
- Let your AI coding agent handle the setup. This repo ships a [`10x-cli-setup`](skills/10x-cli-setup/SKILL.md) skill that walks your agent through installing, authenticating, and configuring the CLI — all driven by the latest README.
71
+ The [`10x-cli-setup`](skills/10x-cli-setup/SKILL.md) helper prepares the CLI and
72
+ passes project context to [`10x-cli-guide`](skills/10x-cli-guide/SKILL.md), which
73
+ leads through download → an actual agent task → sync. Each ships its own
74
+ [compatibility reference](skills/10x-cli-guide/references/compatibility.md).
75
+ Installing the npm CLI does not activate these helpers in your agent.
27
76
 
28
- Install the skill with [skills.sh](https://skills.sh):
77
+ For public installation on demand, choose a full retained public CLI master SHA
78
+ containing the helper version you want. From your project root (macOS/zsh):
29
79
 
30
80
  ```bash
31
- # Add the skill to your current project (symlinked)
32
- npx skills add przeprogramowani/10x-cli
81
+ : "${CLI_SKILLS_REF:?Set the full public CLI master SHA containing the helpers}"
82
+ npx --yes skills@1.5.26 add "https://github.com/przeprogramowani/10x-cli/tree/$CLI_SKILLS_REF/skills" --skill 10x-cli-setup --agent claude-code --copy
83
+ # Install guide when needed using the same channel:
84
+ npx --yes skills@1.5.26 add "https://github.com/przeprogramowani/10x-cli/tree/$CLI_SKILLS_REF/skills" --skill 10x-cli-guide --agent claude-code --copy
85
+ ```
86
+
87
+ These are project copies. Installer prompts remain enabled; `npx --yes` only
88
+ accepts running the pinned tool. Inspect the actual installed paths and ask the
89
+ agent to read that SKILL.md and its references. No automatic discovery is assumed.
33
90
 
34
- # Or install globally so it's available in every project
35
- npx skills add przeprogramowani/10x-cli -g
91
+ Both helpers can also be downloaded through the CLI once filtered get is supported
92
+ by your verified release and v4 m1l1 content is published and accessible. In a
93
+ separate project from public copies, after setup/auth:
36
94
 
37
- # Target a specific agent
38
- npx skills add przeprogramowani/10x-cli -a claude-code
39
- npx skills add przeprogramowani/10x-cli -a cursor
95
+ ```bash
96
+ : "${CLI_VERSION:?Set the actual verified published CLI version}"
97
+ 10x_cli() { npx --yes "@przeprogramowani/10x-cli@$CLI_VERSION" "$@"; }
98
+ 10x_cli --version
99
+ 10x_cli get --help
100
+ 10x_cli get m1l1 --type skills --name 10x-cli-setup --course 10xdevs4 --tool claude-code --lang pl --dry-run
101
+ 10x_cli get m1l1 --type skills --name 10x-cli-setup --course 10xdevs4 --tool claude-code --lang pl
102
+ 10x_cli get m1l1 --type skills --name 10x-cli-guide --course 10xdevs4 --tool claude-code --lang pl --dry-run
103
+ 10x_cli get m1l1 --type skills --name 10x-cli-guide --course 10xdevs4 --tool claude-code --lang pl
40
104
  ```
41
105
 
42
- Once installed, just tell your agent to **set up 10x-cli** and it will pick up the skill automatically.
106
+ Source membership does not prove publication. Confirm skill-filter support and direct
107
+ sync against the actual package and content; do not infer it from a version label
108
+ or silently replace the name with a full lesson. CLI-owned copies update through
109
+ sync; public copies update through a deliberate new source SHA and pinned add.
110
+ The CLI executable has its own npm/binary update procedure.
111
+
112
+ Keep one updater per copy. Before either route, inspect destination paths/symlinks
113
+ and CLI/installer ownership. For public→CLI takeover, back up the whole helper
114
+ outside managed trees, unregister only that helper through the original installer,
115
+ verify its destination and registration are gone, then filtered get. Preserve local
116
+ edits for conscious merging. For CLI→public use a new project; no verified CLI
117
+ per-skill unregister is promised. See the compatibility reference for details.
43
118
 
44
119
  ## Quick Start
45
120
 
121
+ Use an existing verified global/standalone `10x`, or the pinned `10x_cli` runner
122
+ above. Retain your v3 project and use a separate v4 exercise directory. After
123
+ checking skill-filter capability and content availability. Sync later refreshes
124
+ whole downloaded lessons, so inspect its preview and accept any additional
125
+ artifacts/rules before applying; repeat a skill filter for a narrow update:
126
+
46
127
  ```bash
47
- 10x auth # Authenticate with your email
48
- 10x list # Browse available modules and lessons
49
- 10x get m1l1 # Fetch and apply lesson artifacts
50
- 10x sync # Update everything you've downloaded; show what changed
51
- 10x doctor # Check everything is working
52
- 10x bench # Show the 10xBench top-10 model leaderboard
128
+ 10x_cli auth --status
129
+ # If login is needed: 10x_cli auth (email or Circle); see auth commands below.
130
+ 10x_cli list --course 10xdevs4
131
+ 10x_cli get m1l1 --type skills --name 10x-init --course 10xdevs4 --tool claude-code --lang pl --dry-run
132
+ 10x_cli get m1l1 --type skills --name 10x-init --course 10xdevs4 --tool claude-code --lang pl
133
+ 10x_cli get m1l1 --type skills --name 10x-shape --course 10xdevs4 --tool claude-code --lang pl --dry-run
134
+ 10x_cli get m1l1 --type skills --name 10x-shape --course 10xdevs4 --tool claude-code --lang pl
135
+ 10x_cli get m1l1 --type skills --name 10x-prd --course 10xdevs4 --tool claude-code --lang pl --dry-run
136
+ 10x_cli get m1l1 --type skills --name 10x-prd --course 10xdevs4 --tool claude-code --lang pl
137
+ # Follow the guide: read each installed SKILL.md and references, then
138
+ # init → shape with the learner’s 10xCards inputs → PRD from approved notes.
139
+ 10x_cli sync --course 10xdevs4 --tool claude-code --lang pl --dry-run
140
+ 10x_cli sync --course 10xdevs4 --tool claude-code --lang pl
141
+ 10x_cli doctor
53
142
  ```
54
143
 
144
+ The guide uses lesson 1's existing 10xCards example and produces
145
+ `context/foundation/shape-notes.md`, then `context/foundation/prd.md`.
146
+ Read all three installed skill trees; PRD requires the sibling
147
+ `.claude/skills/10x-shape/references/prd-schema.md`. Preserve existing outputs and
148
+ follow the skills' collision choices. `CLAUDE-m1l1` is a separate lesson rule;
149
+ see the guide for prerequisite checks without a full-get fallback. `10x-plan`
150
+ is not available for this launch demonstration. CLI 1.21.0 and v4 m1 EN/PL are
151
+ published; these revised helpers remain a separate source change. Verify each
152
+ filtered preview and complete PL references before the walkthrough. A download alone is not successful skill use.
153
+ Inspect sync conflicts even on exit 0; never apply automatic `--force`. A missing
154
+ tool directory before first get can explain that doctor check; other failures
155
+ remain visible. Full lesson downloads and other commands remain available below.
156
+
55
157
  ## Commands
56
158
 
57
159
  | Command | Description |
58
160
  |---------|-------------|
59
161
  | `10x auth` | Magic-link login with your Circle-registered email |
162
+ | `10x auth --method circle` | No email received? Get the approval link as a Circle message instead |
60
163
  | `10x list` | Browse modules and lessons in your course |
61
164
  | `10x get <ref>` | Fetch a lesson and apply artifacts to your workspace |
62
165
  | `10x sync` | Bulk-download / refresh lessons and report what changed upstream |
@@ -73,8 +176,8 @@ Once installed, just tell your agent to **set up 10x-cli** and it will pick up t
73
176
  | `--type <type>` | Filter by artifact type: `skills`, `prompts`, `rules`, `configs` |
74
177
  | `--name <name>` | Filter by artifact name (requires `--type`) |
75
178
  | `--dry-run` | Show what would be written without touching the filesystem |
76
- | `--course <slug>` | Override the course slug (default: `10xdevs3`) |
77
- | `--no-course-rules` | Skip the course rules block in your rules file (`CLAUDE.md`/`AGENTS.md`); strips an existing one. Use `--course-rules` to re-enable. |
179
+ | `--course <slug>` | Select an entitled course ID or slug; default is the project edition or API recommendation |
180
+ | `--no-course-rules` | Skip the course rules block in your rules file (`CLAUDE.md`/`AGENTS.md`); removes an unchanged block whose ownership and baseline are known. Use `--course-rules` to re-enable. |
78
181
 
79
182
  #### Examples
80
183
 
@@ -96,7 +199,7 @@ Once installed, just tell your agent to **set up 10x-cli** and it will pick up t
96
199
  10x get m1l1 --tool cursor
97
200
 
98
201
  # Skip the course rules block (use only your rules). Persisted across runs;
99
- # a previously-applied block is stripped. Re-enable later with --course-rules.
202
+ # an unchanged block with a known baseline is removed. Re-enable later with --course-rules.
100
203
  10x get m1l1 --no-course-rules
101
204
  10x get m1l2 --course-rules
102
205
 
@@ -117,17 +220,17 @@ already downloaded; `--all` pulls every unlocked lesson at once.
117
220
 
118
221
  Unchanged lessons are skipped **without a download** — the catalog advertises a
119
222
  per-lesson `contentHash` that the CLI compares against what it last applied, so the
120
- common "nothing changed" case is a single catalog request.
223
+ common "nothing changed" case avoids lesson downloads. Skipping also requires the same language/tool/rules representation and intact tracked local files; missing files are repaired and local edits still surface as conflicts.
121
224
 
122
225
  | Flag | Description |
123
226
  |------|-------------|
124
227
  | `--all` | Sync every unlocked lesson, not just the ones you've downloaded |
125
228
  | `--module <m>` | Limit to one module (e.g. `m2` or `2`) |
126
229
  | `--dry-run` | Preview what would change without writing anything |
127
- | `--force` | Ignore the cheap-skip digest and overwrite local edits with upstream |
230
+ | `--force` | Fetch again and overwrite local skill/prompt edits; protected rules and config templates remain guarded |
128
231
  | `--tool <tool>` | AI coding tool (same set as `get`) |
129
232
  | `--lang <lang>` | Content language: `en` (default) or `pl` |
130
- | `--course <slug>` | Override the course slug (default: `10xdevs3`) |
233
+ | `--course <slug>` | Select an entitled course ID or slug; default is the project edition or API recommendation |
131
234
  | `--no-course-rules` | Skip the course rules block (same semantics as `get`) |
132
235
 
133
236
  ```bash
@@ -158,9 +261,7 @@ m2l3 — conflicts (1 skipped)
158
261
  ```
159
262
 
160
263
  Run that `10x get …` to take a single update, or `10x sync --force` to take them
161
- all. **Change visibility covers skills and prompts** — configs are create-only
162
- (never overwritten) and rules are sentinel-managed, so they aren't part of the
163
- "what changed" report.
264
+ all for skills and prompts. Config templates are create-only. Course rules retain a separate upstream baseline: local edits or a missing baseline require explicit resolution, including when `--force` or `--no-course-rules` is used. Text outside the managed markers is preserved.
164
265
 
165
266
  **Exit code is worst-outcome:** `0` when everything is clean/unchanged (a skipped
166
267
  conflict is reported, not a failure), `1` if any lesson failed to fetch. The full
@@ -243,7 +344,7 @@ On first run, the CLI prompts you to choose your AI coding tool. Artifacts are w
243
344
  | Gemini CLI | `.gemini/` | `GEMINI.md` |
244
345
  | Generic | `.ai/` | `AGENTS.md` |
245
346
 
246
- Override anytime with `--tool <name>`. Your choice is saved in `~/.config/10x-cli/config.json`.
347
+ Override with `--tool <name>`. Validated writing commands save your choice in `~/.config/10x-cli/config.json`. Previews leave it unchanged.
247
348
  The former `windsurf` ID remains accepted as an alias and is upgraded to
248
349
  `devin-desktop`; existing `.windsurf/` artifacts can be migrated by the normal
249
350
  tool-switch prompt.
@@ -272,3 +373,46 @@ CI runs lint, typecheck, tests, and build checks on every PR. Releases are autom
272
373
  ## License
273
374
 
274
375
  MIT
376
+
377
+ ## Course selection and project edition
378
+
379
+ `get`, `list`, and `sync` select the explicit `--course` first, then the project's edition, then the live API recommendation. A new project with only v3 access selects v3, with only v4 selects v4, and with both selects published, available v4. An unpublished v4 can leave v3 as the recommendation; network or backend failures are reported instead of falling back. Output includes the course and selection reason.
380
+
381
+ The first validated write records `{ "version": 1, "course": "10xdevs4" }` (or `10xdevs3`) in the root `.10x-cli.json`, shared across AI tool profiles. Existing supported v2/v3 manifests preserve their recorded edition. All profiles, including legacy Windsurf, must agree. Corrupt, unknown-version, or conflicting manifests block writes and must be preserved for repair. Artifact names never infer an edition.
382
+
383
+ Ordinary `get` and `sync` cannot change a bound project's edition. Start v4 in a separate directory while retaining the v3 project. Read-only inspection of another entitled edition is allowed with `--course`. Do not delete the binding or manifests to bypass an edition conflict. Course edition and manifest schema version are separate concepts.
384
+
385
+ `list`, `get --print`, `get --dry-run`, `sync --dry-run`, and `doctor` preserve project files and tool/language preferences, including interactive tool choices. Auth token rotation may update only the credential store. Failed download, signature, course, or path validation leaves a new project unbound. Once writing starts, its binding remains even if an I/O operation fails, so retry stays on the same edition. `auth --status` and `doctor` distinguish token expiry from live course access.
386
+
387
+
388
+ ## Candidate verification and v4 release
389
+
390
+ Using v4 requires a CLI version with course discovery and project edition binding.
391
+ Existing v3 projects remain usable without a new flag or an edition migration.
392
+ Start v4 in a separate project directory; this release includes no edition migration
393
+ command. Support files inside each skill directory are downloaded together with
394
+ `SKILL.md`, including selector and stack-assessment references.
395
+
396
+ Before publication, CI tests the exact CLI and Toolkit candidate commits together
397
+ on Linux and Windows using real local auth callback, polling and token refresh.
398
+ It also exercises the actual released npm 1.20.0 CLI against the candidate API and
399
+ this candidate against existing v2/v3-manifest projects. Automated fixtures send no
400
+ emails. npm latest or a different branch cannot stand in for the candidate binary.
401
+
402
+ The private Toolkit release runbook `docs/how-to/release-10xdevs4-cli.md` documents
403
+ the required full candidate SHA pair, vetted v3 fixture artifact, exact v4 stage
404
+ and secured preparation Worker/content revisions. Publication depends on the
405
+ coordinated gate plus normal Linux/Windows tests, builds and smoke checks. The
406
+ operator must still verify secured production access and final v4 content before
407
+ npm publication; passing a local test does not execute that rollout.
408
+
409
+ For deterministic contract checks, export `/openapi.json` from the exact local
410
+ candidate Worker, then run:
411
+
412
+ ```bash
413
+ OPENAPI_SPEC_PATH=/absolute/candidate-openapi.json bun run generate-types --check
414
+ ```
415
+
416
+ Check mode reads that file and compares the generated result without changing
417
+ `src/generated/api-types.ts`. To regenerate, omit `--check` while keeping the same
418
+ source file. Do not regenerate candidate contracts from the production API.