Reference
The command-line tool's global flags, environment variables, settings file, shell completion and version.
Global flags
Every command takes these.
| Flag | What |
|---|---|
-p, --project | The project: its id, slug or name. Default: the one chosen with lyrelog use. |
--url | The dashboard's address. Default https://app.lyrelog.com, or LYRELOG_URL. |
--json | Write JSON, even at a terminal |
--human | Write tables and colours, even into a pipe |
--no-color | No colours (also NO_COLOR=1) |
-h, --help | Help for the command, with examples |
Environment variables
| Variable | What |
|---|---|
LYRELOG_TOKEN | An access token (lyr_tok_..., from lyrelog tokens create or your account page) or a CLI session token. It wins over the saved sign-in. See Scripts and CI. |
LYRELOG_URL | The dashboard's address. --url wins over it. |
LYRELOG_CONFIG_DIR | The folder for the settings file |
LYRELOG_THEME | dark or light, when the terminal's background is guessed wrong |
LYRELOG_AGENT | Any value: write JSON, as for a coding agent |
NO_COLOR | Any value: no colours |
BROWSER | The browser lyrelog login and lyrelog open use; none for no browser |
The tool also reads the variables coding agents and CI set, to decide between JSON and tables. See JSON or tables.
Settings file
The tool keeps its settings in one JSON file, config.json, in:
| Folder | |
|---|---|
| macOS and Linux | ~/.config/lyrelog, or $XDG_CONFIG_HOME/lyrelog when that's set |
| Windows | %AppData%\lyrelog |
| Anywhere | LYRELOG_CONFIG_DIR, when set |
The file can only be read by you (mode 0600, in a 0700 folder), and it's written in one step, so it's never left half-written. It holds:
| Field | What |
|---|---|
url | The server used when neither --url nor LYRELOG_URL says otherwise: the last one you signed in to |
hosts | One entry per server, keyed by its address |
hosts.*.token | The session. The tool never prints it. |
hosts.*.expires_at | When the session ends at the latest (Unix seconds) |
hosts.*.user_email, hosts.*.user_name | Who it belongs to |
hosts.*.project, hosts.*.project_name | The default project's id, and its name for messages |
{
"url": "https://app.lyrelog.com",
"hosts": {
"https://app.lyrelog.com": {
"token": "…",
"expires_at": 1797714620,
"user_email": "alex@example.com",
"user_name": "Alex Rivera",
"project": "e8bc11c6e22f",
"project_name": "Tilefall"
}
}
}The token is a session like a browser's cookie: anyone who copies it acts as you until it
ends. lyrelog logout ends it on the server and removes it from the file.
Exit codes
0 is done; anything else names what went wrong (2 a wrong flag, 3 not signed in, 4 a recent sign-in needed, 6 not found...). The full table is in For agents and scripts.
Shell completion
lyrelog completion prints a completion script for bash, zsh, fish or powershell.
Each one's --help says where to put it. For zsh:
source <(lyrelog completion zsh) # this shell only
lyrelog completion zsh > "$(brew --prefix)/share/zsh/site-functions/_lyrelog" # macOS, every shell
lyrelog completion zsh > "${fpath[1]}/_lyrelog" # Linux, every shellCompletion needs autoload -U compinit; compinit in your ~/.zshrc. Start a new shell
afterwards.
Version
lyrelog versionlyrelog v0.1.0 (4678ef1, built 2026-11-19, go1.27.4, darwin/arm64)It shows the version (from the release, or the one go install fetched), the commit and the
build date when the build knows them, and the Go version and system it was built for. A build
with no version says dev. In JSON: {"version","commit","date","go","os","arch"}.