The Square CLI (square) gives you and your AI agents command-line access to
the public Square API: catalog, orders, payments, customers, inventory, and
more. Every command follows a predictable shape and returns structured output
you can pipe, filter, and hand to a model.
Note
The Square CLI is in Beta. To give feedback or report a bug, open an issue.
Documentation: developer.squareup.com/docs/cli
Install from npm (requires Node.js):
npm install -g @square/cli
square --versionOr run it without installing:
npx -y @square/cli --helpPrebuilt binaries for macOS, Linux, and Windows are attached to each
release. Download the one for your
platform, verify it against checksums.txt, and put it on your PATH. For
example, on an Apple silicon Mac:
shasum -a 256 --check --ignore-missing checksums.txt
chmod +x square-darwin-arm64
xattr -d com.apple.quarantine square-darwin-arm64 # only if you downloaded it in a browser
mv square-darwin-arm64 /usr/local/bin/squareLinux binaries need glibc (for example, Debian or Ubuntu). Alpine and other musl-based distributions aren't supported.
If you redistribute a binary, include THIRD-PARTY-NOTICES.md from the same
release.
Sign in with your Square account in the browser (OAuth with PKCE):
square auth login
square auth statusIf the CLI can't open a browser, run square auth login --no-open to print the
authorization URL instead. Sign-in returns to http://localhost:5000 on the
machine running the CLI, so on a remote host, forward that port first
(ssh -L 5000:localhost:5000 HOST) and open the URL in your local browser.
The CLI doesn't accept access tokens. It ignores the SQUARE_ACCESS_TOKEN
environment variable. To call Square from CI or a server with an access token,
use the Square API
directly.
See Authentication for all options.
Commands follow the shape square <domain> <resource> <verb> [args] [options]:
square catalog item list --limit 10
square payments payment get PAYMENT_ID
square orders order search --location-ids LOCATION_IDRun --help at any level to see what's available:
square --help
square catalog --help
square catalog item --helpFor every command, see the command reference.
Output is JSON by default. Use --format for toon, yaml, md, or jsonl,
and --filter-output to keep only the fields you need:
square catalog item list --filter-output 'objects[].id,objects[].itemData.name'square --llms --format json # every command and its description
square catalog item list --schema # JSON Schema for one command
square skills add # sync skill files into your agentThe CLI doesn't run as an MCP server. To connect an MCP client to Square, use the Square MCP server.
The Square CLI is proprietary software. Your use is subject to the Square Developer Terms of Service. This repository doesn't contain the CLI source code. See LICENSE.