CLI
Reference for the appstrate command-line tool — 9 commands, flags, profile workflow.
The appstrate CLI drives an Appstrate instance: auth, profile switching, API passthrough, schema inspection, and spinning up a new local instance via appstrate install. It ships as a Bun package and uses the Bun runtime already on the host.
Get the CLI
bun install -g appstratePuts a permanent appstrate on your PATH. Requires Bun. Works on macOS, Linux, and Windows.
Driving the CLI from a coding agent
Install the Appstrate Agent Skill into your coding agent (Claude Code, Cursor, Antigravity, any AGENTS.md-aware host). The skill teaches the CLI, AFPS packaging, REST API, profiles, and ships a curl → appstrate api cheat sheet — no manual pointing required.
apps/cli/AGENTS.md in the appstrate-oss monorepo is also auto-discovered by agents running in the checkout. See Coding Agents for the pattern.
Commands
Profile workflow
Switch between instances with --profile:
appstrate --profile prod login --instance https://appstrate.acme.com
appstrate --profile prod whoami
appstrate --profile default whoamiEach profile has its own instance URL, pinned org/app, and tokens under a distinct keyring entry. Profiles are persisted in ~/.config/appstrate/config.toml.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic failure |
2 | Invalid arguments |
3 | Authentication required (run appstrate login) |
4 | Network or instance unreachable |
Reference
- Full command reference (with every flag):
apps/cli/README.mdin the monorepo. - REST API:
/docs/api/introduction.