Skip to Content
We are live but in Staging 🎉
CLI GuideOverview

CLI Guide

Git is part of the dodil CLI. Every command is invoked as:

dodil git <group> <subcommand> [args] [flags]

The CLI drives the REST control plane — repos, branches, PRs, checks, diffs. Cloning and pushing stay with plain git against the wire URLs the CLI prints (Clone & Push).

Install and authenticate

Install and authenticate the dodil CLI — see Install the CLI . Run dodil auth login once; git commands then reuse the shared config (~/.config/dodil/config.yaml) for the token and org. Verify with:

dodil git health # git gateway reachable at https://git.dodil.io (3 repos)

Git-specific notes:

  • Endpoint — resolved in order: DODIL_GIT_ENDPOINT env var → --api-endpoint → the git.api_endpoint config key → derived from the shared gateway endpoint (api.<domain>https://git.<domain>).
  • Token--token accepts either a bearer JWT or a dk_ API key; the CLI sends a JWT as Bearer and a dk_ key as the Basic password automatically. Without the flag it falls back to the shared config’s token from dodil auth login.
  • Org — repo names are resolved to repo ids through your org slug: --org-name (or the shared config’s org_name).

Repo arguments

Every <repo> argument accepts three forms, resolved automatically:

  • a repo_id UUID — used as-is;
  • a name — resolved in your configured org;
  • an org/name address — resolved in that org.

Command map

GroupSubcommandsWhat it does
repolist, get <repo>, create <name>, delete <repo>Repository lifecycle
branchlist <repo>Branch listing
prlist, get, create, merge, close, approve, reviewPull requests
checklist <repo> <sha>CI checks for a commit
diff<repo> <from> <to>Compare two revisions
clone-url<repo>Print smart-HTTP + SSH clone URLs
healthGateway reachability probe

Detailed pages:

Global flags

FlagMeaningExample
-o, --outputOutput format: table (default) or json-o json
--api-endpointGit API base URL--api-endpoint http://localhost:8090
--tokenAuth token override (JWT or dk_ key)--token "$DODIL_TOKEN"
--orgOrganization id--org 0198…
--org-nameOrganization slug (name → repo_id resolution)--org-name acme
--configAlternate config file--config ./dodil.yaml
--debugEnable debug output--debug

Use -o json for automation; get and diff always print JSON.

See also