Installation
Homebrew is the recommended route on macOS and Linux. go install needs a Go toolchain. Every release on GitHub also ships static archives:
- Linux:
amd64,arm64 - macOS:
amd64,arm64 - Windows:
amd64,arm64
Install
| Method | Binaries installed | Needs |
|---|---|---|
| Homebrew | levelfour and l4 | macOS or Linux |
go install | levelfour only | a Go toolchain (1.26.3+) |
| Prebuilt archive | levelfour and l4 | no toolchain, just download and extract |
brew install LevelFourAI/tap/levelfourThe tap ships a single levelfour cask, and it installs both binaries: levelfour and l4. Two binaries, same tool covers which name to use.
With a Go toolchain (1.26.3+):
go install github.com/LevelFourAI/levelfour-cli/cmd/levelfour@latestThe binary is named levelfour. Symlink to l4 if you want the short form:
ln -s "$(which levelfour)" "$(dirname "$(which levelfour)")/l4"go install builds only levelfour. The verify step below and the rest of these docs say l4, so make the symlink or substitute the name as you read.Archive naming: levelfour-cli_<version>_<os>_<arch>.tar.gz (.zip on Windows). Each archive contains both the levelfour and l4 binaries.
VERSION=0.1.0
curl -L https://github.com/LevelFourAI/levelfour-cli/releases/download/v${VERSION}/levelfour-cli_${VERSION}_linux_amd64.tar.gz \
| tar xz
sudo mv levelfour l4 /usr/local/bin/Set VERSION to the release you want. The example pulls the Linux amd64 archive.
Checksums for every release are signed under checksums.txt on the Release page.
Verify the installation
l4 --versionl4 version 0.1.0 (commit: 2e84aa4)Shell completion
Generate completion scripts for your shell:
source <(l4 completion bash)
# or persist:
l4 completion bash | sudo tee /etc/bash_completion.d/l4 > /dev/nullUpdating
l4 checks for new versions in the background after each command and prints an update hint to stderr if a newer release is available. To upgrade:
brew upgrade levelfour # updates both binariesCI and Docker images
The CLI is a single static Go binary with no runtime dependencies. To pin a version inside a CI image:
ARG LEVELFOUR_CLI_VERSION=0.1.0
RUN curl -fsSL https://github.com/LevelFourAI/levelfour-cli/releases/download/v${LEVELFOUR_CLI_VERSION}/levelfour-cli_${LEVELFOUR_CLI_VERSION}_linux_amd64.tar.gz \
| tar xz -C /usr/local/bin levelfour l4For a workflow that runs l4, see CI/CD integration.
Next
- CLI authentication is how
l4gets a credential, and which commands need a read-write key - Commands is the per-command reference, starting with
l4 costs - Recipes has the end-to-end shell pipelines
CLI Overview
The l4 command line tool. Install it, sign in, and run your first commands, then the command groups, the global flags every command takes, and the exit codes to script against.
Authentication
How l4 resolves a credential on every command, and why browser login is not enough for the write commands.