Xyte CLI
Overview
The Xyte CLI (xyte-cli) lets you work with your Xyte organization from a terminal. It is the quickest way to pull fleet data and generate reports without writing code against the API yourself:
- Generate a fleet report as PDF or Markdown.
- Export devices, incidents and status history as JSON for your own tools and scripts.
- Call any Organization API endpoint with a single command.
Coding agents (Claude Code, Codex, Copilot and similar) can also install and drive the CLI for you. The full command reference lives in the Xyte CLI repository.
Requirements
- Node.js 22 or newer. To check, run
node --versionin a terminal. - An organization API key. See Core API Keys for how to create one in Settings → API Keys.
API keys are per tenantEach API key belongs to one organization. If you manage several customer tenants, create a key in each one and connect each to the CLI.
Install and connect
npm install -g @xyteai/cli@latest
xyte-cli --version
xyte-cli setup runsetup run asks for your API key and stores it in your operating system's secure credential store (macOS Keychain, Windows DPAPI, Linux Secret Service). Then read back the tenant ID you will use in the commands below:
xyte-cli setup status --field tenantIdGenerate a fleet report
Collect a snapshot of your fleet, then render it as a report. Replace <tenant-id> with the value from setup status:
xyte-cli ops inspect deep-dive --tenant <tenant-id> --provider-scope auto --window 24 --output json --out ./deep-dive.json
xyte-cli ops report generate --tenant <tenant-id> --input ./deep-dive.json --render pdf --out ./fleet-report.pdfUse --render markdown for a Markdown report, and --window to set how many hours of history the snapshot covers.
Pull raw data for your own reporting
To feed a spreadsheet or BI tool, call the API endpoints directly and save the JSON:
xyte-cli api endpoints list
xyte-cli api call organization.devices.getDevices --tenant <tenant-id> --query-json '{"page":1,"per_page":100}'List endpoints are paginated: increase page until no further page is returned.
Related
- Organization API overview
- Xyte MCP Server: ask your own AI assistant about your fleet in plain language.
- Analytics: portfolio-wide charts in the portal, with Export to PDF.
Updated 43 minutes ago
