OpenSkopos

@openskopos/cli

@openskopos/cli is the skopos command line tool for OpenSkopos documents. One package runs in Node on Linux, macOS and Windows.

The commands are the commands of the native skopos tool, built to WebAssembly in @openskopos/core. They have the same flags, output and exit codes. This package only connects the commands to the files and the terminal.

Use

You can use the tool without an installation. Use npx:

npx @openskopos/cli check intent.skopos.json

To install the skopos command globally, run:

npm install --global @openskopos/cli

The package needs Node 20 or later.

Commands

Command What it does
skopos check FILE... Compares documents with the schema and the rules of the specification.
skopos fmt FILE... Writes documents again with the canonical layout.
skopos convert FILE --to json|yaml|md Changes a document from JSON, YAML or Markdown to one of the other formats.
skopos import FILE.md --stored FILE Reads an edited Markdown file, and writes the version that you must store.
skopos ids FILE... Adds an ID to each item that has no ID.
skopos export FILE --to openspec|kiro|speckit Writes the files of a spec-driven development tool.
skopos diff OLD NEW Shows the items that are different in two versions.
skopos history FILE... Shows what each version decided, then the items in force now.
skopos trace REF FILE... Shows the life of one item across versions and artifacts.
skopos merge MAIN OTHER [--base FILE] Merges two documents into the next version of main.
skopos conflicts FILE Lists the open conflicts of a merged document.
skopos resolve FILE ID Accepts an item of a conflict and rejects the other.
skopos render FILE [--html] Shows a document for people, as text or as an HTML page.

For the flags, run skopos --help or skopos <command> --help. The README of the native tool describes each command.

Exit codes:

Some details are different from the native tool:

License

Apache License 2.0