• Rust 80.8%
  • Fluent 16.7%
  • Just 1.2%
  • Dockerfile 0.7%
  • Nushell 0.4%
  • Other 0.2%
Find a file
nrupard 32312ee400
All checks were successful
Build binary (Linux) / Build and publish fj binary (Linux x86_64) (push) Successful in 43s
Build binary (Windows) / Build and publish fj binary (Windows x86_64) (push) Successful in 43s
Check / fmt + clippy + build + tests (push) Successful in 46s
Merge pull request 'docs(pr): note --agit is branchless in --help' (#52) from docs/agit-branchless-help-FJ-42 into main
Reviewed-on: #52
2026-06-12 16:45:56 +02:00
.forgejo/workflows fix(ci): generate release notes from commits since previous tag 2026-05-31 13:27:42 -04:00
.idea chore: expand .gitignore and track JetBrains project files (FJ-16) 2026-05-25 10:29:09 -04:00
crates docs(pr): note --agit is branchless in --help 2026-06-12 09:43:25 -04:00
oci-build chore(build): bump rust-builder-glibc to v1.0.1 2026-06-06 22:27:44 -04:00
.dockerignore chore: convert to a Cargo workspace (fj, fj-client, fj-core) (FJ-5) 2026-05-24 22:34:00 -04:00
.gitignore chore: Sync .gitignore 2026-06-06 13:21:34 -04:00
Cargo.lock Release v0.8.1 2026-06-08 06:13:04 -04:00
Cargo.toml chore: convert to a Cargo workspace (fj, fj-client, fj-core) (FJ-5) 2026-05-24 22:34:00 -04:00
CLAUDE.md chore(build): bump rust-builder-glibc to v1.0.1 2026-06-06 22:27:44 -04:00
flake.lock chore(nix): update flake 2025-12-30 11:31:24 +01:00
flake.nix chore(metadata): repoint package metadata at fork (FJ-17) 2026-05-25 11:24:43 -04:00
justfile chore(build): bump rust-builder-glibc to v1.0.1 2026-06-06 22:27:44 -04:00
LICENSE-APACHE add licensing 2023-11-17 18:04:02 -05:00
LICENSE-MIT add licensing 2023-11-17 18:04:02 -05:00
README.md docs(readme): document crate layout and parsing-vs-rendering boundary 2026-05-26 19:29:12 -04:00

fj, a CLI client for Forgejo

Note

This is a hard fork of forgejo-cli, created and maintained by the Forgejo CLI contributors. All credit for the original tool belongs to them, and this fork inherits their dual Apache-2.0 / MIT licensing (see Licensing below).

The fork exists for one reason: this copy is developed using AI-assisted code, which the Forgejo governance does not accept (per the Forgejo AI Agreement). To respect that policy, AI-assisted work happens here rather than being submitted upstream. The fork is operated in the spirit of the Forgejo Code of Conduct, and changes are not contributed back unless they can be reauthored to comply with the upstream AI Agreement.

If you want the canonical, AI-free tool, use the upstream project at https://codeberg.org/forgejo-contrib/forgejo-cli.


fj is a CLI client for Forgejo, akin to gh, glab, or tea!

You can...

  • Open, edit, comment on, close issues
  • Create and merge pull requests
    • Easily create AGit pull requests, no need to fork!
  • Create, star, watch, and edit repositories
  • Manage organizations and teams
  • Publish new releases

all from the command line! Check out the wiki for more details and explanations.

fj doesn't try to replace your usage of git, it's meant to work alongside it. It handles all the Forgejo-specific things that git doesn't.

Installation

Pre-built binaries are available for x86_64 Windows and x86_64 Linux (GNU) on the releases tab.

See the (forgejo-cli) wiki page on installation for more options.

Architecture

fj is a Cargo workspace (Cargo.toml) with three members. The split exists so the API and domain logic stay reusable by a future Forgejo MCP server without dragging in the terminal CLI.

  • crates/fj-client (library): the connection and credential layer. keys.json storage (KeyInfo / LoginInfo), forgejo_api::Forgejo client construction, OAuth client-id lookup, and host / SSH / URL resolution.
  • crates/fj-core (library): CLI-agnostic domain logic. Per-command operation modules that wrap forgejo-api calls and return its structs (issues, prs, repo, org, release, user, actions, tag, wiki), the issue-template parser, and shared types such as RepoName.
  • crates/fj (binary): everything CLI-specific. The clap command tree, crossterm terminal handling, fluent localization, interactive prompts, and all table / markdown output rendering.

Reuse contract

fj-client and fj-core are CLI-free and intended for reuse: the planned Forgejo MCP server depends on them. To keep them reusable, neither library may depend on clap, crossterm, or any fluent-* crate - the command tree, terminal handling, localization, and all rendering stay in the fj binary. Verify with:

cargo tree -p fj-client -p fj-core -e normal | grep -E 'clap|crossterm|fluent'

which must return nothing.

comrak (CommonMark) is the one intentional exception, and it is deliberately not part of that grep. It is allowed in fj-core because it powers the issue-template parser (crates/fj-core/src/template/yaml.rs), which reads and rewrites a markdown AST via comrak::parse_document and comrak::format_commonmark. That is parsing, which an MCP consumer needs, not rendering. Terminal / ANSI markdown rendering (the markdown() printer in crates/fj/src/main.rs) lives only in the fj binary.

Using the crates from another project

Pull the libraries in as a git dependency, pinned to a release tag:

[dependencies]
fj-core = { git = "https://dev.a8n.run/pandoras-box/forgejo-cli.git", tag = "v0.6.0" }
fj-client = { git = "https://dev.a8n.run/pandoras-box/forgejo-cli.git", tag = "v0.6.0" }

fj-core depends on fj-client, so depending on fj-core alone pulls the client layer in transitively. If the crates are published to the Forgejo Cargo package registry on dev.a8n.run, a downstream project can configure that as a sparse registry and depend on fj-core / fj-client by version instead of by git tag.

Licensing

This project is licensed under either Apache License Version 2.0 or MIT License at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.