gitfox-client
A Rust client for the GitFox API.
This crate knows about HTTP and about GitFox. It knows nothing about terminals,
tables, exit codes or configuration files — that separation is what lets
fx, and later an MCP server, share one
implementation instead of shelling out to a binary.
use GitFoxClient;
# async
What it handles for you
- Base URL normalisation —
git.example.com,https://git.example.comandhttps://example.com/gitfoxall work, and repository references travel as one percent-encoded path segment. - Typed errors — authentication, not-found, rate limiting, timeouts and transport failures are distinguishable without inspecting status codes.
- Retries — transient failures back off exponentially, but only for methods
that are safe to repeat.
POSTandPATCHare never retried: repeating aPOST /pullreqthat already reached the server opens a second pull request. - Redirects — followed for
GETandHEADonly. Following one can resend a write as aGETwith no body (aPOSTon 301/302, any write on 303), which answers 200 while changing nothing, so a redirected write is anError::Apinaming the new location. - Redaction — the token is not in
Debugoutput, and theAuthorizationheader is marked sensitive.
Domain models are the crate's own rather than the raw API DTOs, so an upstream rename is absorbed by a serde attribute here instead of reaching callers.
Endpoints were verified against a live instance's own /openapi.yaml
(GitFox API v1.3.0), which every instance serves unauthenticated.
Status
Pre-1.0: the API may still change. See the repository for the roadmap.
License
MIT