Command line
Every command and flag, generated from the binary.
Generated from the 0.1.0-beta.7 binary. Run repo-keeper <command> -h for the same text.
Commands
| Command | What it does |
|---|---|
init | write a starter configuration file |
config validate | check the configuration file |
daemon | run the background service (scheduled syncs) |
start | stop | restart | run the daemon detached in the background (no service manager needed) |
status | show tracked repositories and their last sync |
ui | open the web interface (signs in with a one-time link) |
accounts add|list|check|rm | manage platform logins (tokens live in the OS keychain) |
discover | list what each account would clone (no changes) |
sync <repo> | fetch, fast-forward the default branch, optionally clean merged branches |
cleanup <repo> | evaluate/delete merged local branches (dry-run unless --cleanup=auto) |
restore <repo> <branch> | bring back a branch deleted by cleanup (kept 30 days) |
audit | show the journal of deletions, restores and blocked cleanups |
doctor | check git version and state directory |
update | check for a newer release; --apply installs it (tarball installs, asks first) |
version | print version |
repo-keeper init
write a starter configuration file
Usage of init:
-config string
config file (default: per-user config dir)
repo-keeper config validate
check the configuration file
Usage of config validate:
-config string
config file
repo-keeper daemon
run the background service (scheduled syncs)
Usage of daemon:
-config string
config file (default: per-user config dir)
-json
JSON logs
-log-level string
debug | info | warn | error (default "info")
-no-ui
do not start the web interface
-state-dir string
state directory (default: per-user state dir)
repo-keeper start
run the daemon detached in the background (no service manager needed)
Usage of start:
-config string
config file (default: per-user config dir)
-json
JSON logs
-log-level string
debug | info | warn | error (default "info")
-no-ui
do not start the web interface
-runtime-dir string
directory holding ui.json (default: per-user runtime dir)
-state-dir string
state directory (default: per-user state dir)
repo-keeper stop
run the daemon detached in the background (no service manager needed)
Usage of stop:
-config string
config file (default: per-user config dir)
-json
JSON logs
-log-level string
debug | info | warn | error (default "info")
-no-ui
do not start the web interface
-runtime-dir string
directory holding ui.json (default: per-user runtime dir)
-state-dir string
state directory (default: per-user state dir)
repo-keeper restart
run the daemon detached in the background (no service manager needed)
Usage of restart:
-config string
config file (default: per-user config dir)
-json
JSON logs
-log-level string
debug | info | warn | error (default "info")
-no-ui
do not start the web interface
-runtime-dir string
directory holding ui.json (default: per-user runtime dir)
-state-dir string
state directory (default: per-user state dir)
repo-keeper status
show tracked repositories and their last sync
Usage of status:
-json
machine-readable output
-state-dir string
state directory
repo-keeper ui
open the web interface (signs in with a one-time link)
Usage of ui:
-print-url
print the sign-in URL instead of opening a browser (SSH port-forward: ssh -L PORT:127.0.0.1:PORT)
-runtime-dir string
directory holding ui.json (default: per-user runtime dir)
repo-keeper accounts add
manage platform logins (tokens live in the OS keychain)
Usage of accounts add:
-base-url string
API base URL (GitHub Enterprise: https://host/api/v3, self-managed GitLab: https://host)
-client-id string
OAuth/GitHub App client id for --device
-config string
config file
-device
log in with the OAuth device flow
-exclude string
comma-separated exclude globs
-include string
comma-separated include globs, e.g. me/*,my-org/*
-no-credential
generic git only: use SSH keys or public repositories, no token
-provider string
platform: github | gitlab | gitea | forgejo | bitbucket | azuredevops | git (default "github")
-scope string
OAuth scope for --device (leave empty for GitHub Apps)
-token-env string
read the token from this environment variable instead of the keychain
-token-file string
read the token from this file (mode 600) instead of the keychain
-token-stdin
read the token from the first line of stdin
-urls string
comma-separated clone URLs (generic git: https or ssh, no password inside)
-web-url string
web base URL for --device (GitHub Enterprise: https://host)
repo-keeper accounts list
manage platform logins (tokens live in the OS keychain)
Usage of accounts list:
-config string
config file
repo-keeper accounts check
manage platform logins (tokens live in the OS keychain)
Usage of accounts check:
-config string
config file
usage: repo-keeper accounts check <name>
repo-keeper accounts rm
manage platform logins (tokens live in the OS keychain)
Usage of accounts rm:
-config string
config file
usage: repo-keeper accounts rm <name>
repo-keeper discover
list what each account would clone (no changes)
Usage of discover:
-account string
limit to one account
-config string
config file
repo-keeper sync <repo>
fetch, fast-forward the default branch, optionally clean merged branches
Usage of sync:
-allow-never-pushed
also delete merged branches that were never pushed
-cleanup string
branch cleanup mode: off | dry-run | auto (default "dry-run")
-default-only
fetch only the default branch
-journal string
audit journal file (default: per-user state dir)
-min-age duration
never delete branches whose tip is younger than this (default 168h0m0s)
-protected string
comma-separated protected branch globs (default "main,master,trunk,develop,dev,staging,production,release/*,hotfix/*")
-remote string
remote name (default "origin")
repo-keeper cleanup <repo>
evaluate/delete merged local branches (dry-run unless --cleanup=auto)
Usage of cleanup:
-allow-never-pushed
also delete merged branches that were never pushed
-cleanup string
branch cleanup mode: off | dry-run | auto (default "dry-run")
-journal string
audit journal file (default: per-user state dir)
-min-age duration
never delete branches whose tip is younger than this (default 168h0m0s)
-protected string
comma-separated protected branch globs (default "main,master,trunk,develop,dev,staging,production,release/*,hotfix/*")
-remote string
remote name (default "origin")
repo-keeper restore <repo> <branch>
bring back a branch deleted by cleanup (kept 30 days)
Usage of restore:
-allow-never-pushed
also delete merged branches that were never pushed
-cleanup string
branch cleanup mode: off | dry-run | auto (default "off")
-journal string
audit journal file (default: per-user state dir)
-min-age duration
never delete branches whose tip is younger than this (default 168h0m0s)
-protected string
comma-separated protected branch globs (default "main,master,trunk,develop,dev,staging,production,release/*,hotfix/*")
repo-keeper audit
show the journal of deletions, restores and blocked cleanups
Usage of audit:
-allow-never-pushed
also delete merged branches that were never pushed
-cleanup string
branch cleanup mode: off | dry-run | auto (default "off")
-journal string
audit journal file (default: per-user state dir)
-min-age duration
never delete branches whose tip is younger than this (default 168h0m0s)
-protected string
comma-separated protected branch globs (default "main,master,trunk,develop,dev,staging,production,release/*,hotfix/*")
repo-keeper doctor
check git version and state directory
This command takes no flags.
repo-keeper update
check for a newer release; --apply installs it (tarball installs, asks first)
Usage of update:
-apply
download, verify and install it over this binary (asks first; tarball installs only)
-check
show whether a newer release exists and the evidence to verify it (the default)
-rollback
put back the version that was kept before the last update
-version string
use exactly this release instead of the newest (with --apply this also allows a downgrade)
repo-keeper version
print version
This command takes no flags.