Strait Docs
CLI

Utility commands for configuration, aliases, contexts, and system information.

alias set

Set a command alias. Aliases expand the first argument before parsing.

strait alias set st stats

alias list

List all configured aliases.

strait alias list

alias delete

Delete a command alias.

strait alias delete st

context create

Create or update a named context for connecting to different servers or projects.

FlagTypeDefaultDescription
--serverstringServer URL
--projectstringDefault project
--formatstringOutput format
--api-keystringAPI key (stored securely in keychain)
strait context create production --server https://strait.dev --project main

context use

Set the active context.

strait context use production

context list

List all available contexts.

strait context list

context current

Show the settings of the currently active context.

strait context current

profile

Capture a pprof profile from the running server.

FlagTypeDefaultDescription
--output, -ostringOutput file path
--durationduration30sProfile duration
--typestringcpuProfile type (cpu, heap, goroutine, allocs, block, mutex, threadcreate)
strait profile --type heap --output heap.prof

api

Call raw API endpoints directly.

FlagTypeDefaultDescription
--headerstring[]Custom HTTP headers
--fieldstring[]Request body fields
strait api POST /v1/runs --field project=default --field job=my-job

run

Run a command with strait context environment variables injected.

strait run -- env | grep STRAIT

Injected variables include STRAIT_SERVER, STRAIT_API_KEY, and others from the active context.

send

Send a raw event payload to the server.

FlagTypeDefaultDescription
--datajsonEvent payload data
strait send my-event --data '{"key": "value"}'

wait run

Wait for a specific run to reach a certain condition.

FlagTypeDefaultDescription
--forstringstatus=completedCondition to wait for
--timeoutduration5mMaximum wait time
--intervalduration2sCheck interval
strait wait run <run_id> --for status=failed

wait queue

Wait for the queue to reach a specific state.

FlagTypeDefaultDescription
--emptyboolfalseWait for the queue to be empty
--timeoutduration10mMaximum wait time
--intervalduration2sCheck interval
strait wait queue --empty

version

Print version information.

FlagTypeDefaultDescription
--shortboolfalsePrint only the version number
--jsonboolfalseOutput in JSON format
--check-serverboolfalseCheck server version
--check-updateboolfalseCheck for CLI updates
strait version --check-server

completion

Generate shell completion scripts.

strait completion zsh > ~/.zshrc.d/_strait

Supported shells: bash, zsh, fish, powershell.

docs

Generate CLI documentation.

FlagTypeDefaultDescription
--manboolfalseGenerate man pages
--markdownboolfalseGenerate Markdown documentation
strait docs --markdown

upgrade

Upgrade the CLI to the latest version.

strait upgrade

extension list

List discovered CLI extensions.

strait extension list

extension run

Run a CLI extension.

strait extension run my-ext

Extensions are executables named strait-<name> found in your PATH.

Was this page helpful?

On this page