CLI Quick Start¶
The LimaCharlie command-line interface (CLI) lets you work with your LimaCharlie organizations from a terminal. This guide takes you from a new computer to listing your organizations and sensors.
Before you begin¶
You need:
- A LimaCharlie account. Create one for free if you do not already have one.
- Permission to install software on your computer.
1. Install the CLI¶
The CLI requires Python 3.10 or newer. The steps below use
pipx, which keeps the
CLI isolated from other Python packages while making the limacharlie command
available everywhere.
-
Open Terminal. Find it with Spotlight Search by pressing Cmd+Space and typing
Terminal. -
Check whether Homebrew is installed:
If
brewis not found, install Homebrew by following the instructions on its website, then open a new Terminal window. -
Install pipx and add its commands to your shell's search path:
-
Close and reopen Terminal, then install the LimaCharlie CLI:
-
Open your terminal. On many Linux desktops, press Ctrl+Alt+T.
-
Install pipx using your distribution's package manager.
On Ubuntu 23.04 or newer and Debian 12 or newer:
On Fedora:
For another distribution, follow the pipx Linux instructions.
-
Add pipx commands to your shell's search path:
-
Close and reopen the terminal, then install the LimaCharlie CLI:
-
Install Python 3.10 or newer from python.org if it is not already installed. During setup, select Add python.exe to PATH.
-
Open PowerShell from the Start menu and confirm Python is available:
If you installed Python from the Microsoft Store and
pyis not found, usepython3in place ofpyin the next commands. -
Install pipx and add its commands to your search path:
-
Close and reopen PowerShell, then install the LimaCharlie CLI:
If you already use uv, you can use it instead of pipx:
Confirm the installation¶
Run:
The output should start with limacharlie, version followed by the installed
version number.
If your terminal reports that limacharlie is not found, make sure you closed
and reopened it after running pipx ensurepath. Then try the install command
again.
To upgrade the CLI later, run:
2. Sign in¶
Browser-based sign-in is the easiest option for a person using the CLI:
Your browser opens so you can sign in with Google. To use a Microsoft account, run:
If the CLI cannot open your browser automatically, add --no-browser, then
open the printed URL in a browser on the same computer. On a remote or headless
computer, use an API key instead; the OAuth flow waits for a callback on the
computer running the CLI.
Sign in with an API key¶
API keys are useful for automation or terminals where browser sign-in is not practical. In the LimaCharlie web app, open your organization and go to Access Management > REST API to find its Organization ID (OID) and create an API key. Treat the key like a password.
The login command stores credentials locally for later commands. Do not put a real API key in documentation, source control, screenshots, or shell scripts. For temporary automation, credentials can instead be supplied as environment variables:
3. Verify your login¶
Check the identity and organization available to the CLI:
If you can access more than one organization, list them and select the one you want to use. An OID is a UUID, not the organization's display name.
You can also target one command without changing your default organization:
4. Try some read-only commands¶
Display information about the selected organization:
List its sensors:
Narrow the results with common filters:
limacharlie sensor list --online
limacharlie sensor list --hostname web
limacharlie sensor list --selector 'plat == windows'
limacharlie sensor list --limit 10
The default output is a table in a terminal. Choose a machine-readable format when using the CLI in a script or sending its output to another tool:
limacharlie sensor list --output json
limacharlie sensor list --output yaml
limacharlie sensor list --output csv
5. Find your next command¶
The CLI has help at every level:
limacharlie --help
limacharlie sensor --help
limacharlie sensor list --help
limacharlie sensor list --ai-help
Explore commands grouped by common use case:
Most commands follow the pattern limacharlie <noun> <verb>, such as
limacharlie sensor list or limacharlie detection list. Before running a
command that creates, changes, or deletes data, read its --help output and
confirm that you selected the intended organization.
Troubleshooting¶
Authentication fails¶
Run limacharlie auth login --oauth again, or confirm that the OID and API key
belong to the same organization. Use limacharlie auth whoami after signing in
to test the credentials.
The wrong organization is selected¶
Run limacharlie org list, then limacharlie auth use-org YOUR_ORG_ID. You can
always add --oid YOUR_ORG_ID to target a specific organization for one
command.
A command is denied¶
Your account or API key may not have the required permission in that
organization. Run limacharlie auth whoami --show-perms to inspect your current
permissions, then ask an organization administrator for the required access.
See where credentials are stored¶
Sign out of the CLI¶
This removes the locally stored credentials, but it does not revoke an API key. Revoke a key separately from Access Management > REST API if it should no longer work anywhere.
For more commands and examples, continue to the CLI reference.