Early accessBy invitation, and the SDKs aren't published yet.Ask for an invitation
Skip to Content
Docs

Reference

The command-line tool's global flags, environment variables, settings file, shell completion and version.

Global flags

Every command takes these.

FlagWhat
-p, --projectThe project: its id, slug or name. Default: the one chosen with lyrelog use.
--urlThe dashboard's address. Default https://app.lyrelog.com, or LYRELOG_URL.
--jsonWrite JSON, even at a terminal
--humanWrite tables and colours, even into a pipe
--no-colorNo colours (also NO_COLOR=1)
-h, --helpHelp for the command, with examples

Environment variables

VariableWhat
LYRELOG_TOKENAn 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_URLThe dashboard's address. --url wins over it.
LYRELOG_CONFIG_DIRThe folder for the settings file
LYRELOG_THEMEdark or light, when the terminal's background is guessed wrong
LYRELOG_AGENTAny value: write JSON, as for a coding agent
NO_COLORAny value: no colours
BROWSERThe 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
AnywhereLYRELOG_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:

FieldWhat
urlThe server used when neither --url nor LYRELOG_URL says otherwise: the last one you signed in to
hostsOne entry per server, keyed by its address
hosts.*.tokenThe session. The tool never prints it.
hosts.*.expires_atWhen the session ends at the latest (Unix seconds)
hosts.*.user_email, hosts.*.user_nameWho it belongs to
hosts.*.project, hosts.*.project_nameThe 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 shell

Completion needs autoload -U compinit; compinit in your ~/.zshrc. Start a new shell afterwards.

Version

lyrelog version
lyrelog 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"}.