Sign in
lyrelog login approves this computer in the browser. Over SSH, paste a code instead. The session lasts like a browser's.
The command-line tool has no password and no key of its own. You approve it from the dashboard, where you're already signed in. That gives this computer a session, just like a browser's.
lyrelog login
lyrelog login- Your browser opens
app.lyrelog.com/cli/authorize. The page shows this computer's name and the account it will act as, and lists what the tool can and can't do. - Choose Approve. The browser hands the sign-in back to the terminal on this computer, and the page says You're signed in. You can close the tab.
- The terminal says who you're signed in as. If you can only see one project, it becomes the
default; if you can see more, run
lyrelog use <project>.
Approve MacBook-Pro in the browser window that opened.
If none did, open:
https://app.lyrelog.com/cli/authorize?...
On another computer? Press Enter to get a code to paste instead.Only approve a sign-in you started yourself. Cancel on the page leaves the tool signed out. If the browser doesn't come back within 5 minutes, the terminal asks for a code instead.
The sign-in uses OAuth's authorization code with PKCE, as Claude Code does. The browser can
only send it back to an address on this computer (127.0.0.1), and only the terminal that
started it can use it.
Over SSH, or without a browser
On a server you reach over SSH, or on Linux without a display, lyrelog login doesn't try to
open a browser. Neither does lyrelog login --no-browser. Instead, it prints the page's
address:
Open this page, approve server-1, and paste the code it shows:
https://app.lyrelog.com/cli/authorize?...
Paste the code:Open that address in any browser, choose Approve, and copy the code the page shows into the terminal. The code works once, for the next 5 minutes, and only for the terminal that asked. Never paste it anywhere else, or give it to someone: with it, they could sign in as you.
The tool also skips the browser when BROWSER=none is set. When it does open one, it uses
$BROWSER if that's set.
Only a person can sign in
lyrelog login refuses to run under a coding agent, in CI, or without a terminal to type
in. A person signs in once, in a terminal on that computer, and the agent uses that sign-in.
See For agents and scripts.
The session
A CLI session is the same kind of session as a browser's:
- It ends after 14 days unused, and after 30 days at most, unless you keep it.
lyrelog whoamishows when it ends at the latest. After that, the next command asks you to runlyrelog login. - Creating a server, read or admin key needs a
recent sign-in: within 10 minutes of
approving. If it's been longer, the command stops with "This needs a recent sign-in" (exit
code 4). Run
lyrelog loginagain, then retry. - A CLI session can't approve another one. Approving always happens in the browser.
The session is saved in the tool's settings file. The tool never prints it.
Keep a sign-in longer
On your own computer you may not want to sign in again every month. Ask to keep the sign-in:
lyrelog login --keep 90d # or 30d, 1y, neverThe approval page shows your choice and lets you change it before you approve: Like a browser (the default), 30 days, 90 days, 1 year or Never expires. A kept sign-in lasts that long whether you use it or not, and ends sooner only if you sign it out. Keeping one needs you to have signed in to the dashboard in the last 10 minutes; if you haven't, the page asks you to sign in first.
A sign-in that never expires works for anyone who copies this computer's settings file, until
you sign it out. Choose it only on a computer you trust. The account page marks it Never
expires, and lyrelog whoami says so too.
See and end your sessions
The account page's Where you're signed in lists your browsers and every computer where
the CLI is signed in, as CLI on and the computer's name. You can sign any of them out
there. Its next command then asks to run lyrelog login again.
From the terminal:
lyrelog account sessionsID Where Kind Signed in Last used Ends
11 MacBook-Pro command line 3m ago 15s ago this one
9 Chrome on macOS browser 4h ago 3m ago
10 build-box command line 25m ago 25m ago kept to Feb 17, 2027Ends shows when a kept sign-in ends, or kept, never ends. The
others end after 14 days unused. Access tokens aren't in this list: lyrelog tokens shows them.
lyrelog account sign-out 10 # the ID from the listlyrelog logout
lyrelog logoutThis ends the session on the server, so the token stops working everywhere, and removes it from this computer's settings.
lyrelog whoami
Who you're signed in as, on which server, when the session ends, the default project and your
organizations. lyrelog status is the same command.
✓ Signed in as Alex Rivera <alex@example.com>
Server app.lyrelog.com
Session ends by Dec 19, 22:10 at the latest (14 days unused ends it sooner, unless you kept it)
Project Tilefall e8bc11c6e22f
Organizations Alex Rivera · owner · FreeEnvironment 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. |
LYRELOG_URL | The dashboard's address. Default https://app.lyrelog.com. --url wins over it. |
Each server has its own sign-in in the settings file, so lyrelog login --url <address>
signs in to another one without affecting the first. The last server you signed in to
becomes the default.
Scripts and CI
Use an access token (lyr_tok_...). Make one from the terminal, right after signing in
(it needs a sign-in from the last 10 minutes):
lyrelog login
lyrelog tokens create --name "GitHub Actions, deploy" # --expires 30d, 90d (default), 1y or neverOr in the dashboard: open your account page, Access tokens. You need to have signed in in the last 10 minutes there too. Either way:
- Name it after what will use it ("GitHub Actions, deploy") and pick when it expires: 30 days, 90 days (the default), a year, or never.
- Copy it: it's shown once. Put it in your CI's secrets as
LYRELOG_TOKEN, never in a repository.
lyrelog tokens lists them, and Access tokens has the other
commands.
# GitHub Actions
env:
LYRELOG_TOKEN: ${{ secrets.LYRELOG_TOKEN }}
run: lyrelog errors --since 24h --jsonA token acts as you, like the CLI after lyrelog login, with two differences: it doesn't end when
unused, only when it expires or you revoke it (on the account page or with lyrelog tokens revoke), and it counts as a recent
sign-in only in its first 10 minutes, so it can't create server, read or admin keys after that.
Like a CLI session, it can't delete the account or a project, or change how you sign in, and it
can't make another token.
A token that never expires works for anyone who gets hold of it until you revoke it. The account
page marks such tokens Never expires, and lyrelog tokens shows ⚠ never. Prefer an
expiry, and revoke tokens you don't use.
You can change a token's expiry later, counted from now, on the account page or with
lyrelog tokens expiry <id> --expires 30d (or 90d, 1y, never). Sooner works any time;
later, or never, needs a sign-in from the last 10 minutes.
Only reading events from a script? The Read API with a read key
(lyr_read_...) also works, and it's limited to one project.