Level CLI, or lvl, lets you work with your Level account from a terminal. You can inspect devices, updates, files, monitors, alerts, scripts, automations, and run history without switching to the Level web app.
You can also install the Level skill for a coding agent. The skill teaches supported agents how to use the commands and JSON output provided by your installed version of lvl. You supply the coding agent, model, and tokens.
ℹ️ NOTE: The lvl CLI manages your Level account. It is separate from the Level agent installed on managed devices.
Before you begin
You need:
A Level account with access to the CLI.
A supported computer running Windows, macOS, or Linux on an AMD64 or ARM64 processor.
A browser you can use to approve the CLI sign-in.
If you plan to use lvl with a coding agent, install that agent separately. Level does not host the model or supply its tokens.
Install the CLI
Open the Level CLI Releases page. (Coming Soon)
Download the archive that matches your operating system and processor:
windows-amd64orwindows-arm64darwin-amd64ordarwin-arm64for macOSlinux-amd64orlinux-arm64
Compare the downloaded archive with the SHA-256 value in
checksums.txton the release.Extract the archive.
Rename the executable to
lvl(lvl.exeon Windows), then move it to a directory on yourPATH.Confirm that the CLI is available:
lvl --help
Sign in
Run:
lvl auth login
The CLI prints a one-time code and a verification URL, then attempts to open the URL in your browser.
Sign in to Level in the browser. Your normal SSO and MFA requirements still apply.
Confirm that the browser shows the same one-time code as your terminal.
Approve access.
Return to the terminal. The CLI detects the approval and completes the sign-in.
If the browser does not open, copy the printed URL into a browser on any computer.
Check the active session:
lvl auth status
Sign out and remove the local session:
lvl auth logout
Run your first commands
List devices:
lvl device list
List available software updates:
lvl update list
List repository files:
lvl file list
List monitors and monitor policies:
lvl monitor list
lvl monitor policy list
List active alerts:
lvl alert list
Use a device ID when possible. You can also refer to a device by hostname, name, nickname, or a group-qualified hostname such as Servers/web-01. If a name matches more than one record, lvl stops and asks for a more specific reference instead of choosing one.
Choose an output format
Most commands show a table by default. Use JSON when another program needs to read the result:
lvl device list -o json
Use the built-in jq filter to select part of the JSON result:
lvl device list --jq '.list[] | .name'
List commands return up to 100 results by default. Use --limit to change the number, or fetch all pages:
lvl device list --limit 250
lvl device list --limit all
Export supported resources as CSV by redirecting standard output to a file:
lvl device export > devices.csv
lvl alert export --status resolved > resolved-alerts.csv
lvl run export --status error > failed-runs.csv
⚠️ WARNING: JSON output from API key commands can contain the complete token. Protect exported data and CI logs, and do not commit credentials to source control.
Run scripts
Run a saved script on a device:
lvl script run "Check disk space" --device web-01 --wait
Run a command without saving a script first:
lvl script run --device web-01 --command 'hostname' --wait
You can target more than one device with repeated --device flags, or target a device group with --group.
Without --wait, the command returns the new run IDs after Level accepts the request. Use the run commands to check progress and results:
lvl run list
lvl run get --wait
For details about saved scripts, shells, timeouts, variables, output, and exit codes, see Scripting Overview.
Manage automations as specifications
Export an automation as YAML:
lvl automation spec "Patch Servers" --format yaml > patch-servers.yaml
Preview changes before applying the file:
lvl automation apply -f patch-servers.yaml --dry-run
Apply the specification:
lvl automation apply -f patch-servers.yaml
The file describes the automation name, triggers, actions, and variables. You can keep the file in source control, review a diff, and apply it again after making changes.
⚠️ WARNING: Applying an automation specification reconciles the live automation with the file. Existing triggers or actions that are missing from the file can be deleted. Changes are applied in sequence, not as one transaction, so an error can leave earlier changes in place. Always run --dry-run, review the plan, and keep a current export before applying changes.
Automation specifications refer to account resources such as scripts, groups, tags, files, and custom fields by ID. Treat an exported specification as a snapshot for the same Level account.
For automation concepts and the web editor, see Automations Overview and Building Automations.
Use lvl with a coding agent
Install the skill generated by your current lvl version:
lvl skill install
The command installs a SKILL.md file where supported coding agents can discover it. Examples include Cursor, Claude Code, Codex, Gemini, Hermes, and OpenClaw.
After installation, you can ask your coding agent to inspect your fleet through lvl, draft a script, or draft an automation specification. Review every proposed command and file before running or applying it.
Reinstall the skill after upgrading lvl so its command index and output definitions match the installed version:
lvl skill install
Show the generated skill without installing it:
lvl skill show
Inspect the current flags and JSON output shape for a command:
lvl skill describe device list
lvl skill describe automation action add
ℹ️ NOTE: Installing the skill does not install a coding agent or connect Level to an LLM provider. You choose and configure the coding agent, model, and tokens.
Confirm changes and check completion
Commands that permanently delete resources support --yes. In an interactive terminal, lvl prompts before these changes. In a non-interactive session, such as CI, commands that require confirmation fail unless you supply --yes.
Some commands request asynchronous work and return before the device completes it. These include restart, shutdown, update checks, update installation, scripts, and automations. Use lvl run get <run-id> --wait, run history, update logs, or the Level web app to confirm the final result.
⚠️ WARNING: Treat install keys, API tokens, exported inventory, script output, and automation files as sensitive. Avoid printing them in shared terminals or CI logs.
Get command help
Show the top-level command list:
lvl --help
Show help for a command group or command:
lvl device --help
lvl script run --help
lvl automation apply --help
The installed CLI is the source of truth for its current command flags and output shapes. Use lvl skill describe when you need a machine-readable command reference.
