Githome
Reference: CLI reference
Docs / Reference

CLI reference

Every command and option of the githome command-line client, generated from its source.

This page lists every command of the githome command-line client (version 0.2.0) with all of its options. It is generated from the CLI's own command definitions, so it always matches githome <command> --help.

Install

curl -fsSL https://git.pkgforge.dev/install | bash      # Linux and macOS
githome setup                                     # sign in through your browser, set up git and gh

On Windows, in PowerShell: powershell -c "irm https://git.pkgforge.dev/install.ps1 | iex". The CLI runs on Node.js 26 or later; the script installs a private copy of the Node.js 26 LTS from nodejs.org when yours is older or missing. githome upgrade updates it. See Install and sign in to the CLI.

Configuration

SettingWhereNotes
Server URLGITHOME_URL, else url in the config file, else https://git.pkgforge.devSet this to use another Githome server.
TokenGITHOME_TOKEN, else token in the config filegithome login signs in through the browser and stores the CLI's token in the config file.
Config file~/.config/githome/config.json ($XDG_CONFIG_HOME/githome/config.json when set)Written by githome login.

Commands that work on a repository take -R OWNER/NAME. Without it, the CLI uses the origin remote of the git repository you are in, when that remote points at the configured server.

Most read commands take --json to print the raw API response, for scripts and agents.

Exit codes

CodeMeaning
0Success.
1The command failed (an API error, a failed check, a failed run when waiting).
2Usage error: unknown command, bad option or missing argument. Help is printed to stderr.

Commands

CommandSummary
agentManage agent accounts
apiMake an authenticated API request and print the response
authGit and GitHub CLI integration
inviteInvite someone by email to an organization
issueWork with issues
loginSign in through your browser (or with a token)
logoutSign out: forget the saved token, and revoke it if a browser sign-in created it
mcp-configPrint an MCP server config snippet for Claude Code and other MCP clients
migrateImport repositories from other forges
prWork with pull requests
repoCreate, list, view and clone repositories
runInspect and control workflow runs
runnerRun self-hosted workflow jobs on this machine
secretManage Actions secrets
setupSet up this computer in one go: sign in, then git and gh
tokenManage personal access tokens
upgradeUpdate the CLI to the server's latest build
variableManage Actions variables
whoamiShow the account the current token acts as
workflowRun and validate workflows

githome agent

Manage agent accounts.

githome agent create

Create an agent account and print its token once.

githome agent create <login> [options]

Creating an agent mints its first token, which tokens can't do: on git.pkgforge.dev create agents in the web UI (Settings → Agents); the command works against a local development server.

OptionDescription
-o, --org ORGOwned by this organization instead of you
-n, --name NAMEDisplay name
-s, --scope SCOPEToken scope: read, write (default) or admin Repeatable.
-e, --expires-days DAYSToken lifetime in days (default 90)
--jsonPrint raw JSON

githome agent disable

Disable an agent (its tokens stop working).

githome agent disable <login>

githome agent list

List agents you or your organizations own.

githome agent list [options]
OptionDescription
--jsonPrint raw JSON

githome auth

Git and GitHub CLI integration.

githome auth git-credential

Git credential helper (used by 'auth setup-git').

githome auth git-credential <get|store|erase>

githome auth setup-gh

Sign the GitHub CLI (gh) in to Githome with your token.

githome auth setup-gh

Runs: gh auth login --hostname <host> --with-token --git-protocol https, with the token from the config file or GITHOME_TOKEN on its standard input. gh then treats the Githome host like GitHub Enterprise Server: gh pr create, view, checks, status, merge and the rest work in clones of Githome repositories, and so does the pull request badge of Claude Code, which asks gh for its token.

githome auth setup-git

Make git use your Githome token for HTTPS remotes.

githome auth setup-git

Runs: git config --global credential.<url>.helper "!githome auth git-credential" (after resetting other helpers for that URL), so clone/fetch/push to the Githome host authenticate with the token from the config file or GITHOME_TOKEN.

githome issue

Work with issues.

githome issue close

Close an issue.

githome issue close <number> [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-r, --reason REASONcompleted (default) or not_planned
-c, --comment TEXTLeave a comment too
--jsonPrint raw JSON

githome issue comment

Comment on an issue.

githome issue comment <number> [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-b, --body TEXTBody text (Markdown)
--body-file FILERead the body from a file ('-' for stdin)
--jsonPrint raw JSON

githome issue create

Open an issue.

githome issue create [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-t, --title TEXTTitle (required)
-b, --body TEXTBody text (Markdown)
--body-file FILERead the body from a file ('-' for stdin)
-l, --label NAMEAdd a label Repeatable.
-a, --assignee LOGINAssign a login Repeatable.
--jsonPrint raw JSON

githome issue list

List issues.

githome issue list [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-s, --state STATEopen, closed or all (default: open)
-l, --label NAMEOnly issues with this label
-A, --author LOGINOnly issues opened by this login
-S, --search QUERYSearch text
-L, --limit NMaximum number to show (default 30)
--jsonPrint raw JSON

githome issue reopen

Reopen an issue.

githome issue reopen <number> [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-c, --comment TEXTLeave a comment too
--jsonPrint raw JSON

githome issue view

Show an issue and its comments.

githome issue view <number> [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--jsonPrint raw JSON

githome migrate

Import repositories from other forges.

githome migrate github

Import a GitHub repository (git data, issues, pull requests, releases and more).

githome migrate github <GH-OWNER/GH-REPO> [options]

Runs a full server-side import: git data (keeping issue and pull-request numbers), labels, milestones, issues and pull requests with comments and reviews, branch protection, Actions variables, release assets and deployment environments. The command follows progress until the import finishes. Secret values are never read from GitHub; their names are listed to set by hand.

With --local, runs the old client-side import instead (mirror push plus a best-effort recreation of issues and open pull requests); --issues then also copies labels, issues and comments.

GitHub access uses GH_TOKEN or GITHUB_TOKEN (needed for private repositories; GITHUB_API_URL selects a GitHub Enterprise API).

OptionDescription
-t, --to OWNER/NAMEGithome repository to create (default: <you>/<gh-repo>)
-p, --privateCreate the repository as private regardless of GitHub's visibility
-l, --localUse the old client-side import (no server importer)
-i, --issuesWith --local: also import labels, issues, comments and open pull requests
--jsonPrint raw JSON

githome migrate github-org

Import many repositories from a GitHub organization or user.

githome migrate github-org <GH-ORG-OR-USER> [options]

Starts a server-side bulk import of every repository in a GitHub organization or user account (or just the ones named with --repos), into a Githome organization or user. Each repository is imported in full, the same as "migrate github". The command follows progress until every repository has finished.

GitHub access uses GH_TOKEN or GITHUB_TOKEN; GITHUB_API_URL selects a GitHub Enterprise API.

OptionDescription
-t, --to OWNERGithome owner to import into (default: you)
--repos A,B,CComma-separated repository names to import (default: all)
-p, --privateCreate every repository as private
--exclude-forksSkip forks
--exclude-archivedSkip archived repositories
-c, --concurrency NRepositories to import at once, 1–8 (default 3)
--jsonPrint raw JSON

githome pr

Work with pull requests.

githome pr checks

Show check status for a pull request.

githome pr checks [<number>] [options]

Without a number, shows the open pull request for the current branch. With --watch, polls until no check is pending (waiting up to 2 minutes for the first check to appear, as right after a push), printing the checks whenever they change (on a terminal; otherwise once at the end).

Exit status: 0 when all checks passed, 1 when any failed, 8 when some are still pending (never with --watch).

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--watchWait until no check is pending
-i, --interval SECONDSSeconds between polls with --watch (default 10)
--jsonPrint raw JSON

githome pr comment

Comment on a pull request.

githome pr comment [<number>] [options]

Without a number, comments on the open pull request for the current branch.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-b, --body TEXTBody text (Markdown)
--body-file FILERead the body from a file ('-' for stdin)
--jsonPrint raw JSON

githome pr create

Open a pull request.

githome pr create [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-t, --title TEXTTitle (required)
-b, --body TEXTBody text (Markdown)
--body-file FILERead the body from a file ('-' for stdin)
-H, --head BRANCHBranch with your changes (default: current branch)
-B, --base BRANCHBranch to merge into (default: the repository's default branch)
-d, --draftOpen as a draft
--intent TEXTWhat this change is for, for reviewers (agents should always set it)
-r, --reviewer LOGINRequest a review from this login Repeatable.
--autoTurn on auto-merge as it opens: it merges once the base branch's required checks pass and every rule is met
--no-autoKeep auto-merge off, even if your setting turns it on for pull requests you open
--jsonPrint raw JSON

githome pr diff

Show a pull request's changes as a unified diff.

githome pr diff [<number>] [options]

Without a number, shows the open pull request for the current branch.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--name-onlyOnly list changed file names

githome pr list

List pull requests.

githome pr list [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-s, --state STATEopen, closed, merged or all (default: open)
-L, --limit NMaximum number to show (default 30)
-A, --author LOGINOnly pull requests opened by this login
-H, --head BRANCHOnly pull requests from this branch
--jsonPrint raw JSON

githome pr merge

Merge a pull request.

githome pr merge [<number>] [options]

Without a number, merges the open pull request for the current branch.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-m, --mergeCreate a merge commit (default)
-s, --squashSquash into one commit
-r, --rebaseRebase the commits onto the base branch
-d, --delete-branchDelete the head branch after merging
-t, --subject TEXTCommit title
-b, --body TEXTBody text (Markdown)
--body-file FILERead the body from a file ('-' for stdin)
--match-head-commit SHAOnly merge if the head is still at this SHA
--adminMerge now, bypassing unmet branch rules and any merge queue (repository admins; audited)
--autoTurn on auto-merge: merge (or join the merge queue) once every requirement is met
--disable-autoTurn off auto-merge (and take the pull request out of the merge queue if it is in it)
--jsonPrint raw JSON

githome pr ready

Mark a draft pull request ready for review.

githome pr ready [<number>] [options]

Without a number, uses the open pull request for the current branch.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--undoConvert the pull request back to a draft
--jsonPrint raw JSON

githome pr review

Approve, request changes or comment on a pull request.

githome pr review [<number>] [options]

Without a number, reviews the open pull request for the current branch.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-a, --approveApprove
-r, --request-changesRequest changes
-c, --commentComment without approving
-b, --body TEXTBody text (Markdown)
--body-file FILERead the body from a file ('-' for stdin)
--jsonPrint raw JSON

githome pr view

Show a pull request.

githome pr view [<number>] [options]

Without a number, shows the open pull request for the current branch.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-c, --commentsInclude the conversation
--jsonPrint raw JSON

githome repo

Create, list, view and clone repositories.

githome repo clone

Clone a repository.

githome repo clone <OWNER/NAME> [directory]

The token is passed to this one git command as an HTTP header and is never written to .git/config. Run 'githome auth setup-git' so later fetches and pushes authenticate too.

githome repo create

Create a repository.

githome repo create <name> [options]
OptionDescription
--org ORGCreate it in this organization
--privateOnly collaborators can see it (default)
--publicAnyone can see it
-d, --description TEXTDescription
--default-branch BRANCHDefault branch name
--jsonPrint raw JSON

githome repo list

List repositories you can see.

githome repo list [options]
OptionDescription
--owner OWNEROnly repositories owned by this user or organization
--jsonPrint raw JSON

githome repo view

Show a repository.

githome repo view [OWNER/NAME] [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--jsonPrint raw JSON

githome run

Inspect and control workflow runs.

githome run cancel

Cancel a queued or running run.

githome run cancel <run-id> [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)

githome run list

List workflow runs.

githome run list [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-b, --branch BRANCHOnly runs for this branch
-w, --workflow FILEOnly runs of this workflow (file name or path)
-s, --status STATUSOnly runs with this status (queued, in_progress, completed, ...)
-e, --event EVENTOnly runs triggered by this event
-c, --commit SHAOnly runs for this commit SHA
-L, --limit NMaximum number to show (default 20)
--jsonPrint raw JSON

githome run logs

Print a job's log.

githome run logs <job-id> [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--jsonPrint raw JSON

githome run rerun

Re-run a workflow run.

githome run rerun [run-id] [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--failedOnly re-run the failed jobs and the jobs that depend on them
-j, --job JOB-IDRe-run this job and the jobs that depend on it (no run id needed)
--jsonPrint raw JSON

githome run view

Show a run and its jobs.

githome run view <run-id> [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--jsonPrint raw JSON

githome run watch

Follow a run until it completes.

githome run watch <run-id> [options]

Polls every 3 seconds and prints job status changes. Exits non-zero unless the run succeeds.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-i, --interval SECONDSSeconds between polls (default 3)

githome secret

Manage Actions secrets.

githome secret delete

Delete an Actions secret.

githome secret delete <NAME> [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-o, --org ORGDelete an organization secret instead

githome secret list

List Actions secret names.

githome secret list [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-o, --org ORGList organization secrets instead
--jsonPrint raw JSON

githome secret set

Create or update an Actions secret.

githome secret set <NAME> [options]

The value comes from --body, from stdin when piped, or a hidden prompt. Repository level by default; --org sets an organization secret. An organization secret reaches every repository unless --visibility (or --repos, which implies selected) says otherwise.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-b, --body VALUESecret value
-o, --org ORGSet an organization secret instead
--visibility all|private|selectedOrganization secrets: which repositories get it (all, private or selected)
--repos a,bOrganization secrets: the repositories that get it, comma separated

githome token

Manage personal access tokens.

githome token create

Create a personal access token (printed once).

githome token create [options]

Tokens can't create tokens, so on git.pkgforge.dev this needs the web UI (Settings → Access tokens); the command works against a local development server.

OptionDescription
-n, --name NAMEToken name (required)
-s, --scope SCOPEread, write (default) or admin Repeatable.
-e, --expires-days DAYSDays until it expires (1-366, default 90)
-R, --repo OWNER/NAMERestrict the token to this repository Repeatable.
--jsonPrint raw JSON

githome token list

List your tokens.

githome token list [options]
OptionDescription
--jsonPrint raw JSON

githome token revoke

Revoke a token.

githome token revoke <id>

githome variable

Manage Actions variables.

githome variable list

List Actions variables.

githome variable list [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--jsonPrint raw JSON

githome variable set

Create or update an Actions variable.

githome variable set <NAME> [options]

The value comes from --body, or from stdin when piped.

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-b, --body VALUEVariable value

githome workflow

Run and validate workflows.

githome workflow list

List the repository's workflows.

githome workflow list [options]
OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
--jsonPrint raw JSON

githome workflow run

Start a workflow_dispatch run.

githome workflow run <workflow-file> [options]

The workflow is matched by path (.github/workflows/deploy.yml) or file name (deploy.yml).

OptionDescription
-R, --repo OWNER/NAMERepository (default: inferred from the git origin remote)
-r, --ref REFBranch or tag to run on (default: the default branch)
-f, --field KEY=VALUEInput value Repeatable.
--jsonPrint raw JSON

githome workflow validate

Check workflow files for errors.

githome workflow validate [files or directories...] [options]

Default: every .yml/.yaml file in .githome/workflows of the current repository, or in .github/workflows when .githome/workflows is absent. Uses the same parser as the server. Exits 1 when any file has errors.

OptionDescription
--jsonPrint raw JSON

githome api

Make an authenticated API request and print the response.

githome api <METHOD> <PATH> [options]

PATH is relative to /api/v3 (e.g. /user, /repos/OWNER/NAME/pulls) unless it starts with /api/. --input sends a JSON body from a file, or from stdin with '-'.

OptionDescription
-i, --input FILERequest body file, or '-' for stdin
-f, --field KEY=VALUEAdd a string field to the JSON body (or query for GET) Repeatable.

githome invite

Invite someone by email to an organization.

githome invite <email> [options]
OptionDescription
-o, --org ORGOrganization to join (a site invite is in the dash, and the core answers 403 without it)
-r, --role ROLEmember (default), admin or owner
--jsonPrint raw JSON

githome login

Sign in through your browser (or with a token).

githome login [options]

Opens your browser on the server's authorize page; approve the sign-in there and the CLI gets its own token, valid for 90 days and listed under Settings → Access tokens.

On a machine without a browser (over SSH, in a container), --device prints a short code to enter at <server>/login/device from any browser; the CLI picks this by itself when it sees no display. For scripts and CI, pass a token with --token, or pipe one in with --with-token (piping into a plain githome login still works). The config file is written with mode 0600.

OptionDescription
--url URLServer URL (default: GITHOME_URL, the saved URL, or https://git.pkgforge.dev)
--scope SCOPEAccess to ask for: read, write (default) or admin. You can change it on the authorize page
--webSign in through the browser on this computer (the default in a terminal)
--deviceSign in with a code you enter in a browser on any device
--token TOKENUse this token (ghome_...) instead of signing in through the browser
--with-tokenRead a token from stdin

githome logout

Sign out: forget the saved token, and revoke it if a browser sign-in created it.

githome logout

githome mcp-config

Print an MCP server config snippet for Claude Code and other MCP clients.

githome mcp-config [options]

By default the token is written as ${GITHOME_TOKEN} (expanded by clients such as Claude Code from the environment). Pass --show-token to embed the saved token instead.

OptionDescription
--show-tokenEmbed the actual token in the snippet

githome runner

Run self-hosted workflow jobs on this machine.

githome runner [options]

Polls the given repositories for jobs with 'runs-on: [self-hosted, ...]' whose labels this runner offers, and runs each with the Githome runner agent. Jobs run directly on this machine with your user's permissions.

The runner registers with each repository and claims jobs with its own token, which can't do anything else. Register it with a registration token from a repository admin (POST /repos/OWNER/NAME/actions/runners/registration-token, valid for an hour):

githome runner -R OWNER/NAME --registration-token ghomerg_... --labels linux

so the machine never holds a personal token, which the jobs it runs could read. The runner's credentials are saved under ~/.config/githome/runners and used on the next start. Signed in as a repository admin instead, the runner registers itself with your token.

--ephemeral registers a runner for one job: its token stops working once it takes the job, and the runner exits when the job finishes.

The runner needs the Githome runner agent (a single Node.js file). Build it from the Githome repository with:

pnpm --filter @githome/runner build # produces containers/runner/dist/agent.mjs

then pass --agent /path/to/agent.mjs or set GITHOME_RUNNER_AGENT.

OptionDescription
-R, --repo OWNER/NAMERepository to take jobs from (default: the git origin) Repeatable.
-l, --labels a,bExtra labels this runner offers, comma separated ('self-hosted' is implied)
-n, --name NAMERunner name (default: host name)
--onceRun at most one job, then exit with its exit code
-a, --agent PATHPath to the runner agent (agent.mjs); default GITHOME_RUNNER_AGENT
-w, --work-dir DIRWorking directory for jobs (default ~/.cache/githome/runner/<name>)
--interval SECONDSSeconds between polls when idle (default 5)
-q, --quietDo not echo step output locally (logs still go to the server)
--registration-token TOKENRegister this runner with a repository admin's registration token (one repository)
--ephemeralRegister for a single job, then exit when it finishes

githome setup

Set up this computer in one go: sign in, then git and gh.

githome setup [options]

Signs in through your browser (or with a code, on a machine without one) unless the CLI is signed in already, then runs githome auth setup-git so git clone, fetch and push use the sign-in, and githome auth setup-gh when the GitHub CLI (gh) is installed. Where Claude Code is installed, it also adds Claude Code's Githome plugins (githome and githome-ci): they're saved in ~/.claude/githome-plugins and named in ~/.claude/settings.json, so every new Claude Code session loads them, with their Githome URL setting pointed at this server. Skip that with --no-claude-plugins (or GITHOME_NO_CLAUDE_PLUGINS=1). For a server other than git.pkgforge.dev (--url, a self-hosted Githome), it also points Codex's githome MCP server there when Codex is installed (codex mcp add; skip with GITHOME_NO_CODEX=1). Last, on a terminal, it asks whether to turn on auto-merge for the pull requests you open (--auto-merge says yes without asking, --no-auto-merge skips the question). Safe to run again; it brings the plugins up to date.

With --repo OWNER/NAME it sets up an agent environment instead (a Claude Code cloud environment, Codex, a CI runner), with no browser and no prompt: git and gh use the token in GITHOME_TOKEN (and GH_ENTERPRISE_TOKEN with GH_HOST for gh) straight from the environment, so no token is written to disk; the repository is cloned unless it's there already; then a self-test prints one line per check, saying what to change when one fails, and reports the result to the repository's Agent setup page. Exits 1 when a check fails. This is what <server>/OWNER/NAME/agent-setup.sh runs.

OptionDescription
--url URLServer URL (default: GITHOME_URL, the saved URL, or https://git.pkgforge.dev)
--scope SCOPEAccess to ask for: read, write (default) or admin. You can change it on the authorize page
--webSign in through the browser on this computer (the default in a terminal)
--deviceSign in with a code you enter in a browser on any device
--repo OWNER/NAMESet up an agent environment for this repository instead, with the token in GITHOME_TOKEN (what <server>/OWNER/NAME/agent-setup.sh runs)
--no-cloneWith --repo: don't clone the repository (also GITHOME_NO_CLONE=1)
--clone-dir DIRWith --repo: where the clone goes (default: GITHOME_CLONE_DIR, /home/user in a Claude Code cloud environment, else the current directory)
--no-reportWith --repo: don't report the result to the repository's Agent setup page
--no-claude-pluginsDon't add Claude Code's Githome plugins (also GITHOME_NO_CLAUDE_PLUGINS=1)
--auto-mergeTurn on auto-merge for pull requests you open, without asking (it still waits for each branch's required checks and approvals)
--no-auto-mergeDon't ask about auto-merge

githome upgrade

Update the CLI to the server's latest build.

githome upgrade

Downloads <server>/-/cli/githome.mjs and replaces the file this CLI runs from, when it changed. The install script (curl -fsSL https://git.pkgforge.dev/install | bash) does the same and sets up PATH.

githome whoami

Show the account the current token acts as.

githome whoami [options]
OptionDescription
--jsonPrint raw JSON