$npx -y skills add mvanhorn/cli-printing-press --skill learn-disabled-examplePrinting Press CLI for Learn Disabled Example. Golden fixture exercising the learn.disabled generation-time opt-out.
| 1 | # Learn Disabled Example — Printing Press CLI |
| 2 | |
| 3 | ## Prerequisites: Install the CLI |
| 4 | |
| 5 | This skill drives the `learn-disabled-example-pp-cli` binary. **You must verify the CLI is installed before invoking any command from this skill.** If it is missing, install it first: |
| 6 | |
| 7 | 1. Install via the Printing Press installer. It defaults binaries to `$HOME/.local/bin` on macOS/Linux and `%LOCALAPPDATA%\Programs\PrintingPress\bin` on Windows: |
| 8 | ```bash |
| 9 | npx -y @mvanhorn/printing-press-library install learn-disabled-example --cli-only |
| 10 | ``` |
| 11 | 2. Verify: `learn-disabled-example-pp-cli --version` |
| 12 | 3. Ensure the reported install directory is on `$PATH` for the agent/runtime that will invoke this skill. |
| 13 | |
| 14 | If the `npx` install fails before this CLI has a public-library category, install Node or use the category-specific Go fallback after publish. |
| 15 | |
| 16 | If `--version` reports "command not found" after install, the runtime cannot see the binary directory on `$PATH`. Do not proceed with skill commands until verification succeeds. |
| 17 | |
| 18 | Golden fixture exercising the learn.disabled generation-time opt-out. With |
| 19 | the self-learning loop on by default for every fresh print, this fixture |
| 20 | pins the ONLY sanctioned way to print without it: `learn.disabled: true`. |
| 21 | The locked artifacts must carry no internal/learn tree, no |
| 22 | teach/recall/learnings commands, no learn store schema, and no |
| 23 | self-learning sections in README.md / SKILL.md / AGENTS.md. A regression |
| 24 | here means either the opt-out stopped working (learn surface appears) or |
| 25 | the default leaked into an opted-out spec. |
| 26 | |
| 27 | |
| 28 | ## When Not to Use This CLI |
| 29 | |
| 30 | Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis. |
| 31 | |
| 32 | ## Command Reference |
| 33 | |
| 34 | **games** — Minimal syncable resource so the disabled shape still keeps its profile-derived store; the opt-out must remove the learn surface, not the ordinary data layer. |
| 35 | |
| 36 | - `learn-disabled-example-pp-cli games` — List games |
| 37 | |
| 38 | |
| 39 | ### Finding the right command |
| 40 | |
| 41 | When you know what you want to do but not which command does it, ask the CLI directly: |
| 42 | |
| 43 | ```bash |
| 44 | learn-disabled-example-pp-cli which "<capability in your own words>" |
| 45 | ``` |
| 46 | |
| 47 | `which` resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code `0` means at least one match; exit code `2` means no confident match — fall back to `--help` or use a narrower query. |
| 48 | |
| 49 | ## Auth Setup |
| 50 | |
| 51 | Run `learn-disabled-example-pp-cli auth setup` for the URL and steps to obtain a token (add `--launch` to open the URL). Then store it: |
| 52 | |
| 53 | ```bash |
| 54 | learn-disabled-example-pp-cli auth set-token YOUR_TOKEN_HERE |
| 55 | ``` |
| 56 | |
| 57 | Or set `LEARN_DISABLED_TOKEN` as an environment variable. |
| 58 | |
| 59 | Run `learn-disabled-example-pp-cli doctor` to verify setup. |
| 60 | |
| 61 | ## Agent Mode |
| 62 | |
| 63 | Add `--agent` to any command. Expands to: `--json --compact --no-input --no-color --yes`. |
| 64 | |
| 65 | - **Pipeable** — JSON on stdout, errors on stderr |
| 66 | - **Filterable** — `--select` keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs: |
| 67 | |
| 68 | ```bash |
| 69 | learn-disabled-example-pp-cli games --agent --select id,name,status |
| 70 | ``` |
| 71 | - **Previewable** — `--dry-run` shows the request without sending |
| 72 | - **Offline-friendly** — sync/search commands can use the local SQLite store when available |
| 73 | - **Non-interactive** — never prompts, every input is a flag |
| 74 | - **Read-only** — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests |
| 75 | |
| 76 | ### Response envelope |
| 77 | |
| 78 | Commands that read from the local store or the API wrap output in a provenance envelope: |
| 79 | |
| 80 | ```json |
| 81 | { |
| 82 | "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."}, |
| 83 | "results": <data> |
| 84 | } |
| 85 | ``` |
| 86 | |
| 87 | Parse `.results` for data and `.meta.source` to know whether it's live or local. A human-readable `N results (live)` summary is printed to stderr only when stdout is a terminal AND no machine-format flag (`--json`, `--csv`, `--compact`, `--quiet`, `--plain`, `--select`) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout. |
| 88 | |
| 89 | ## Paths and state |
| 90 | |
| 91 | Agents should treat the CLI's path resolver as part of the runtime contract: |
| 92 | |
| 93 | - Use `--home <dir>` for one invocation, or set `LEARN_DISABLED_EXAMPLE_HOME=<dir>` to relocate all four path kinds under one root. |
| 94 | - Use per-kind env vars only when a specific kind must diverge: `LEARN_DISABLED_EXAMPLE_CONFIG_ |