Skip to main content

A Forgejo CLI — works with Codeberg and any Forgejo instance

Project description

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: May 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codeberg_cli-0.4.2.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codeberg_cli-0.4.2-py3-none-any.whl (82.3 kB view details)

Uploaded Python 3

File details

Details for the file codeberg_cli-0.4.2.tar.gz.

File metadata

  • Download URL: codeberg_cli-0.4.2.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for codeberg_cli-0.4.2.tar.gz
Algorithm Hash digest
SHA256 55a9c9db58495dd2adf74930f0199c7a30cfff89a538e1fa503a273e1121b0a6
MD5 3480679dff495fb1ddff2c38a04a063d
BLAKE2b-256 87c2876218a75a7a1b4043b4385de263d6908110a3025eb07c034f9626445f2b

See more details on using hashes here.

File details

Details for the file codeberg_cli-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: codeberg_cli-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 82.3 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for codeberg_cli-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 205cc9d2a0896d8df45aba84cbfa1864c8106d9839c6e1f7b939477342192f12
MD5 69e6113eefe33e86af135fded2831462
BLAKE2b-256 875adc4bc7d649ec1a4f8ff17df9f60a0d262ba3a9b9f04f9a33080b5698ddc9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page