@oml/cli
v0.18.0
Published
The cli specific package
Readme
OML CLI
@oml/cli is the command-line interface for linting, exporting, reasoning over, rendering, and validating OML workspaces.
Package Layout
- package.json - package manifest and published CLI entry
- bin/cli.js - executable entrypoint used by the published
omlcommand - src/main.ts - TypeScript entrypoint
- src/cli.ts - command registration and top-level CLI wiring
- src/commands -
lint,export,reason,render,validate, andservercommand implementations
Instructions
Use the public npm registry for @oml/* packages:
registry=https://registry.npmjs.org/
@oml:registry=https://registry.npmjs.org/From the repo:
node ./packages/cli/bin/cli.js --helpWhen installed, the command name is oml.
The CLI uses the built-in production OML Platform endpoint by default. Set OML_PLATFORM_API_URL=<url> to override it.
Quick Start
# Sign in
oml login
# Lint the current workspace
oml lint
# Start the OML server
oml start
# Stop the OML server
oml stop
# Export asserted OWL files
oml export -o build/owl
# Run consistency reasoning (check-only)
oml reason
# Run consistency reasoning and persist entailments
oml reason -o build/owl
# Render markdown to static HTML
oml render -m src/md -b build/webGlobal Options
-v, --version— print the version number-d, --debug— print detailed error diagnostics (stack traces and nested causes)
Commands
loginRuns GitHub device-flow sign-in, exchanges the GitHub token with the OML Platform, and stores the returned platform session.logoutRemoves the local sign-in session.whoamiPrints the current sign-in session.lintValidates one file, or the current workspace when no file is given.export [-o|--owl <dir>] [-f|--format <ttl|trig|nt|nq|n3>] [--pretty]Exports asserted OWL files (no reasoning or entailment materialization).reason [-o|--owl <dir>] [-f|--format <ttl|trig|nt|nq|n3>] [--pretty] [-u|--unique-names-assumption <true|false>] [-e|--explanation <true|false>]Runs workspace consistency checks. Without--owl, runs in check-only mode with no file output. With--owl, persists assertions and entailments to the given folder.render -m|--md <input-folder> -b|--web <output-folder> [-c|--context <model-path>]Runslint, then renders markdown files to static HTML. The optional--contextsets the workspace-relative.omlmodel path used as the default navigation context for wikilinks.validateValidates table-editor SHACL blocks in workspace markdown files. Runslintfirst.start [port] [-p|--port <port>] [-w|--workspace <workspace>]Starts the OML server. When no port is provided, an available port is selected automatically. UseOML_PLATFORM_API_KEYfor non-interactive (CI) start; otherwise an interactive OAuth login is triggered if no session is stored.stopStops the running OML server.statusPrints the OML server status.listShows all actively running OML servers.
