Farther ShoreDocs
Go to Farther Shore
What is FartherShore
Install the CLI
InstallAuthenticateEnvironment variablesGlobal flagsCommand groupsFor agentsNext
Quickstart
Core concepts
The @Product class
Meters & resources
Features & routes
Capabilities & entitlements
Plans & pricing
The Manifest IR
Bring your own backend
Transport modes
Metering & verification
Runtime tokens
Frontend SDK
Root & data components
Auth & sessions
Entitlement gates
Connect Stripe
Subscriptions & usage
Plan changes & grandfathering
Billing strategies
Apply & deploy
Environments
Migrations
Docs versions & archive
Operate with an agent
Operation classes
MCP server
End-to-end via CLI/MCP
CLI reference
@farthershore/product
@farthershore/backend
@farthershore/farthershore-js
Environment variables
Response & deny codes
Add a metered capability
Gate a feature
Change a price
Prepaid credits
Meter AI tokens
Operate via an agent
Prepare for launch
Status
Docs/Get started/Install the CLI

Install the CLI

Install @farthershore/cli and authenticate with a maker token.

PreviousWhat is FartherShoreNextQuickstart

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.

Install

npm install -g @farthershore/cli

Or run it without installing:

npx @farthershore/cli --help

Confirm it's on your PATH:

farthershore --version

Authenticate

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

Environment variables

VariableDescription
FARTHERSHORE_TOKENAPI token; overrides stored credentials.
FARTHERSHORE_API_URLPlatform Core API URL (default https://core.farthershore.com).
FARTHERSHORE_ENVDefault environment scope when --env is omitted.

Global flags

Every command accepts these:

FlagDescription
--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).
--versionShow the CLI version.
--helpShow help for any command.

Command groups

The CLI is organized by what you're operating on. The ones you'll use first:

GroupWhat it does
authLog in, log out, show the current identity.
buildCompile product/product.config.ts to Manifest IR locally.
productCreate, show, update, publish, and check the status of products.
planCreate, list, update, and migrate plans on a product.
envManage preview environments bound to git branches.
backendDeclare BYO backends and mint runtime tokens (FS_RUNTIME_TOKEN).
personaMint test API keys (fsk_test_*) to exercise the gateway.
connectReport 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.

For agents

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.

Next

You're authenticated. Head to the Quickstart to create and publish your first product.