Skip to main content

Python SDK and CLI for the LimaCharlie endpoint detection and response platform

Project description

LimaCharlie Python SDK & CLI

LimaCharlie.io

Python SDK and command-line interface for the LimaCharlie endpoint detection and response platform.

Installation

pip install limacharlie
docker run refractionpoint/limacharlie:latest --help

The toon extra adds the TOON output format (limacharlie --output toon); every other format works with a default install.

pip install 'limacharlie[toon]'

On uv older than 0.12 the extra is not enough, because toon_format publishes only a pre-release and those versions resolve pre-releases for directly named requirements only. Name it directly there: uv tool install limacharlie --with 'toon-format>=0.9.0b1'. See the CLI output formats guide for details.

See Getting Started for Docker credential mounting and first steps.

Quick Start

limacharlie auth login --oid YOUR_ORG_ID --api-key YOUR_API_KEY
limacharlie auth whoami
limacharlie org info
limacharlie sensor list

See Authentication for OAuth, environments, credential resolution, JWT caching, and config directory migration.

Documentation

Guide Topics
Getting Started Installation, Docker, first steps
Authentication API keys, OAuth, environments, JWT caching, config migration
CLI Overview Command pattern, output formats, filtering, discovery
SDK Overview Architecture, setup, class reference

Full reference: doc/README.md

Shell Completion

The CLI supports tab-completion for all commands, subcommands, and options.

Bash - add to ~/.bashrc:

eval "$(limacharlie completion bash)"

Zsh - add to ~/.zshrc:

eval "$(limacharlie completion zsh)"

Fish - run once:

mkdir -p ~/.config/fish/completions
limacharlie completion fish > ~/.config/fish/completions/limacharlie.fish

Restart your shell (or source the rc file) for completions to take effect.

Static completion files

If you prefer not to run eval on every shell start, you can write the completion script to a file once. This is slightly faster at shell startup but needs to be re-run after upgrading to pick up new commands and options.

Bash:

mkdir -p ~/.local/share/bash-completion/completions
limacharlie completion bash > ~/.local/share/bash-completion/completions/limacharlie

Zsh:

mkdir -p ~/.zfunc
limacharlie completion zsh > ~/.zfunc/_limacharlie

Ensure ~/.zfunc is in your fpath by adding this to ~/.zshrc (before compinit):

fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit

Development

Setup

git clone https://github.com/refractionPOINT/python-limacharlie.git
cd python-limacharlie
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

The editable install (-e) means changes to the source code take effect immediately without reinstalling.

Running the CLI

After the editable install, the limacharlie command is available in your venv:

limacharlie --version
limacharlie --help
limacharlie sensor list --help

Running Tests

Unit tests run without any credentials or network access:

# All unit tests
pytest tests/unit/ -v

# Single test file
pytest tests/unit/test_client.py -v

# Single test case
pytest tests/unit/test_client.py::TestClientInit::test_creates_with_explicit_creds -v

Integration tests require a real LimaCharlie organization:

pytest tests/integration/ --oid YOUR_ORG_ID --key YOUR_API_KEY -v

Building

pip install build && python -m build
pip install dist/limacharlie-*-py3-none-any.whl && limacharlie version

Releasing

Releases are published to PyPI automatically via GitHub Actions when a version tag is pushed. The package version is derived from the git tag using setuptools-scm — there is no hardcoded version to bump.

git tag 5.1.0
git push origin 5.1.0

The workflow runs unit tests, builds the package, and publishes to PyPI using Trusted Publishers (OIDC) — no API tokens or secrets required. See .github/workflows/publish-to-pypi.yml for details.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

limacharlie-5.6.1.tar.gz (663.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

limacharlie-5.6.1-py3-none-any.whl (418.2 kB view details)

Uploaded Python 3

File details

Details for the file limacharlie-5.6.1.tar.gz.

File metadata

  • Download URL: limacharlie-5.6.1.tar.gz
  • Upload date:
  • Size: 663.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for limacharlie-5.6.1.tar.gz
Algorithm Hash digest
SHA256 5eadd132b7f3dc3e9bfdf1e49bde6c912f36c174b283d21d27104d6f87f6ff4e
MD5 5878756132d130b62a742397489cc3ad
BLAKE2b-256 606686c2e437f2975911aeb56279a3cf166bc163258d55413869c9498048f64a

See more details on using hashes here.

Provenance

The following attestation bundles were made for limacharlie-5.6.1.tar.gz:

Publisher: publish-to-pypi.yml on refractionPOINT/python-limacharlie

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file limacharlie-5.6.1-py3-none-any.whl.

File metadata

  • Download URL: limacharlie-5.6.1-py3-none-any.whl
  • Upload date:
  • Size: 418.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for limacharlie-5.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aced59493603fb0e8cc600e9b826e31738a58d27218752253809911fb927f464
MD5 435c243ef68c5d1203f798a3fc2c7439
BLAKE2b-256 edabd33496289bf048fa9529ee430583e724f20e85301fd135b6d903cc49f150

See more details on using hashes here.

Provenance

The following attestation bundles were made for limacharlie-5.6.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on refractionPOINT/python-limacharlie

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page