CLI reference

The ownstack CLI is the primary driver. Every dashboard action has a CLI equivalent; many CLI commands have no UI equivalent. Always check the active profile before state-changing commands.

Anatomy

ownstack <command> [<subcommand>] [options]

Top-level commands group around resources: app, db, stack, deploy, profile, config, ssh, remote, create, destroy. Each may have subcommands.

Common flags

FlagPurpose
--app=NAMETarget a specific app. Defaults to the linked app from .ownstack-config.
--stack=NAME_OR_IDTarget a specific stack. Required when multiple stacks are deployable.
--jsonMachine-readable output where supported.
--help / -hPer-command usage.
--waitStream live output for long-running operations (deploys, restores).

Reference index

Other top-level commands

CommandPurpose
ownstack loginOAuth into a control plane; saves a profile.
ownstack profile use NAMESwitch active control plane.
ownstack generate [name] [components...]Generate a new app from scratch.
ownstack import [dir] --name=NAMEImport an existing repo as a buildpack-style app.
ownstack adopt [dir]Retroactively add OwnStack infrastructure to a manually-scaffolded app.
ownstack remote -a NAMELink the current repo to an app.
ownstack remote logs ...Tail runtime logs.
ownstack remote run APP CMD…One-off command in a fresh container.
ownstack remote restart APPRestart all processes.
ownstack destroyDestroy the linked app.
ownstack preflightPre-deploy sanity checks ($PORT usage, Procfile, deps, git state).
ownstack ai:setupGenerate AI-assistant context files (CLAUDE.md, .cursorrules).
ownstack statusInventory of all linked apps and infra status.

Top-level help

$ ownstack help

Always reflects what's actually available in your installed CLI version.