Skip to content
Longplay
Docs
Browse docs / Longplay CLI

Longplay CLI

Install, sign in, management commands, local document validation, code-reference scanning and exit codes.

Markdown
API v1Updated

Install and update#

terminalShell
npm install -g @tinkerlandai/longplay-cli@0.3.23longplay --versionlongplay update --checklongplay update

Current npm release 0.3.23, Node.js 22+. On macOS and Linux, the install page also offers curl with its own website version. Updates preserve configuration and credentials. Interactive commands check for updates at most once every 24 hours; set INDIANA_NO_UPDATE_CHECK=1 to disable (the CLI reads this exact name, so it keeps the INDIANA_ prefix).

Related: Install page

Sign in and context#

terminalShell
longplay doctor --server https://console.longplayai.com --jsonlongplay login --server https://console.longplayai.comlongplay whoami --jsonlongplay context use --org <ORG_UUID> --app <APP_UUID> --env sandboxlongplay projects list --jsonlongplay logout

Sign-in uses browser approval (Authorization Code + PKCE) with your Console member account; each login is an independent session, and logging out of the CLI does not sign you out of Console. During login you select the Apps, environments and access level this device may use in the browser; one login can cover several Apps, and longplay context use switches between them. One login holds at most 300 permissions, about 25 App environments at one access level. To add or remove an App, run longplay login --replace, which starts from your previous selection. Scripts can request exact permissions with longplay login --permissions project.read,customers.write. Credentials default to the system keychain.

Management commands#

terminalShell
longplay capabilities --jsonlongplay operations list --available --jsonlongplay operations describe console.customers.post --jsonlongplay customers list --jsonlongplay customers create --file customer-create.json --jsonlongplay features list --jsonlongplay products apply --file product-operation.json --jsonlongplay offerings list --jsonlongplay paywalls apply --file paywall-operation.json --jsonlongplay funnels apply --file funnel-operation.json --jsonlongplay coupons --help

Management commands use the same handlers as Console and check member role, App access and grants. Use operations describe for each operation's required permissions; longplay call <operationId> --input envelope.json invokes one catalogued operation. --out <new-file> saves results privately without overwriting; the CLI never replays writes automatically.

Local document validation#

terminalShell
longplay funnels validate --file funnel.json --mode publish --jsonlongplay paywalls validate --file paywall.json --mode draft --jsonlongplay offerings validate --file offering.json --mode publish --jsonlongplay offerings diff --against before.json --file after.json --json

Local validation needs no login or network and reports validation: local and serverChecks: not_run; Product existence, caller permissions and document publication requirements are still checked by the server.

Code-reference scanning#

terminalShell
longplay code-references scan --server https://console.longplayai.com \  --app <APP_UUID> --env sandbox --repository-id <REPOSITORY_UUID> \  --branch main --workflow .github/workflows/indiana-code-references.yml \  --run-number 12 --run-attempt 1 --root . --out ./code-references-report.json --upload --json

Configure the repository in a Feature's Code references tab and create a Key with only code-references:read and code-references:write, stored as the repository secret INDIANA_CODE_REFERENCES_KEY (the workflow the Console generates reads this exact name, so it keeps the INDIANA_ prefix). Scans report files and line numbers without uploading source snippets; after an uncertain upload, replay the saved report with longplay code-references upload --file.

Output and exit codes#

--json prints one JSON result on stdout: { data } on success, { error: { code, message, retryable, details? } } on failure.

Exit codes
ExitMeaning
0Success
2Invalid arguments, configuration, input or document
3Missing or expired login, or authorization failure
4Origin, permission or redirect constraint
5Conflict or occupied write lock
6Network, response protocol, service or rate-limit failure
7Runtime capability or authorization unavailable

Exit codes

  • 0

    Meaning
    Success
  • 2

    Meaning
    Invalid arguments, configuration, input or document
  • 3

    Meaning
    Missing or expired login, or authorization failure
  • 4

    Meaning
    Origin, permission or redirect constraint
  • 5

    Meaning
    Conflict or occupied write lock
  • 6

    Meaning
    Network, response protocol, service or rate-limit failure
  • 7

    Meaning
    Runtime capability or authorization unavailable