Deterministic Xyte operations for humans and AI agents.
- npm: @xyteai/cli
- GitHub Page: docs/index.html
- Command reference: docs/commands.md
- Flows: docs/flows/agent-ops.md
- Schemas: docs/schemas
Use @xyteai/cli in this workspace. Keep it concise and safe.
Rules:
- Never print secrets.
- Do not invent IDs or outputs.
Run:
npm install -g @xyteai/cli@latest
xyte-cli --version
xyte-cli init --no-setup
Then connect the tenant:
xyte-cli setup run
xyte-cli setup status --field tenantId
Read tenantId from setup status and continue:
xyte-cli ops watch incidents --tenant <tenant-id> --profile incidents-active --once --output json --strict-json
xyte-cli ops inspect deep-dive --tenant <tenant-id> --window 24 --output json --out ./artifacts/deep-dive.json
xyte-cli ops report generate --tenant <tenant-id> --input ./artifacts/deep-dive.json --out ./reports/fleet-report.pdf
Finish with:
- concise success/failure summary
- exact failing command (if any)
npm install -g @xyteai/cli@latest
xyte-cli --versionIf your global npm bin is not on PATH, replace xyte-cli in the commands below with one of these published-package fallbacks:
npx @xyteai/cli@latest <command>
npm exec -- @xyteai/cli@latest <command>xyte-cli init --no-setupxyte-cli setup run
xyte-cli setup status --field tenantIdUse that value as <tenant-id> in the examples below. Persisted credentials default to secure OS-native storage: macOS Keychain, Windows DPAPI, Linux Secret Service. If native storage is unavailable, xyte-cli warns and falls back to file storage. For non-interactive automation and backend details, use the setup guidance in docs/getting-started.md.
xyte-cli api endpoints list
xyte-cli api endpoints describe organization.devices.getDevicesKey params:
api endpoints describe <endpoint-key>
xyte-cli api call organization.devices.getDevices --tenant <tenant-id>Key params:
--tenant <tenant-id>--output-mode envelopefor contract output--strict-jsonfor machine parsing
xyte-cli ops watch incidents --tenant <tenant-id> --profile incidents-active --once
xyte-cli ops watch incidents --tenant <tenant-id> --profile incidents-active --interval-ms 2000 --max-polls 10Key params:
- terminal output is human-readable by default; add
--output json --strict-jsonfor machine parsing --onceone snapshot poll and exit--interval-msminimum1000--max-pollsbounded polling
xyte-cli flow run flow.guided-remediation --tenant <tenant-id> --var incident_id=<incident-id> --var device_id=<device-id> --var command=reboot --var updated_device_name=<device-name>Key params:
flow rundefaults to plan mode--var key=valuefor runtime context--resume <run-id-or-path>for follow-up runs
Primary read/setup/reporting workflows are shell-neutral. Advanced raw API examples like this one remain shell-specific because inline JSON quoting differs across PowerShell, CMD, Bash, and zsh.
xyte-cli api call organization.commands.sendCommand \
--tenant <tenant-id> \
--path-json '{"device_id":"<device-id>"}' \
--body-json '{"command":"reboot"}'Behavior:
- executes directly once you choose the write step
xyte-cli ops inspect fleet --tenant <tenant-id> --provider-scope auto --output json
xyte-cli ops inspect deep-dive --tenant <tenant-id> --provider-scope auto --window 24 --output json --out ./artifacts/deep-dive.jsonKey params:
--provider-scope organization|partner|auto--window <hours>for deep-dive--output jsonfor pipelines
xyte-cli ops report generate --tenant <tenant-id> --input ./artifacts/deep-dive.json --out ./reports/fleet-report.pdfKey params:
--inputdeep-dive JSON--outtarget PDF path
xyte-cli ops console --headless --screen dashboard --once --tenant <tenant-id> --output json
xyte-cli ops console --headless --screen spaces --follow --interval-ms 2000 --tenant <tenant-id> --output jsonKey params:
--screen dashboard|spaces|...--oncesnapshot mode--followstream mode
xyte-cli util list-actions --output text
xyte-cli util prepare \
--action space.import-tree \
--input ./raw-hierarchy.xlsx \
--output-dir ./prepared
xyte-cli util import-tree --tenant <tenant-id> --input ./prepared/space-import-tree.csv
xyte-cli util import-tree --tenant <tenant-id> --input ./prepared/space-import-tree.csv --apply --report ./reports/space-import.apply.ndjsonKey params:
util prepare --action ... --input ... --output-dir ...util import-treeis dry-run unless--apply--reportwrites apply NDJSON report
xyte-cli upgrade --check --output json
xyte-cli upgrade --yes --output jsonKey params:
--checkdry check--yesnon-interactive upgrade
xyte-cli --log-actions --log-actions-path ./logs/xyte-cli.actions.ndjson status --tenant <tenant-id>
xyte-cli logs list --path ./logs/xyte-cli.actions.ndjson --limit 200
xyte-cli logs stats --path ./logs/xyte-cli.actions.ndjsonKey params:
--log-actionslifecycle NDJSONlogs list|stats|gc|viewfor operations logs