Lantern command reference
This document explains every lantern ... command, the data it produces, and how to interpret it.
For step-by-step workflows, see docs/use-cases.md.
Common concepts
- Workspace root: A directory that contains multiple Git repositories. Most commands accept
--root. If you do not pass it, Lantern assumes the current working directory and starts scanning from there. - Repository discovery: Lantern considers any directory with a
.gitfolder to be a repo. - Depth:
--max-depthlimits how deep Lantern traverses from--root(default: 6). - Hidden directories: By default, directories starting with
.are skipped. Use--include-hiddento include them. - Tables: Output from
lantern table,lantern status, etc. is a fixed-width text table. - JSON scans:
lantern scanstores the full repository records to JSON for latertableorreportusage.
Shell completion
pip install -e .
source completions/lantern.bash
Server configuration
Lantern can read a config.json file to manage multiple git servers (GitHub, GitLab, Bitbucket, or self-hosted instances).
Config file location:
- Checks (first match wins):
- GIT_LANTERN_CONFIG=/path/to/config.json (explicit override)
- ~/.git-lantern/config.json
- ~/.config/git-lantern/config.json
- /etc/git-lantern/config.json
- /usr/local/etc/git-lantern/config.json
Active server selection:
- Use --server NAME on lantern forge ... commands to select a server for that command.
- Or set LANTERN_SERVER=NAME to choose a default for the session.
Example config:
{
"default_server": "github.com",
"servers": {
"github.com": {
"provider": "github",
"base_url": "https://api.github.com",
"USER": "my-user",
"TOKEN": "ghp_xxx",
"organizations": [
{ "name": "my-org-a", "token": "ghp_org_a_token" },
{ "name": "my-org-b" }
]
},
"gitlab.com": {
"provider": "gitlab",
"base_url": "https://gitlab.com/api/v4",
"USER": "my-user",
"TOKEN": "glpat_xxx"
},
"bitbucket.org": {
"provider": "bitbucket",
"base_url": "https://api.bitbucket.org/2.0",
"USER": "my-user",
"TOKEN": "bb-token",
"auth": { "type": "bearer" }
},
"10.0.0.22": {
"provider": "gitlab",
"base_url": "https://10.0.0.22/api/v4",
"USER": "my-user",
"TOKEN": "glpat_xxx"
}
}
}
List configured servers:
lantern servers
Export server config:
lantern config export --output git-lantern-servers.json
lantern config export --output - # stdout
Import server config:
lantern config import --input git-lantern-servers.json
lantern config import --input git-lantern-servers.json --replace
Show active config path:
lantern config path
Interactive server setup (TUI):
lantern config setup
This opens a dialog-based interface to: - Add servers from presets (github.com, gitlab.com, bitbucket.org) - Add custom self-hosted servers - Edit existing server settings (username, token) - Remove servers - Set the default server
Requires the dialog CLI tool to be installed.
Interactive TUI Mode
Launch lantern in interactive TUI mode with:
lantern
lantern tui
lantern --tui
lantern -t
TUI Menu Structure
Git Lantern (main menu)
│
├── servers - Display configured servers in a message box
│
├── config - Server configuration submenu
│ ├── workspace - Set persistent workspace root
│ ├── scan_path - Set persistent JSON scan path
│ ├── setup - Interactive server configuration wizard
│ ├── path - Show config file path
│ ├── export - Export config to JSON file
│ ├── import - Import config from JSON file
│ └── back - Return to main menu
│
├── settings - Session settings submenu
│ ├── depth - Set max scan depth (1-20)
│ ├── hidden - Toggle include hidden directories
│ ├── forks - Toggle include forks in forge list
│ └── back - Return to main menu
│
├── repos - List local repositories (uses session settings)
├── status - Show repository status table (uses session settings)
├── lazygit - Open selected repository in lazygit
├── fleet - Unified plan/apply/logs for clone/pull/push/report
├── hooks - Security hooks on your repositories (status/apply/repair)
├── scan - Scan repos to JSON file (uses session settings)
├── table - Render table from a JSON scan file
├── find - Find repos by name/remote (uses session settings)
├── duplicates - Find duplicate repos (uses session settings)
│
├── forge - Git forge operations submenu
│ ├── list - List remote repos (display in TUI)
│ ├── list_file - List remote repos (save to JSON file)
│ ├── clone - Clone repos from JSON list (with checklist selection)
│ ├── snippets - List gists/snippets (display in TUI)
│ ├── snippets_file - List gists/snippets (save to JSON file)
│ ├── snippet_dl - Download a gist/snippet by ID
│ ├── gist_create - Create a new gist (GitHub only)
│ └── back - Return to main menu
│
├── report - Export scan results (CSV/JSON/MD)
├── command - Run any `lantern ...` command from TUI
│
└── exit - Exit TUI (clears screen)
Note: legacy lantern sync ... remains available in direct CLI and can also be run from TUI via command.
Session Settings
The TUI uses session-based settings that persist throughout your session: - Root directory: Defaults to the current working directory; displayed in the main menu header - Max depth: How deep to scan for repositories (default: 6, range: 1-20) - Include hidden: Whether to scan hidden directories (default: off) - Include forks: Whether to include forks in forge list (default: off)
All settings are shown in the main menu: Root: /path | Depth: 6 | Hidden: no | Forks: no
Use Settings to change any setting. Changes apply immediately to all subsequent operations.
TUI Output Display
All table outputs (repos, status, find, duplicates, etc.) are displayed in: - Scrollable dialog text boxes - Full terminal height/width (70% of terminal size) - Navigate with arrow keys, Page Up/Down - Press Enter or Escape to close
Clean Exit
When exiting the TUI (via "exit" menu item or Cancel), the screen is cleared automatically, returning you to a clean terminal.
Dependencies
Requires the dialog CLI tool:
# Debian/Ubuntu
sudo apt install dialog
# macOS
brew install dialog
# Fedora/RHEL
sudo dnf install dialog
# Arch Linux
sudo pacman -S dialog
For detailed TUI workflows, see docs/use-cases.md#interactive-tui-mode.
Unified fleet commands
lantern fleet overview
Purpose: build the primary fleet dashboard snapshot in one pass.
What it does:
- scans local repos under --root,
- optionally refreshes remote refs with --fetch,
- compares local repos with remote repos from --server or --input,
- annotates each repo with current/default/latest branch info, tracked-dirty state, and open PR numbers,
- optionally writes the full snapshot JSON with --output.
Example:
lantern fleet overview --root ~/workspace --server github.com --fetch
lantern fleet overview --root ~/workspace --server github.com --fetch --with-prs
lantern fleet overview --root ~/workspace --server github.com --fetch --output data/fleet-snapshots/latest.json
lantern fleet plan
Purpose: one-table reconciliation across local and remote repositories.
What it does:
- scans local repos under --root,
- compares local origin remotes with remote repos from either:
- live forge API (--server) or
- pre-exported JSON (--input),
- classifies each repo as:
- missing-local (exists remotely, not cloned locally),
- behind-remote (local behind upstream),
- ahead-remote (local ahead upstream),
- in-sync,
- diverged,
- local-only.
- when --with-prs is enabled (GitHub), includes:
- fresh open PR numbers,
- latest active PR branch hint.
Example:
lantern fleet plan --root ~/workspace --server github.com --fetch
lantern fleet plan --root ~/workspace --server github.com --fetch --with-prs
lantern fleet apply
Fleet apply synchronizes submodules to the commits recorded by each repository before
checking worktree eligibility and after a successful clone, pull, or branch checkout.
This repairs clean submodule directories left at an older commit by an earlier pull.
It does not advance submodule pins to their remote tips. Local submodule edits,
untracked files, staged pointers, and modified .gitmodules are preserved and reported
as submodules:skip-dirty; update failures appear in the JSON log.
Dry runs leave submodules untouched. Latest-branch selection excludes dependabot/
branches and prefers main (or master) when it contains the newest eligible tip.
An isolated REBASE_HEAD left by a completed rebase is not an active operation;
the rebase-merge and rebase-apply state directories still block unsafe actions.
Purpose: apply selected reconciliation actions.
Actions:
- --clone-missing: clone repos in missing-local state
- --clone-protocol auto|ssh|https (default auto): auto checks SSH access once per host and
falls back to HTTPS when the host rejects SSH (for example, no SSH key on this machine);
ssh skips clones when SSH is rejected; https always clones over HTTPS.
Clones do not stop on terminal prompts for passwords, passphrases or host keys. When access fails, the run
explains what is missing (SSH key, trusted host key, or HTTPS credentials) and how to fix it;
failed clones list their reason in the output and in --log-json.
- --pull-behind: run git pull --ff-only for repos in behind-remote
- --push-ahead: run git push for repos in ahead-remote
- --checkout-branch <name>: checkout/update named branch across selected repos
- --checkout-pr <number>: resolve PR to branch (GitHub) and checkout/update it
Selection:
- --repos repo1,repo2 to target specific repos from the plan
- omit --repos to target all actionable repos
Execution reporting:
- --log-json <path>: write full execution details to JSON (options, per-repo actions/results, branch updates, summary totals)
- --snapshot <path>: reuse a previously generated fleet snapshot instead of rebuilding context
- --refresh: ignore --snapshot and rebuild the fleet snapshot before apply
Example:
lantern fleet apply --root ~/workspace --server github.com --clone-missing --pull-behind --push-ahead --only-clean
lantern fleet apply --root ~/workspace --server github.com --clone-missing --pull-behind --only-clean --log-json data/fleet-logs/run.json
lantern fleet apply --root ~/workspace --snapshot data/fleet-snapshots/latest.json --pull-behind
lantern fleet apply --root ~/workspace --server github.com --repos repo1,repo2 --dry-run
lantern fleet apply --root ~/workspace --server github.com --repos repo1,repo2 --checkout-branch feature/my-work
lantern fleet apply --root ~/workspace --server github.com --repos repo1,repo2 --checkout-pr 123
lantern fleet dirty
Purpose: quickly list repos with tracked local changes only.
What it does:
- scans local repos under --root,
- excludes untracked-only worktrees,
- prints repo, current branch, and path for tracked modifications.
Example:
lantern fleet dirty --root ~/workspace
lantern fleet logs
Purpose: inspect fleet apply JSON reports.
What it does:
- reads a specific log via --input, or discovers logs under <root>/data/fleet-logs/,
- with --latest, opens the newest log,
- by default, renders full JSON using jq pretty format,
- with --no-pretty, shows concise tabular summary output (and optional per-repo results with --show-results).
Example:
lantern fleet logs --latest
lantern fleet logs --input data/fleet-logs/fleet-apply-20260213T120000Z.json
lantern fleet logs --latest --no-pretty --show-results
Security hooks across your repositories
lantern hooks sets up the script-helpers per-repository hooks (git hooks and,
optionally, the AI agent hooks) in every clone under --root whose origin is
on github.com under one of your owners:
git config --global script-helpers.owners me,my-llc # your namespaces
git config --global script-helpers.home <a release copy> # 0.50.0 or newer; NikOS sets it
lantern hooks status # flags set-up clones where no push check or scan runs
lantern hooks apply --dry-run # the plan, nothing changed
lantern hooks apply --batch 10 [--agents claude,codex|all] [--only repo-a,clients/x/repo-b]
lantern hooks repair # re-chain after husky & co., or a missing hooks dir
lantern hooks remove [--agents codex] # all of ours, or those agents
lantern hooks export hooks.json # this machine
lantern hooks import hooks.json [--dry-run] # another machine
script-helpers.homeis where lantern runssetup-hooks.shfrom. Point it at a copy that stays on a release (NikOS pins one), not a checkout you switch branches in: on an older branch, status and repair run that older code.- A clone whose
originis not under an owner (an employer's, someone else's) is listed as "not owned, left alone" and never changed. applyalso setsgit config script-helpers.push-tests quick(quick tests on push, script-helpers 0.52.0 or newer) in owned clones of private repositories that have no value yet. A value already there (quick,off) is kept, and so is a global one (git config --global). Visibility comes fromgh api --hostname github.com repos/<owner>/<repo>(GH_HOSTdoes not redirect it); whenghis missing or signed out, the clone is reported as "visibility unknown" and left unset.statusshows the value in effect.exportcarries each clone's own value (push_tests), never the global one, andimportnever writes over a value the importing clone has.- Hooks a clone already runs keep running: script-helpers chains them
(
setup-hooks.sh), andremoverestores the previouscore.hooksPath. setup-hooks.shcomes fromscript-helpers.home(orSCRIPT_HELPERS_HOME), else lantern's vendored copy. One older than 0.50.0, or a configured home without it, is refused (exit 2), never replaced by the vendored copy.removewithout--agentstakes out everything the setup added (agent hooks, then the git hooks, restoring the previouscore.hooksPath).- The export lists repositories by remote (
github.com/<owner>/<repo>) with what is set up, never a local path, soimportfinds them wherever they are cloned, every clone of a repository included. Repositories not cloned on the importing machine are reported. lantern fleet applyrepairs taken-over clones after it runs (a pull that rannpm installcan let husky replacecore.hooksPath), only in the clones it was told to touch (--repos), reporting on stderr;--no-hooks-repairskips that.--onlytakes a comma-separated list. Each item is a clone's directory name (utils) or its path, absolute or relative to the current directory or--root(clients/x/utils). A name shared by two clones, or an item that matches no clone, is refused (exit 2) with the matching paths listed.- A linked worktree (
git worktree add) shares its main clone's config, so it is listed as "worktree of" and set up only through the main clone. importchecks the whole file first (each entry needsremote,git_hookstrue/false and anagentslist) and changes nothing if any entry is wrong.- A clone whose status cannot be read is reported as failed (exit 1) and left alone; it is never treated as "nothing set up".
- Exit codes: 0 done, 1 a clone failed, 2 configuration (no owners, no usable
script-helpers, a bad
--agentsvalue or export file).
Local repository commands
lantern repos
Purpose: List local repositories with minimal metadata.
What it does:
- Scans --root for Git repos.
- Returns one row per repo with the repository name, filesystem path, and origin remote URL (if present).
Output columns:
- name: Directory name of the repo.
- path: Absolute path to the repo.
- origin: Output of git remote get-url origin (or - if missing).
Example:
lantern repos --root ~/workspace
lantern scan
Purpose: Scan for repos and write detailed status data to JSON.
What it does:
- Finds all repos under --root.
- Optionally runs git fetch --prune when --fetch is provided.
- Builds a record per repo with branch/upstream/main-branch status fields.
- Writes JSON to --output (default: data/repos.json) or stdout if --output is empty.
Record fields:
- name: Repo directory name.
- path: Absolute path to the repo.
- branch: Current branch name, or detached.
- upstream: Upstream ref for the current branch (for example origin/main).
- up_ahead / up_behind: How many commits HEAD is ahead/behind its upstream.
- main_ref: Default branch ref inferred from remotes (for example origin/main).
- main_ahead / main_behind: How many commits HEAD is ahead/behind the default branch ref.
- default_refs: Comma-separated list of default refs detected across remotes.
- origin: origin remote URL (or null).
Example:
lantern scan --root ~/workspace --output data/repos.json --fetch
lantern status
Purpose: Show a live table of repo status without writing JSON.
What it does:
- Runs the same scan logic as lantern scan.
- Prints a table with the most relevant status columns.
- Detects latest_branch per repository.
- Optionally includes latest_pr numbers for GitHub repositories with --with-prs.
Output columns:
- name, branch, upstream, up, main_ref, main, latest_branch, latest_pr.
- up and main are shown as N↑/M↓ for ahead/behind counts.
- ≡ means no divergence (0↑/0↓) and is shown only when both ahead and behind counts are zero.
- latest_pr is - when PR lookup is disabled or unavailable.
Example:
lantern status --root ~/workspace
lantern status --root ~/workspace --with-prs
lantern lazygit
Purpose: Open lazygit in a selected repository for advanced per-repo Git inspection.
What it does:
- Checks if lazygit is installed.
- Resolves target repository from:
- --path (explicit repo path), or
- --repo (repo directory name under --root), or
- --select (interactive selection with dialog), or
- current directory (if already a repo root), or
- single discovered repo under --root.
Examples:
lantern lazygit --root ~/workspace --select
lantern lazygit --root ~/workspace --repo git-lantern
lantern lazygit --path ~/workspace/git-lantern
lantern table
Purpose: Render a table from a JSON scan.
How it works:
- Reads --input (default: data/repos.json) created by lantern scan.
- If --columns is set, only those comma-separated columns are shown.
- Otherwise, it renders every field from the first repo record in the JSON.
What it shows:
- The scan fields from lantern scan (see the list above), formatted as a fixed-width table.
- When up_ahead/up_behind and main_ahead/main_behind are present, it renders consolidated up and main columns as N↑/M↓ (or ≡ when clean).
Example:
lantern table --input data/repos.json
lantern table --input data/repos.json --columns name,branch,up_ahead,up_behind
lantern find
Purpose: Filter repositories by name or remote URL.
What it does:
- Scans --root for repos.
- Filters by --name (substring match on repo directory name).
- Filters by --remote (substring match on origin URL).
Output columns:
- name, path, origin.
Example:
lantern find --root ~/workspace --name lantern
lantern find --root ~/workspace --remote github.com/my-org
lantern duplicates
Purpose: Identify multiple clones pointing at the same origin URL.
What it does:
- Scans --root for repos.
- Groups repos by origin remote URL.
- Prints only groups with 2+ repos sharing the same origin.
Output columns:
- count: How many repos share the origin.
- origin: The shared origin URL.
- paths: A | separated list of repo paths.
Example:
lantern duplicates --root ~/workspace
lantern sync
Purpose: Run git fetch, git pull, and/or git push across many repos.
What it does:
- If no action flags are given, it defaults to --fetch.
- Executes the chosen Git commands in each repo:
- fetch => git fetch --prune
- pull => git pull --ff-only
- push => git push
- Adds --only-clean to skip repos with uncommitted changes.
- Adds --only-upstream to skip repos without an upstream.
- Adds --dry-run to print intended actions without running Git.
Output columns:
- name: Repo name.
- result: A summary such as fetch:ok pull:ok, or skip:dirty.
- path: Repo path.
Example:
lantern sync --root ~/workspace --fetch
lantern sync --root ~/workspace --pull --only-clean --only-upstream
lantern sync --root ~/workspace --push --dry-run
lantern report
Purpose: Export scan results to CSV, JSON, or Markdown.
What it does:
- Reads a JSON scan (--input, default data/repos.json).
- Writes in the selected --format:
- csv (default)
- json
- md
- If --columns is provided, only those fields are exported.
- If --output is empty, writes to stdout.
Examples:
lantern report --input data/repos.json --output data/repos.csv
lantern report --input data/repos.json --format md --output data/repos.md
lantern report --input data/repos.json --format json
lantern todo issues
Purpose: Create GitHub issues from a TODO list, skipping duplicates (same title and body, open or closed).
Input forms (--todo-file, default TODO.txt):
- .txt: [TODO]...[/TODO] block with ID:, Title:, Description: lines.
- .md: one issue per ## Title heading. An optional ID: <id> (or
**ID:** <id>) line may follow the heading; the rest is the description.
A leading Description: label is dropped, so an item gives the same issue
body from .txt and .md and duplicates are found across both.
If the file has a [TODO]...[/TODO] block, only that block is read.
A heading with no description is skipped with a message.
- Directory: each *.md file (not recursive, dotfiles ignored) is one issue.
Optional front matter sets title, labels and id (keys are
case-insensitive; values are literal, so title: Fix #12 keeps #12);
without title the first # heading is used. labels is a list
([a, b] or - a lines) or a comma-separated string. A file with no
title, an unclosed front matter block, invalid UTF-8 or a read error is
skipped with a message; the run continues.
- Labels from --label and front matter are both applied; --dry-run lists them.
- In a directory, a *.md symlink whose target is outside that directory is
skipped, so a cloned repo cannot publish a file such as ~/.ssh/id_rsa.
A symlinked --todo-file path itself is followed.
- An item whose issue body exceeds 65536 characters (GitHub's limit) is skipped
with a message and counted as Skipped too long in the final Done. line.
- Control characters in titles and file names are printed escaped (\x1b).
Examples:
lantern todo issues --todo-file TODO.txt --dry-run
lantern todo issues --todo-file TODO.md --label backlog
lantern todo issues --todo-file issues/
TODO.md:
## Add login rate limit
ID: 001
Return 429 after five failed logins per IP.
issues/rate-limit.md:
---
title: Add login rate limit
labels: [security, backend]
---
Return 429 after five failed logins per IP.
Git server commands (lantern forge ...)
The lantern forge command group can target GitHub, GitLab, or Bitbucket using --server and the config file.
It also reads the environment variables below, from the shell or from a .env file (the file named by GIT_LANTERN_ENV, or .env in the lantern checkout itself; see the README). It uses the current directory if --root is not set.
Environment fallbacks:
- GITHUB_USER, GITHUB_TOKEN
- GITLAB_USER, GITLAB_TOKEN
- BITBUCKET_USER, BITBUCKET_TOKEN
- LANTERN_SERVER (for default server selection)
Precedence:
- CLI flags (--user, --token, --server)
- Environment variables (shell, then the .env file described above)
- config.json values
lantern forge list
Purpose: List repositories from the selected git server (JSON or table output).
What it does:
- Uses --server to select a provider (defaults to default_server, which defaults to github.com).
- Uses --user (or config/env defaults) to scope repos.
- If --token is set, it uses the authenticated endpoint and can include private repos owned by the user.
- GitHub supports organization-scoped listing:
- --org ORG (repeatable) selects one or more orgs.
- --all-orgs uses all orgs configured under the selected server.
- --with-user includes personal repos alongside selected org repos.
- Organization entries in config can carry per-org token overrides (organizations[].token).
- If --include-forks is not set, forked repos are excluded.
- Writes JSON to --output (or stdout with --output -).
- If --output is omitted, prints a table instead of JSON.
Output fields per repo:
- name, private, default_branch, ssh_url, clone_url, html_url.
Output metadata:
- server, provider, base_url, user.
Example:
lantern forge list --server github.com --user my-user --output data/github.json
lantern forge list --server gitlab.com --output data/gitlab.json
lantern forge list --server bitbucket.org --output data/bitbucket.json
lantern forge list --server github.com --org my-org-a --org my-org-b --output data/github-orgs.json
lantern forge list --server github.com --all-orgs --with-user --output data/github-all.json
lantern forge clone
Purpose: Clone repos from a git server list JSON.
What it does:
- Reads --input (default data/github.json).
- Clones each repo into --root over SSH, or HTTPS when the host rejects SSH
(--clone-protocol auto|ssh|https, default auto).
- Skips repos already present.
- Reports failed clones with a reason and how to fix missing SSH keys or HTTPS credentials;
exits non-zero when any clone fails.
- With --dry-run, prints the clone commands without executing.
Example:
lantern forge clone --input data/github.json --root ~/workspace
lantern forge gists list / lantern forge snippets list
Purpose: List gists (GitHub) or snippets (GitHub/GitLab/Bitbucket).
What it does:
- Uses --server to select a GitHub/GitLab/Bitbucket server.
- Uses --user or GITHUB_USER for public GitHub gists, or a token to list the authenticated user's gists.
- Writes JSON to --output (or stdout with --output -).
- If --output is omitted, prints a table instead of JSON.
Output fields per gist:
- id, description, public, files, html_url, updated_at.
Example:
lantern forge gists list --user my-user --output data/gists.json
lantern forge gists update / lantern forge snippets update
Purpose: Update or delete files in an existing gist/snippet (GitHub only).
What it does:
- Requires a GitHub token (--token or GITHUB_TOKEN).
- --file can be repeated and supports name=path syntax.
- --delete can be repeated to remove files.
- If you would overwrite or delete existing files, you must provide --force.
- --description updates the gist description.
Examples:
lantern forge gists update GIST_ID --file ./notes.txt --force
lantern forge gists update GIST_ID --file readme.md=./README.md
lantern forge gists update GIST_ID --delete old.txt --force
lantern forge gists create / lantern forge snippets create
Purpose: Create a new gist/snippet (GitHub only).
What it does:
- Requires a GitHub token (--token or GITHUB_TOKEN).
- --file can be repeated and supports name=path syntax.
- Visibility defaults to private unless --public is set.
- --description sets the gist description.
Examples:
lantern forge gists create --file ./notes.txt --description "Notes" --public
lantern forge gists create --file ./notes.txt --description "Notes" --private
Pull request commands (lantern pr ...)
lantern pr sweep
Purpose: discover open pull requests that still have unresolved review threads across your personal GitHub namespace, so you can decide which ones to fix next.
Synopsis:
lantern pr sweep [OPTIONS] [REPO...]
What it does:
- Lists every repo owned by --owner (default: the authenticated GitHub user from
gh api user --jq .login).
- Filters out forks and archived repos automatically.
- Optionally queries a portfolio API instance to skip frozen/archived projects.
- For each remaining repo, finds open PRs and counts unresolved review threads via
the GitHub GraphQL API; only PRs with at least one unresolved thread are listed.
- Discovery and listing only — it does not dispatch fixes itself. Use the output
to drive a per-PR fix workflow (e.g. implement_pr.txt).
- GitHub servers only; selecting a non-GitHub provider fails fast.
Requirements:
- GitHub CLI (gh) authenticated, or a token via --token/GITHUB_TOKEN.
Options:
- --owner <user>: GitHub username to scan (default: authenticated user).
- --server <name>: configured server name (must be a GitHub provider).
- --token <token>: GitHub personal access token (overrides config/gh).
- --include-forks: include forked repositories (default: exclude forks).
- --skip-frozen / --no-skip-frozen: toggle the portfolio API frozen filter
(default: enabled).
- --portfolio-url <url>: portfolio API base URL (default: $LANTERN_PORTFOLIO_API_URL or
http://localhost:8000).
- --dry-run: print the eligible PR table and exit (no selection prompt).
- --json: emit selected jobs as JSON for machine consumption.
- REPO...: optional positional owner/repo names to restrict the sweep.
Examples:
# Preview every eligible PR for the authenticated user
lantern pr sweep --dry-run
# Scan a specific account
lantern pr sweep --owner nikolareljin --dry-run
# Restrict the sweep to specific repos
lantern pr sweep nikolareljin/git-lantern nikolareljin/ci-helpers --dry-run
# Skip the portfolio API frozen filter
lantern pr sweep --no-skip-frozen --dry-run
# Machine-readable output for a downstream fix workflow
lantern pr sweep --json