Zed extension for displaying Git status from Forgejo instances
- Rust 100%
Features: - /forgejo owner/repo - Show repository status (PRs, issues, commits) - /forgejo-setup - Configure Forgejo URL, token, and default owner - Supports .forgejo.json config file or environment variables - Auto-completion for slash commands Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| extension.toml | ||
| LICENSE | ||
| README.md | ||
Forgejo Git Status for Zed
A Zed extension that displays Git repository status from self-hosted Forgejo instances.
Features
- View open Pull Requests
- View open Issues with labels
- See recent commits
- Repository statistics (stars, forks, open issues)
- Configurable Forgejo URL for self-hosted instances
- Optional API token for private repositories
Installation
As Dev Extension
- Open Zed
- Go to Extensions (Cmd+Shift+X)
- Click "Install Dev Extension"
- Select the
zed-forgejo-statusdirectory
Configuration
Option 1: Project Config File
Create .forgejo.json in your project root:
{
"forgejo_url": "https://your-forgejo-instance.com",
"api_token": "your-api-token-here",
"default_owner": "your-username"
}
Option 2: Environment Variables
Set these in your shell config (~/.zshrc or ~/.bashrc):
export FORGEJO_URL="https://your-forgejo-instance.com"
export FORGEJO_TOKEN="your-api-token-here"
export FORGEJO_OWNER="your-username"
Settings
| Setting | Required | Description |
|---|---|---|
forgejo_url |
Yes | Base URL of your Forgejo instance |
api_token |
No | API token for accessing private repos |
default_owner |
No | Default owner/org for shorthand repo names |
Getting an API Token
- Go to your Forgejo instance
- Navigate to Settings -> Applications
- Click "Generate New Token"
- Give it a descriptive name
- Copy the token
Usage
Use the /forgejo slash command in the Zed Assistant:
/forgejo owner/repo
Or with a default owner configured:
/forgejo repo-name
Examples
/forgejo fampla/backend
/forgejo fampla/mobile_app
/forgejo my-project
Output
The command displays:
- Repository name and description
- Default branch, stars, forks, and open issues count
- Link to view on Forgejo
- List of open Pull Requests with authors
- List of open Issues with labels and authors
- Recent commits with short SHA and messages
Development
Prerequisites
- Rust installed via rustup
- wasm32-wasip1 target:
rustup target add wasm32-wasip1
Building
cd zed-forgejo-status
cargo build --target wasm32-wasip1 --release
License
MIT License - see LICENSE