Use this article as a map of the Level CLI command tree. For the exact flags and JSON output shape in your installed version, use normal help or the generated skill reference:
lvl --help
lvl skill describe
For example:
lvl device list --help
lvl skill describe device list
Command syntax
The general form is:
lvl [--profile ] [arguments] [flags]
Show the top-level command list:
lvl --help
Show every generated reference entry:
lvl skill describe
Profiles and authentication
Level CLI includes a built-in prod profile for https://api.level.io.
Profile selection follows this order:
The root
--profileflag.The
LVL_PROFILEenvironment variable.The saved default profile.
The built-in
prodprofile.
Common commands:
Command | Purpose |
| Sign in through a browser-based approval flow. |
| Verify the active session and organization. |
| Revoke the active session and remove local credentials. |
| List configured API-server profiles. |
| Add a profile. Use |
| Set the default profile. |
| Remove local profile configuration and credentials. |
⚠️ WARNING: Deleting a profile does not revoke its server-side session. Run lvl --profile <profile> auth logout before deleting it.
Output formats
Most commands display a human-readable table or summary by default.
Use JSON output:
lvl device list -o json
Use the built-in jq filter:
lvl device list --jq '.list[] | {id, name, online}'--jq implies JSON. It cannot be combined with explicit table output.
CSV export commands write raw CSV to standard output:
lvl device export > devices.csv
lvl alert export > alerts.csv
lvl run export > runs.csv
Automation and monitor-policy specification commands use --format yaml|json, with YAML as the default. They do not use the standard -o flag for the specification itself.
Pagination
Most resource list commands support:
Flag | Behavior |
| Return up to the requested number of records. The default is 100. |
| Fetch every result page. |
| Return a 1-based page. |
--limit all cannot be combined with --page.
Paginated commands include alert, automation, automation-trigger, device, file, monitor, monitor-policy, run, script, tag, update, update-summary, update-device, update-log, and update-exclusion lists.
API keys, groups, custom fields, profiles, and variables use unpaginated lists.
In JSON list output, count is the total number of matching server records, not the number returned on the current page.
Resource references
Many commands accept an ID or a human-readable reference. An exact ID match takes priority. Name and alias matching is case-insensitive.
Common forms include:
Resource | Accepted references |
Device | ID, hostname, name, nickname, or |
Device group | ID, name, or nested path such as |
Automation | ID or name |
Script | ID or name |
Repository file | ID or filename, with or without its extension |
Monitor policy | ID or name |
Tag | Name |
Custom field | Name or generated reference |
Update exclusion | ID or KB number, with or without the |
If a reference matches more than one resource, the CLI stops and lists the candidates instead of choosing one.
Alert commands
Command | Purpose |
| List active, resolved, or all alerts. |
| Get one alert. |
| Resolve alerts by ID or filters. |
| Reopen resolved alerts by ID. |
| Export matching alerts as CSV. |
API key commands
Command | Purpose |
| List API keys. |
| Get one API key. Use |
| Create a read-only or read-and-write API key. |
| Update an API key. |
| Permanently delete API keys. |
⚠️ WARNING: API key JSON output contains the full token. Protect terminal output, exported files, and CI logs.
Automation commands
Command | Purpose |
| List automations. |
| Get one automation. |
| Create an automation from flags or a specification file. |
| Export an automation specification. |
| Reconcile an existing automation with a specification. |
| Update automation properties. |
| Archive automations. |
| Restore archived automations. |
| Run an automation on devices or groups. |
| List, add, update, delete, or manually run triggers. |
| Add, update, or delete actions. |
| Manage automation variables. |
| Manage automation groups. |
Trigger and action mutation commands accept --json or --json-file. The payload must contain exactly one supported type, and unknown fields are rejected.
Run lvl automation action --help or lvl skill describe automation action for the action types supported by your installed version.
⚠️ WARNING:automation apply can delete triggers and actions that are absent from the specification. The apply is not transactional. Run with --dry-run and review the plan first.
Custom-field commands
Command | Purpose |
| List organization custom fields. |
| Get one custom field. |
| Create a field. |
| Update a field. |
| Delete fields. |
| Set an organization-level value. |
| Clear an organization-level value. |
| List, set, or clear device-level values. |
| List, set, or clear device-group values. |
Custom-field values inherit from organization to device group to device. Cascading set or clear operations can overwrite or remove descendant values.
Device commands
Command | Purpose |
| List and filter devices. |
| Get device details. |
| Request a restart. |
| Request a shutdown. |
| Change maintenance mode. |
| Update editable device properties. |
| Permanently delete devices. |
| Change favorite status. |
| Change flag status. |
| Export devices as CSV. |
| Print an agent-install key for provisioning. |
| Manage device groups and assignments. |
| Manage device custom-field values. |
Restart and shutdown request the action immediately and do not wait for the device to complete it.
⚠️ WARNING:device install-key prints a provisioning credential to standard output. Avoid exposing it in shell history, shared terminals, or CI logs.
File commands
Command | Purpose |
| List repository files. |
| Get file metadata. |
| Upload local files. |
| Download a file. Use |
| Rename a repository file. |
| Replace file content while preserving the repository file ID. |
| Permanently delete files. |
| Show storage usage. |
| Manage repository-file groups. |
file download --overwrite can replace an existing local file. Replacing a repository file changes the content used by automations that reference that file ID.
Monitor commands
Command | Purpose |
| List monitors across policies. |
| Get one monitor. |
| Add a monitor to a policy from a JSON payload. |
| Update a monitor with a JSON payload. |
| Delete monitors. |
| Override monitors for one device. |
| List monitor policies. |
| Get one policy. |
| Create a policy from flags or a specification. |
| Export a policy specification. |
| Reconcile a policy with a specification. |
| Manage target tags. |
Monitor payload commands accept --json or --json-file. Run lvl monitor add --help for the supported monitor types.
Monitor-policy apply can delete monitors absent from the file and is not transactional. Use --dry-run first.
Run commands
Command | Purpose |
| List automation and script runs. |
| Get a run and its steps. Use |
| Cancel runs by ID or filters. |
| Start new runs from selected runs. |
| Retry failed runs from the failed step. |
| Approve runs paused at an approval step. |
| Deny and cancel runs paused at an approval step. |
| Export runs as CSV. |
Waiting defaults to 15 minutes and returns up to 1,000 output lines per step. Use --wait-timeout and --output-lines to change those limits.
An ERROR or CANCELED result exits non-zero. A WARNING result is treated as successful.
Script commands
Command | Purpose |
| List saved scripts. |
| Get a saved script. Use |
| Create a script from |
| Update a saved script. |
| Delete scripts. |
| Run a saved script, file, or inline command. |
| Manage script variables. |
| Manage script groups. |
A run target can come from repeated --device flags, --group, or both. Duplicate targets are run once.
A saved script uses its stored shell, timeout, and run-as setting. Ad-hoc script runs infer the shell from an explicit flag, file extension, shebang, or target operating system.
⚠️ WARNING: Script creation and ad-hoc script runs default to the SYSTEM run-as setting. Review the script and target list before execution.
Skill commands
Command | Purpose |
| Print the generated |
| Install the skill for the current user. |
| Install the skill in the current project. |
| Print flags and JSON output definitions. |
Reinstall the skill after upgrading lvl so coding agents receive the current command tree.
Tag commands
Command | Purpose |
| List tags. |
| Get a tag. |
| Create a tag. |
| Update a tag. |
| Delete unused tags. |
| Assign a tag to devices. |
| Remove a tag from devices. |
Update commands
Command | Purpose |
| List available, installed, or all updates. |
| Get one update. |
| Request an update scan. |
| Install selected updates. |
| Retry selected failed installations. |
| Install available updates on selected devices. |
| Review update-install records and logs. |
| List update summaries. |
| List devices in update context. |
| Manage global KB exclusions. |
Update installation, retry, and install-all allow required reboots by default. Use --no-reboot when the selected command should not reboot a device.
⚠️ WARNING: Review update and device selections before installation. Filter-based and all-device operations require explicit confirmation.
Group commands
Device, script, automation, and file groups share these subcommands:
listcreaterenamemovedeleteassignunassign
Group lists fetch the complete hierarchy. Deleting a group requires it to be empty and have no child groups.
Confirmation and asynchronous work
Permanent delete commands support --yes. In an interactive terminal, the CLI may prompt. In non-interactive execution, commands that require confirmation fail unless --yes is supplied.
Some commands return after Level accepts the request, before work finishes on a device. These include power actions, update checks and installations, scripts, automations, and trigger runs. Use run history, run get --wait, update logs, or the Level web app to confirm the final result.
