CLI
The codebahn CLI manages your repositories, pull requests, issues, and CI from the terminal. One binary, OAuth login, auto-updates.
Source: github.com/codebahn/codebahn-cli
Install
Section titled “Install”curl -fsSL https://releases.codebahn.net/cli/install.sh | shThis detects your platform, downloads the latest binary, verifies its SHA256 checksum, and installs to ~/.local/bin. Override the location with INSTALL_DIR:
curl -fsSL https://releases.codebahn.net/cli/install.sh | INSTALL_DIR=/usr/local/bin shOr install from source (source builds skip auto-update):
go install github.com/codebahn/codebahn-cli/cmd/codebahn@latestBuilds are available for Linux and macOS on amd64 and arm64.
Updates
Section titled “Updates”The CLI checks for new versions once every 24 hours and prints a notice when one is available.
codebahn updateThis downloads the new binary from releases.codebahn.net, verifies its GPG signature and SHA256 checksum, and replaces itself.
To check without installing: codebahn update --check. To silence the periodic check: set CODEBAHN_NO_UPDATE_CHECK=1.
Authenticate
Section titled “Authenticate”codebahn auth loginThis opens your browser for OAuth authorization. After you approve, the CLI saves your tokens to ~/.config/codebahn/config.json (it honors XDG_CONFIG_HOME). Tokens refresh automatically. Check the connection with codebahn auth status.
For CI or other headless environments, pass --token or set CODEBAHN_TOKEN. Create a token under Settings > Applications in your Codebahn account.
Commands
Section titled “Commands”When you run inside a Git repo, --owner and --repo are detected from the remote. Add --json for machine-readable output and --no-color to turn off colored output. Every subcommand accepts --help.
| Command | Description |
|---|---|
user info | Show current user info |
Repositories
Section titled “Repositories”| Command | Description |
|---|---|
repo list | List your repositories |
repo create | Create a repository |
repo cat | Read file content |
repo ls | List directory contents |
repo tree | Show the file tree |
repo log | List commits |
repo branches | List branches |
repo create-branch | Create a branch |
repo delete-branch | Delete a branch |
repo create-file | Create a file via commit |
repo update-file | Update a file via commit |
repo delete-file | Delete a file via commit |
repo mirror | Mirror a repo or org from GitHub/GitLab |
repo import | One-time import from GitHub/GitLab |
repo list-remote | Preview repos available via the GitHub App |
Pull requests
Section titled “Pull requests”| Command | Description |
|---|---|
pr list | List pull requests |
pr get | Show a pull request |
pr create | Open a pull request |
pr update | Update title, body, base, or assignees |
pr merge | Merge a pull request |
pr diff | Print the unified diff |
pr files | List changed files |
pr reviews | List reviews |
pr get-review | Show a specific review |
pr review-comments | List comments on a review |
pr create-review | Create a review with inline comments |
pr submit-review | Submit a pending review |
pr dismiss-review | Dismiss a review |
pr delete-review | Delete a pending review |
pr request-review | Request reviews from users or teams |
pr cancel-review | Cancel pending review requests |
Issues
Section titled “Issues”| Command | Description |
|---|---|
issue list | List issues |
issue get | Show an issue |
issue create | Open an issue |
issue update | Update title, body, assignees, or milestone |
issue state | Open or close an issue |
issue comment | Comment on an issue |
issue comments | List comments |
issue get-comment | Show a comment |
issue edit-comment | Edit a comment |
issue delete-comment | Delete a comment |
issue labels | List labels |
issue add-labels | Add labels to an issue |
issue remove-labels | Remove labels from an issue |
issue create-label | Create a label |
issue edit-label | Edit a label |
issue delete-label | Delete a label |
issue milestones | List milestones |
| Command | Description |
|---|---|
ci list | List workflow runs |
ci get | Show a workflow run |
ci logs | Print build logs (filterable by job) |
ci dispatch | Trigger a workflow |
ci cancel | Cancel a running build |
Search
Section titled “Search”| Command | Description |
|---|---|
search all | Search across code, repos, issues, and users |
search code | Search code (with language and filename filters) |
search repos | Search repositories |
Examples
Section titled “Examples”codebahn pr merge --index 42 --style squashcodebahn repo cat --ref main --filePath README.mdcodebahn ci logs --run_id 7 --job buildcodebahn repo mirror github.com/acme/backend --owner my-orgcodebahn repo import github.com/acme --owner my-org -ycodebahn repo list-remote github.com/acmeMigration
Section titled “Migration”The CLI can mirror or import repositories from GitHub and GitLab, including bulk operations on entire organizations.
List remote previews which repos are accessible via the Codebahn GitHub App before you import or mirror:
codebahn repo list-remote github.com/acmeUse --include and --exclude with glob patterns to filter. Add --json for machine-readable output.
Mirror creates a pull mirror that stays in sync with the source:
# Single repocodebahn repo mirror github.com/acme/backend
# Entire orgcodebahn repo mirror github.com/acme --owner my-org --source-token $GITHUB_TOKEN -yImport copies code, issues, PRs, labels, milestones, and releases as a one-time migration:
# Single repocodebahn repo import github.com/acme/backend
# Entire org, skip wikicodebahn repo import github.com/acme --owner my-org --source-token $GITHUB_TOKEN --no-wiki -yFor private repos and org-level operations, pass --source-token or set GITHUB_TOKEN. Use --include and --exclude with glob patterns to select repos from an org.
See also: Migrate from GitHub, Migrate from GitLab, Migrate from Forgejo, Mirror GitHub repos.
Next steps
Section titled “Next steps”- MCP server: connect AI assistants to your Codebahn repos.
- Set up CI: configure CI workflows.

