Skip to content

CLI core

FieldValue
Slugcli-core
Statusimplemented
Last review2026-08-10

Summary

npm package @zortracks/skli runnable via npx @zortracks/skli {command} {options} (binary name skli). Command and option parsing with Commander. Single entry point, global version and help.

User flows

Flow-01 — Show help

Persona: developer.
Preconditions: Node.js installed; skli package available (local or registry).

StepActionExpected resultError
1npx @zortracks/skli --help or npx @zortracks/skli -hList of commands (init, install, add, …) and global options
2npx @zortracks/skli -VPackage semver version

Flow-02 — Unknown command

StepActionExpected resultError
1npx @zortracks/skli unknownCommander error message + exit code ≠ 0unknown command

Data model

Nothing persisted by this feature (delegates to manifests).

CLI

skli [options] [command]

Options:
  -V              Display version (reserved; `update --version` pins a Package)
  -h, --help      Display help

Commands:
  init                  Initialize the ProjectManifest for the git repository
  install <ide> <kind> <source>  Install Package(s) for IDE(s) from a Source
  add <ide> <kind> <path>  Reference a local Package in the ProjectManifest
  link <ide> <source>   Link a remote ProjectManifest (select packages)
  update …              Upgrade repos Packages and linked manifests
  restore …             Re-fetch repos Packages / links at pinned version
  remove …              Uninstall Packages from Manifest (and optionally disk)
  unlink <id>           Unlink a remote ProjectManifest link (owner/repo or URL)

Business rules

IdRule
BR-cli-core-001The npm binary is named skli (package.jsonbin.skli).
BR-cli-core-002Node ESM runtime ("type": "module").
BR-cli-core-003Parsing library: commander only for CLI routing.
BR-cli-core-004With no subcommand, show help (or equivalent Commander behavior).

User scenarios

A user discovers skli via npx @zortracks/skli --help, sees init, install, add, link, update, restore, remove, and unlink, then continues with one of those commands.

Dependencies

Out of scope

  • Shell autocompletion.
  • Automatic CLI updates.
  • Plugins / third-party commands.

Acceptance criteria

  • [x] npx @zortracks/skli --help lists init, install, add, link, update, restore, remove, and unlink.
  • [x] npx @zortracks/skli -V shows the package version (--version reserved for update).
  • [x] TypeScript package is buildable; CLI entry with shebang.

Terminology

See domain-glossary.

Implementation notes

Target structure: src/cli.ts, src/commands/*, src/lib/*; build to dist/; bin points to the compiled entrypoint.

Released under the MIT License.