A Forgejo CLI — works with Codeberg and any Forgejo instance
Project description
cb — A Codeberg CLI
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
| 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!
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codeberg_cli-0.2.0.tar.gz.
File metadata
- Download URL: codeberg_cli-0.2.0.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
908300366958c015c4a5b2e99b9bb4c78d7cbcce876591bd0add77828fbd3486
|
|
| MD5 |
8477e0ff33def2d12f800e5d6181a64a
|
|
| BLAKE2b-256 |
f15741f2b751b18c924a374b60abeeb3c71eece6964f41b263d4e6c0ebb2e6da
|
File details
Details for the file codeberg_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: codeberg_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 37.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f90f4d9c18d64dddbe44f0525ea19aa1ccbcb47b6a0aa221b1081c9d4d958b5
|
|
| MD5 |
c5d7e05e6ba38b405ca060ba5b6c9faa
|
|
| BLAKE2b-256 |
27096287c67aa6933992a3d4488d4eabc393b09c88a7b0c714ad75a87f01928b
|