Agent-friendly access to Polylayer’s public v1 API. Both executable names are identical:
polylayer --help
plyr --helpWith npm:
npm install --global @polylayer/cliUntil the npm package is published, install the same npm package from GitHub:
npm install --global github:polylayer/polylayer-cliOr install the latest checksummed release artifact:
curl -fsSL https://raw.githubusercontent.com/polylayer/polylayer-cli/refs/heads/main/install.sh | shThe installer downloads a versioned release archive and SHA256SUMS, verifies
the archive, installs its runtime under ~/.local/lib/polylayer-cli and the
polylayer/plyr command links under ~/.local/bin, and never uses sudo.
Pin a release with POLYLAYER_VERSION=0.1.1.
Create a unified or paper-only key in Polylayer Settings → API Keys, then:
polylayer login plyr_...
polylayer whoami
polylayer doctorKey precedence is --key, POLYLAYER_API_KEY, then the owner-only config file
at ${XDG_CONFIG_HOME:-~/.config}/polylayer/config.json. The CLI never prints
the key.
polylayer positions --platform hyperliquid
polylayer fills --platform polymarket
polylayer paper accounts
polylayer paper create '{"displayName":"Agent sandbox","startingCapitalUsd":25000}'
polylayer paper order paper_123 order.json
polylayer paper portfolio paper_123The paper username is required only for the first sandbox. Paper starting capital cannot be reset or topped up; create a new sandbox instead.
polylayer docs > polylayer-docs.md
polylayer strategies schema > strategy-schema.json
polylayer strategies validate strategy.json
polylayer strategies create strategy.json --yes
polylayer strategies listThe recommended agent workflow is: give the agent the CLI and official docs,
have it author a StrategyBodyV2, validate, inspect, then deploy with an explicit
--yes. Paper-only keys can only deploy paper strategies.
Live/destructive commands require an interactive yes or explicit --yes:
polylayer hyperliquid order order.json --yes
polylayer jupiter open position.json --yes
polylayer polymarket order order.json --yes
polylayer yield deposit deposit.json --yesUse --idempotency-key when a caller needs a stable retry key. --output compact emits one-line JSON. The api passthrough accepts only relative v1
paths so a bearer key cannot accidentally be sent to another origin.
Official documentation: https://polylayer.gitbook.io/docs/