Square CLI
$ square Official High RiskSquare CLI (square) gives developers and coding agents direct access to Square catalog, orders, payments, inventory, and customer APIs. Purpose-built for LLM discovery with square --llms --format json command manifests and per-command --schema JSON Schema output.
npm install -g @square/cli square exposes full --llms and --schema introspection locally for scriptable commerce calls; Square MCP is better when hosting remote OAuth-delegated assistant sessions.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
First-class agent ergonomics with --llms, per-command --schema, and --format json across API resources.
square --llms --format jsonexports machine-readable command manifests- Every subcommand supports
--schemaintrospection
Separates Sandbox and Production profiles cleanly, though live payment and catalog API calls mutate merchant/billing state.
- Supports Sandbox isolation and explicit
--schemavalidation
Installable via npm install -g @square/cli, npx -y @square/cli, and standalone GitHub release binaries.
- Cross-platform binaries and npm/npx distribution
Covers Square's entire commerce API surface without writing boilerplate SDK scripts.
- Maps catalog, orders, payments, inventory, and locations directly to CLI verbs
Official Square repository (square/cli), though distributed under proprietary Square Developer Terms rather than an OSI license.
- Published and maintained directly by Square (
square about)
Self-documenting via --schema and --llms alongside Square Developer documentation.
- Built-in
--schemaand--llmsoutputs match live CLI behavior
Security, Auth & Guardrails
Stores Sandbox and Production profile tokens in local Square CLI configuration under ~/.square/ or accepts access tokens via environment variables and flags.
CLI is free under Square Developer Terms; live payment processing incurs standard Square transaction fees.
# Square CLI (square) Agent Rules - Run `square --llms --format json` and `<cmd> --schema` instead of guessing API flags. - Target Sandbox credentials before testing payments, refunds, or order mutations. - Never execute live production charges or refunds without explicit human confirmation.
Agent-Ready Command Recipes
Safe Read-Only Queries
square --llms --format json
Emits the complete Square CLI command tree and descriptions as structured JSON for agent planning.
square catalog list --schema
Prints the exact argument, flag, and payload JSON Schema before invoking the Square API.
Controlled Writes & Previews
square locations list --format json
Fetches merchant locations from the active Square profile in machine-readable JSON.
Strengths for Agents
- + Native
--llmsand--schemaflags let agents discover exact command contracts in zero guesswork. - + Clean JSON/YAML formatting with
--format jsonandnpx -y @square/cliportability.
Caveats & Pitfalls
- ! Proprietary software subject to Square Developer Terms rather than an open-source license.
- ! Production tokens can trigger real payments, refunds, and catalog edits if Sandbox is not enforced.