Skip to main content

Upgrade to Ninka 0.7.0

0.7.0 changes one thing a project can observe: the name of the CLI command. No artifact moves, no policy changes meaning, and no runtime API is touched. If your project never types the command — because CI and package scripts do — the work is one search and replace in those files.

npm install ninka-authz@0.7.0

CLI command renamed

The npm package and CLI command now use the same name.

Command
Before 0.7npx ninka compile
0.7 and laternpx ninka-authz compile

The npm package remains ninka-authz. Every subcommand keeps its name, its flags and its exit codes; only the executable in front of them is renamed.

This removes an npm resolution ambiguity: when ninka-authz was not installed locally, npx ninka could resolve the unrelated registry package named ninka and run it. A project that had never installed Ninka could watch npx ninka docs succeed at doing something else entirely. Documenting that as a caveat would have left the path in place, so the path was removed instead — one name for the package and the command, and nothing to resolve to the wrong thing.

There is no compatibility shim. ninka is not published as a second bin, not aliased and not redirected: a retired command that still works is a migration that never finishes.

What to change

Everywhere ninka is invoked as a command — and nowhere else:

npx ninka init → npx ninka-authz init
npx ninka compile → npx ninka-authz compile
npx ninka build → npx ninka-authz build
npx ninka verify → npx ninka-authz verify
npx ninka docs → npx ninka-authz docs
npx ninka explain → npx ninka-authz explain

The places worth checking, in the order they bite:

  1. CI. A workflow step that still calls ninka verify fails with "command not found" on the first run after the upgrade. That is the loudest of these, and the cheapest to fix.
  2. package.json scripts. Same failure, one directory closer to you.
  3. AGENTS.md. The scaffolded rules tell your coding agent to run the compile command by name. init writes the new name, but it never rewrites rules that are already there — an existing AGENTS.md keeps the line you committed, so change it yourself. An agent following a stale rule will report a command that does not exist rather than write authorization inline, but it will not get past it.
  4. Your own runbooks and READMEs.

Nothing under ninka/ changes. The workspace directory, the artifacts in ninka/out/, the Consumer Projection's exported names (createNinka, policies) and the ninka-authz/runtime import are all untouched — the brand is still Ninka, and only the executable was renamed.

Check

npx ninka-authz verify
✔ invoice-access: match (tegata_hash c2b55b92fb53…)
✔ src/generated/ninka.ts: Consumer Projection matches (1 policy)
verify: all artifacts match

If the artifacts still match, the upgrade is done: 0.7.0 does not rebuild anything. A rebuild is still needed for the ordinary reason — generated_by records the release that produced each artifact — so run npx ninka-authz build and commit the result whenever you want that provenance current.

See also

  • Upgrade to 0.8.0 — the next upgrade, which moves the Consumer Projection's reference syntax in both languages.
  • CLI — the full command surface under its new name.
  • Upgrade to 0.6.0 — the previous upgrade, which moves artifacts and is written against the command name of its own release.