Skip to main content

cb — A Codeberg CLI

PyPI - Python Version PyPI PyPI - License

cb is a CLI for Codeberg (a Forgejo instance) — think gh for Codeberg. It also works with any Forgejo instance. Built with Xclif.

# One-time setup
cb auth login

# Work with repos, issues, PRs, releases
cb repo list
cb issue create --title "Fix the thing"
cb pr create --base main --head fix
cb release create v0.2.0

Install

pip install codeberg-cli  # or: uv tool install codeberg-cli

Or from source:

git clone https://codeberg.org/ThatXliner/codeberg-cli.git
cd cb
uv tool install .

Quickstart

# Authenticate (tokens at https://codeberg.org/user/settings/applications)
cb auth login

# Who am I?
cb auth whoami

# List your repos
cb repo list

# Clone one
cb repo clone ThatXliner/cb

# Open an issue
cb issue create --title "suggestion" --body "what about..."

# See everything you can do
cb --help

Config

Token stored in $XDG_CONFIG_HOME/codeberg-cli/config.toml (managed by cb auth login / cb auth logout).

View or change config:

cb config path  # Show config file location
cb config get   # Print all config values
cb config set base_url "https://codeberg.org/api/v1"     # Codeberg (default)
cb config set base_url "https://git.example.com/api/v1"  # Self-hosted Forgejo

Comparison

Here's how cb stacks up against other Forgejo CLI tools. Last updated: June 2026.

TL;DR: cb is the most feature-complete Forgejo CLI — by a wide margin.

cb (this) fj (forgejo-cli) berg (codeberg-cli) tea (gitea/tea) gcli
Language Python Rust Rust Go C
Install pip install codeberg-cli prebuilt binaries/Cargo cargo install codeberg-cli brew install tea brew install gcli
Multi-instance cb config set base_url -H <instance> BERG_BASE_URL tea login add -t forgejo

Issues

cb fj berg tea gcli
Create ✅ ✅ ✅ ✅ ✅
List ✅ ✅ ✅ ✅ ✅
View ✅ ✅ ✅ ✅ ✅
Close ✅ ✅ ✅ ✅ ✅
Reopen ✅ — ✅ ✅ ✅
Comment ✅ ✅ ✅ ✅ ✅
Edit ✅ ✅ ✅ ✅ ✅
Delete ✅ — — — —
Pin/Unpin ✅ — — ✅ —
Search ✅ ✅ — ✅ —
Attachments ✅ — — ✅ —
Labels (manage on issue) ✅ — — ✅ ✅
Reactions ✅ — — — —
Subscriptions ✅ — — ✅ —
Tracked times ✅ — — ✅ ✅
Dependencies ✅ — — — —
Deadline — — — ✅ —
Templates — ✅ — — —

Pull Requests

cb fj berg tea gcli
Create ✅ ✅ ✅ ✅ ✅
List ✅ ✅ ✅ ✅ ✅
View ✅ ✅ ✅ ✅ ✅
Merge ✅ ✅ ✅ ✅ ✅
Close ✅ ✅ ✅ ✅ ✅
Reopen ✅ — ✅ ✅ ✅
Comment ✅ ✅ ✅ ✅ ✅
Edit ✅ ✅ ✅ ✅ —
Checkout ✅ ✅ ✅ ✅ ✅
Commits ✅ ✅ — — ✅
Files/changed ✅ ✅ — — —
Reviews ✅ ✅ — ✅ ✅
Diff/Patch ✅ ✅ — — ✅
Update branch ✅ — — — —
AGit (no-fork) — ✅ — — —
CI status ✅ ✅ — — —
Templates — ✅ — — —
Auto-merge — — — ✅ —

Releases

cb fj berg tea gcli
Create ✅ ✅ ✅ ✅ ✅
List ✅ ✅ ✅ ✅ ✅
View ✅ ✅ ✅ ✅ —
Upload assets ✅ — ✅ — ✅
Delete ✅ — — ✅ ✅
Edit ✅ — — ✅ —
Latest ✅ — — ✅ —
By tag ✅ — — ✅ —

Repositories

cb fj berg tea gcli
Create ✅ ✅ ✅ ✅ ✅
List ✅ ✅ ✅ ✅ ✅
View ✅ ✅ ✅ ✅ ✅
Clone ✅ ✅ ✅ ✅ —
Fork ✅ ✅ ✅ ✅ ✅
Delete ✅ — ✅ ✅ —
Star ✅ ✅ ✅ ✅ —
Unstar ✅ ✅ ✅ ✅ —
Watch/Unwatch ✅ — — ✅ —
Edit ✅ ✅ — ✅ —
Migrate/Mirror ✅ ✅ — ✅ —
Branches ✅ — — ✅ —
Topics ✅ — — ✅ —
Languages ✅ — — — —
Hooks ✅ — — ✅ —
Archive ✅ — — ✅ —
Commits ✅ — — — —
Contents ✅ — — ✅ —
Collaborators ✅ — — ✅ —
Transfer ✅ — — ✅ —
Wikis ✅ — — ✅ —
Push mirrors ✅ — — ✅ —
Search ✅ — — ✅ —

Labels

cb fj berg tea gcli
Create ✅ — ✅ ✅ ✅
List ✅ — ✅ ✅ ✅
Delete ✅ — ✅ ✅ —
Edit ✅ — — ✅ —

Milestones

cb fj berg tea gcli
Create ✅ — ✅ ✅ —
List ✅ — ✅ ✅ ✅
View ✅ — — ✅ —
Delete ✅ — — ✅ —
Edit ✅ — — ✅ —

Notifications

cb fj berg tea gcli
List ✅ — ✅ ✅ ✅
Mark read ✅ — — ✅ —
Thread details ✅ — — — —
Per-repo ✅ — — ✅ —

Extra

cb fj berg tea gcli
Raw API ✅ — ✅ — ✅
User profiles ✅ ✅ — — —
SSH keys ✅ ✅ — ✅ ✅
GPG keys ✅ ✅ — — —
Org/team mgmt ✅ ✅ — ✅ —
Forgejo Actions ✅ ✅ — — —
Shell completions ✅ (auto via xclif) ✅ ✅ ✅ —
JSON output ✅ (via --json) — ✅ ✅ —
Non-interactive auto (no prompts) — ✅ ✅ —
Config management ✅ — ✅ — —
Web browser flag on view commands — — ✅ —

Built in Python with Xclif for a clean, hackable codebase. If something's missing, open an issue!

License

MIT

Metadata

Release files for codeberg-cli 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codeberg-cli 0.5.0
File Size Uploaded
codeberg_cli-0.5.0.tar.gz 50.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codeberg-cli 0.5.0
File Interpreter ABI Platform
codeberg_cli-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 157.4 kB

Release files / codeberg_cli-0.5.0.tar.gz

Download URL codeberg_cli-0.5.0.tar.gz
Size 50.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e4f2e5f5e28d2ba02b875d683e6da8878b622a9cf988d5fe78241e9300a3ae92
BLAKE2b-256 checksum
How to use checksums
b3e01c4897e710d4dbabe096e797b21f7d1e4abb8b43b065a9cfa86f3beb79d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / codeberg_cli-0.5.0-py3-none-any.whl

Download URL codeberg_cli-0.5.0-py3-none-any.whl
Size 107.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ecf32b7480003532ad12da0957aa139e82dbc389cd825ab22cb2cdcd64ab968
BLAKE2b-256 checksum
How to use checksums
1ce4d428e0c7f1a6458948e3e710f425e6e9b9bfc141993308db8ee3b5e63399
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page