The canonical API reference for this project is the fmsg-webapi README:
Before implementing or modifying any CLI command that interacts with the API, read that document to understand the exact routes, request/response shapes, query parameters, status codes, and authorization requirements.
This is fmsg-cli, a Go CLI client for the fmsg HTTP API. It is built with Cobra and organized as follows:
cmd/— one file per CLI command, each wiring Cobra flags to API calls viainternal/apiinternal/api/client.go— HTTP client wrapping all API routesinternal/auth/— JWT token storage and retrievalinternal/config/— configuration loading
- All API routes require
Authorization: Bearer <token>; the token is loaded viainternal/auth - API base URL is read from config (
internal/config) - Follow existing patterns in
cmd/when adding new commands - Go module path: see
go.mod
- Keep
README.mdconcise and up to date. - When CLI arguments, flags, or command behavior change, update
README.mdusage, command table, and relevant examples in the same change.