




















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
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 .
# 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
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
| cb | fj (forgejo-cli) | berg (codeberg-cli) | |
|---|---|---|---|
| Language | Python | Rust | Rust |
| Multi-instance | Yes (configurable via cb config set base_url) |
Any Forgejo instance | Yes |
| Issues | create, list, view, close, reopen, comment, edit | open, edit, comment, close | yes |
| Pull requests | create, list, view, merge, checkout, close, comment, edit | create, merge | yes |
| Releases | create, list, view, upload | publish | — |
| Repos | create, list, clone, view, fork, delete, star, unstar | create, edit, star, watch | yes |
| Labels | create, list, delete | — | yes |
| Milestones | create, list | — | yes |
| Notifications | list | — | yes |
| User profiles | view | search, keys | — |
| Raw API | cb api GET /path |
— | — |
| Config management | cb config get/set/path |
— | berg config |
| AGit PRs (no-fork) | — | yes | — |
| Org/team mgmt | — | yes | — |
| Install | pip install codeberg-cli |
prebuilt binaries | cargo install codeberg-cli |
Choose fj if you self-host Forgejo or need org/team management or Actions workflows. Choose berg if you want your tools to be written in Rust. Choose cb if you want a minimal, readable Python CLI — it's the only one that uploads release assets, the only one with a raw API command, and the most fully-featured for everyday issue/PR/repo workflows. We will be actively working on making ours the most feature complete, just open an issue!
MIT
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。