@schemahatch/cli
v0.1.2
Published
SchemaHatch command line client
Maintainers
Readme
SchemaHatch CLI
Command line client for SchemaHatch public automation workflows.
Install
npm install -g @schemahatch/cliLogin
schemahatch auth loginThe default login opens a browser and creates a workspace-scoped read token that can also submit feedback. To explicitly request workspace write access:
schemahatch auth login --writeOn remote shells where a browser cannot open automatically, use the device-code flow:
schemahatch auth login --no-browserFor self-hosted or local SchemaHatch instances, point the CLI at the API:
schemahatch auth login --api-url "http://<host>:9000/api"The CLI stores credentials in the local user config directory. Environment variables override stored credentials, which is useful for CI.
Commands
schemahatch auth status
schemahatch auth logout
schemahatch projects list
schemahatch state replace --project <id> --branch <id> --dbml schema.dbml --workspace workspace.json
schemahatch revision save-live --project <id> --branch <id> --label "baseline"
schemahatch feedback send --kind bug --title "Import failed" --description-file feedback.md
schemahatch --helpEnvironment
export SCHEMAHATCH_PUBLIC_API_URL="https://example.com/api/public/v1"
export SCHEMAHATCH_AUTOMATION_TOKEN="erd_at_..."You can also set ERD_TOOL_API_URL to an API base URL ending in /api.
