Configuration Fields
The default configuration file is ~/.config/leo-cli/config.yaml. Complete example:
repo: roots: - ~/work - $HOME/srcdocker: registries: it: source-registry.example.com t: mirror-registry.example.comtime: zones: - +9 - +0 - America/Los_Angelesclipboard: base_url: https://clipboard.example.com token: replace-with-a-long-random-token search_interval: 100msotp: accounts: gmail: default_mailbox: personal mailboxes: personal: email: you@gmail.com app_password: "replace-with-personal-app-password" work: email: you.work@gmail.com app_password: "replace-with-work-app-password"proj: mc: match: demo_01 logs: - runtime/logs - /docker-runtimerepo.roots lists directories scanned by leo repo reindex. Each value expands home, environment variables, and relative paths.
docker
Section titled “docker”docker.registries maps short aliases to registry hostnames. leo docker copy can use these aliases in source or destination references.
time.zones lists extra timezone rows printed after the primary leo time result. Each entry may be a UTC offset such as +9 or an IANA timezone name.
clipboard
Section titled “clipboard”clipboard.base_url points to the Maccy server. leo clip requests its /v1/entries endpoint. clipboard.token is the matching bearer secret from the server’s auth map. clipboard.search_interval controls the debounce delay after TUI input stops and defaults to 100ms. Use a long random token and restrict the configuration file permissions.
- Enable 2-Step Verification for the Gmail account you want to query. See Google’s app password instructions.
- Sign in to that account and open Create and manage app passwords to generate a password for
leo-cli. - Give the mailbox a name under
otp.accounts.gmail.mailboxes. Setemailto the full Gmail address andapp_passwordto the generated password. Restrict access to the local configuration file because it stores the password.
leo otp example -a gmail --mailbox work -u testuser --wait 30s checks the Gmail mailbox named work. Without --mailbox, the command uses default_mailbox, or the only configured mailbox. The original single-mailbox format with email and app_password directly under otp.accounts.gmail still works.
The keyword can appear in the sender, subject, or body. -u filters recipients. By default the command checks messages received in the last three minutes and looks for six digits. Use -m 5 for five minutes and -c 4d for four digits. Each line shows the local send time, minutes ago (such as -5m), and the code. Waiting appends new matches without redrawing previous lines.
leo otp example -a gmail -u testuser --watch keeps listening until you press Ctrl+C. It checks once on startup, then on new-mail notifications, with a once-per-minute check as a fallback. It reconnects automatically after disconnects. For a short session, --wait 30s pauses two seconds after each query. The two flags cannot be combined.
In an interactive terminal, --watch updates the minutes-ago column in place for code rows still on screen. Redirected and piped output keeps the age shown when each row was first printed.
leo otp example -a gmail -u testuser -O shows each matching email’s local send time, subject, and decoded body, even if it has no code. Omit the keyword to list emails without a keyword filter: leo otp -a gmail -u testuser -m 30 lists emails to that recipient from the past 30 minutes. Omit -u to include all recipients. Email listing defaults to the last five minutes, supports -m and --wait, and prefers plain text over HTML.
Use --debug to show connection progress and filtering counts on stderr. Diagnostics omit passwords, message bodies, and verification codes.
Each proj key is a project name and the default directory match string. Optional match overrides that directory match string; logs lists log directories resolved from the project root. leo log --project NAME strictly selects by project key.