Using Appstrate

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 appstrate

Puts 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 whoami

Each 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

CodeMeaning
0Success
1Generic failure
2Invalid arguments
3Authentication required (run appstrate login)
4Network or instance unreachable

Reference

On this page