Forgejo CLI tool — interact with Forgejo from Claude Code via bash
Find a file
Victor Gabriel Savu 5a1043c16e docs: update README with installation, linting, and publishing instructions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 08:20:16 +02:00
src Initial commit: Forgejo CLI tool using forgejo-api crate 2026-05-15 20:02:26 +02:00
Cargo.lock Release 1.0.0: add README, bump version 2026-05-16 07:39:58 +02:00
Cargo.toml Release 1.0.0: add README, bump version 2026-05-16 07:39:58 +02:00
README.md docs: update README with installation, linting, and publishing instructions 2026-05-16 08:20:16 +02:00

forgejo_claude

A CLI tool for interacting with a Forgejo instance. Built in Rust using the forgejo-api crate.

Installation

The crate is published to the Forgejo package registry at https://forgejo.victorsavu.eu/api/packages/victor/cargo/.

To install, add the registry to ~/.cargo/config.toml:

[registries.forgejo]
index = "sparse+https://forgejo.victorsavu.eu/api/packages/victor/cargo/"

Then install with:

cargo install forgejo_claude --registry forgejo

Configuration

Run the login command once to save your credentials. It only prompts for values that are not already set:

forgejo_claude login

Credentials are stored in ~/.config/forgejo_claude/config.toml:

forgejo_url = "https://your.forgejo.instance"
forgejo_token = "your_api_token"
owner = "your_username"

Generate an API token at https://your.forgejo.instance/user/settings/applications. The token needs the write:issue and write:repository scopes.

Usage

Issues

# List issues (state: open / closed / all, default: open)
forgejo_claude list-issues <repo> [state]

# Create an issue
forgejo_claude create-issue <repo> <title> <body>

# Edit an issue (all flags optional)
forgejo_claude edit-issue <repo> <number> [--title <title>] [--body <body>] [--state open|closed]

# Add a comment
forgejo_claude add-comment <repo> <number> <body>

Repositories

# Create a repository under the configured owner
forgejo_claude create-repo <name> <description> [--private]

Development

Building

cargo build --release
# binary at: target/release/forgejo_claude

Linting

Always run Clippy before committing:

cargo clippy

Publishing

The crate is published to the Forgejo registry:

cargo publish --registry forgejo