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
| Flag | Purpose |
|---|---|
--app=NAME | Target a specific app. Defaults to the linked app from .ownstack-config. |
--stack=NAME_OR_ID | Target a specific stack. Required when multiple stacks are deployable. |
--json | Machine-readable output where supported. |
--help / -h | Per-command usage. |
--wait | Stream live output for long-running operations (deploys, restores). |
Reference index
ownstack app— list, info, stacks, domains, lifecycle.ownstack deploy— git or image deploys.ownstack db— Postgres / MySQL operations.ownstack stack— stack-level operations and backups.ownstack profile— control-plane profiles.ownstack config— environment variables.ownstack ssh— interactive shells.
Other top-level commands
| Command | Purpose |
|---|---|
ownstack login | OAuth into a control plane; saves a profile. |
ownstack profile use NAME | Switch active control plane. |
ownstack generate [name] [components...] | Generate a new app from scratch. |
ownstack import [dir] --name=NAME | Import an existing repo as a buildpack-style app. |
ownstack adopt [dir] | Retroactively add OwnStack infrastructure to a manually-scaffolded app. |
ownstack remote -a NAME | Link 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 APP | Restart all processes. |
ownstack destroy | Destroy the linked app. |
ownstack preflight | Pre-deploy sanity checks ($PORT usage, Procfile, deps, git state). |
ownstack ai:setup | Generate AI-assistant context files (CLAUDE.md, .cursorrules). |
ownstack status | Inventory of all linked apps and infra status. |
Top-level help
$ ownstack help
Always reflects what's actually available in your installed CLI version.