Install the CLI
Install @farthershore/cli and authenticate with a maker token.
Install @farthershore/cli and authenticate with a maker token.
The farthershore CLI is how you create, build, and publish products from the
terminal — and the way coding agents operate the platform. Every command
supports --format json for non-TTY scripting, and anything an agent can do
over MCP it can also do here.
npm install -g @farthershore/cli
Or run it without installing:
npx @farthershore/cli --help
Confirm it's on your PATH:
farthershore --version
Create a maker token (prefix mk_) at
farthershore.com/settings/tokens,
then store it locally:
# Interactive — prompts for the token (TTY only)
farthershore auth login
# Non-interactive — pass it directly (CI / agents)
farthershore auth login --token mk_xxx
Tokens are written to ~/.farthershore/credentials.json. A maker token is
exchanged for a short-lived CLI access token on the first authenticated request.
Verify who you are, then you're ready:
farthershore auth whoami # current org, role, scopes
farthershore auth logout # clear stored credentials
For CI and agents, skip the credentials file entirely by exporting the token — the CLI is fully non-interactive whenever a token is present:
export FARTHERSHORE_TOKEN=mk_xxx
| Variable | Description |
|---|---|
FARTHERSHORE_TOKEN | API token; overrides stored credentials. |
FARTHERSHORE_API_URL | Platform Core API URL (default https://core.farthershore.com). |
FARTHERSHORE_ENV | Default environment scope when --env is omitted. |
Every command accepts these:
| Flag | Description |
|---|---|
--token <token> | Override the auth token for this command. |
--api-url <url> | Override the Core API URL. |
--env <environment> | Environment scope (use production/prod/main). |
--format <format> | json for machine-readable output (default for non-TTY). |
--version | Show the CLI version. |
--help | Show help for any command. |
The CLI is organized by what you're operating on. The ones you'll use first:
| Group | What it does |
|---|---|
auth | Log in, log out, show the current identity. |
build | Compile product/product.config.ts to Manifest IR locally. |
product | Create, show, update, publish, and check the status of products. |
plan | Create, list, update, and migrate plans on a product. |
env | Manage preview environments bound to git branches. |
backend | Declare BYO backends and mint runtime tokens (FS_RUNTIME_TOKEN). |
persona | Mint test API keys (fsk_test_*) to exercise the gateway. |
connect | Report GitHub / Stripe connection status (the flows are browser-only). |
Run farthershore <group> --help for the commands in a group, or
farthershore <group> <command> --help for a single command's flags.
The CLI exits 0 on success and 1 on any failure. On an API error it prints a
stable bracketed code plus a one-line remediation hint:
Error [STRIPE_NOT_CONFIGURED]: connect Stripe before running billing operations
Hint: Stripe isn't connected on this product. Connect it in the dashboard.
The bracketed code is stable across releases — branch on it in scripts.
farthershore auth whoami --format json emits a stable JSON shape for CI.
There is also an MCP stdio server that projects the same operations as
fs_* tools from the same registry:
FARTHERSHORE_TOKEN=mk_xxx npx -p @farthershore/cli farthershore-mcp
Every fs_* tool has a sibling CLI command by construction. See
MCP for agents for the tool catalog.
You're authenticated. Head to the Quickstart to create and publish your first product.