A minimal, gh-style CLI for Codeberg.
cb auth login # Login via OAuth
cb repo create my-project --public --clone
cb repo list --limit 10
cb health
cb updatecurl -fsSL https://raw.githubusercontent.com/rishabyd/codeberg-cli/main/install.sh | shUpdate: cb update
Uninstall: cb uninstall
Supported platforms: Linux amd64, Linux arm64.
# Login (opens browser)
cb auth login
# Create a public repo and clone it
cb repo create my-project --public --clone
cd my-project
# List your repos
cb repo list
# Check Codeberg status
cb healthcb auth login # Login via OAuth (opens browser)
cb auth status # Show auth status
cb auth logout # Clear session and credentialsAliases: cb repository
cb repo list [flags] # List your repositories (alias: ls)
cb repo create <name> [flags] # Create a repository
cb repo migrate <owner/repo> [flags] # Migrate from GitHubCheck for and install the latest release.
cb updateCheck Codeberg.org and CI/CD service status.
cb healthRemove the cb binary, local config, and git credential helper.
cb uninstall| Flag | Description |
|---|---|
-v, --version |
Show version |
--verbose |
Enable debug output |
| Flag | Default | Description |
|---|---|---|
--limit |
30 |
Number of repositories |
| Flag | Short | Description |
|---|---|---|
--description |
-d |
Repository description |
--public |
— | Public repository (default if neither specified) |
--private |
— | Private repository |
--add-readme |
— | Initialize with README |
--clone |
-c |
Clone after creating |
| Flag | Description |
|---|---|
--clone |
Clone after migrating |
cb repo create my-project --public --clone
cd my-project
echo "# My Project" > README.md
git add README.md
git commit -m "init"
git push -u origin maincb repo migrate owner/repo --clone
cd repo
git remote -vcb repo list --limit 5DNS failure
lookup codeberg.org ... server misbehaving
Local network resolver issue. Check your DNS settings.
Auth expired
Session expired. Run `cb auth login`
Run cb auth login to re-authenticate.
Debug any command
cb auth status --verbose
cb repo list --verboseVerify git credential helper
git config --global --get credential.https://codeberg.org.helper| Code | Meaning |
|---|---|
0 |
Success |
1 |
Runtime / auth / network / API error |
2 |
Usage or argument error |
Requires Go 1.26+.
git clone https://github.com/rishabyd/codeberg-cli.git
cd codeberg-cli
# Format, lint, test
go tool gofumpt -w . && go vet ./... && go test ./...
# Build
go build -o cb ./cmd/cb
./cb --help- Fork and clone
- Format and test:
go tool gofumpt -w . && go vet ./... && go test ./... - Build:
go build -o cb ./cmd/cb - Commit and push
- Open a pull request
MIT — see LICENSE.