Redmine CLI
A CLI for the Redmine REST API. Use redmine <command> --help for detailed flags and examples — this skill only covers what --help cannot tell you.
Available Commands
Only these top-level commands exist. Do NOT invent subcommands that aren't listed here — run redmine <command> --help to discover subcommands.
| Command | Purpose |
|---|---|
issues | Create, list, get, update, close, reopen, assign, comment, delete, open, browse issues; issues comment edit <journal-id> edits a comment (Redmine 5.0+; journal IDs come from issues get <id> --journals); manage watchers and relations (issues watchers …, issues relations list/get/add/remove). To search issues, use search issues |
attachments | Inspect attachment metadata (attachments get <id>), download files (attachments download <id>) or thumbnails (attachments thumbnail <id> --path <file>), and edit or remove them (attachments update <id> --filename/--description/--content-type, attachments delete <id>) using the active profile's auth |
queries | List Redmine saved queries; reuse them via issues list --query / --query-id |
projects | List, get, create, update, archive, unarchive, delete projects; list project members. --include on list/get exposes trackers, modules, categories, custom fields, and time-entry activities (Redmine 5.0+ for archive). |
time | Log, list, get, update, delete, summarize time entries |
versions | Create, list, get, update, delete project versions (milestones) |
files | List and upload project-level files (release artifacts) |
memberships | List, get, create, update, delete project memberships |
users | List, get, create, update, delete users |
my-account | Get and update your own Redmine account (works without admin) |
groups | List, get, create, update, delete groups; add/remove users |
roles | List and get roles, including their permissions |
categories | List, get, create, update, delete issue categories (--assignee sets the default assignee, none clears it; delete --reassign-to <category> moves the issues to another category of the same project) |
news | List, get, create, update, delete project news (list without --project spans all projects; get --include attachments,comments; create looks the new ID up afterwards; news comments are read-only) |
trackers | List and get trackers |
statuses | List issue statuses |
priorities | List issue priorities and their IDs (for --priority) |
activities | List time entry activities; --project <p> shows the ones available in that project incl. overrides with their own IDs |
document-categories | List document categories |
custom-fields | List and get custom field definitions (admin-only endpoint) |
search | Search issues, wiki, news, messages, or browse results |
auth | Login, logout, list, switch, and check status of authentication profiles |
wiki | List, get, create, update, delete wiki pages |
api | Make raw authenticated API requests |
config | Show the active configuration (server, profile, default project) |
update | Update the CLI to the latest release |
Setup
If the redmine command is not found, install it:
bashcurl -fsSL https://raw.githubusercontent.com/aarondpn/redmine-cli/main/install.sh | bash
Then run redmine auth login for interactive configuration, or without a terminal: echo "$KEY" | redmine auth login --server <url> --api-key-file -. Use redmine config to verify an existing setup.
Critical Rules
- Use
--jq(-q) to extract fields — e.g.redmine issues get 123 --jq '.status.name'. It is built in (no externaljqneeded) and implies-o json. Never parse output with Python, awk, or regex. If the flag is unknown, the CLI is outdated — ask the user to runredmine update. - Errors go to stderr with a non-zero exit code; on failure stdout is empty. Check the exit code — never merge stderr into stdout (
2>&1) or discard it (2>/dev/null). Error codejq_failedmeans the command itself succeeded and only the filter failed — don't re-run writes (exceptapi -ion a 4xx/5xx response, where the request failed). - Use
--limit 0to fetch ALL results. The default limit is 100. - Inspect attachments: when reading an issue, add
--attachmentsand look at any it has before answering (see below). - All name-accepting flags (--project, --tracker, --status, --priority, --assignee, --category, --version, --activity, --custom-field) resolve human-readable names automatically. Don't look up IDs or option lists first — only when a name fails to resolve, check the valid values (e.g.
redmine projects get <project> --include trackers,issue_categories) and ask the user if it's still unclear. Custom field names need admin rights; otherwise use the numeric ID from the resource'scustom_fieldsin JSON output. --assignee merefers to the current API user.--status "*"shows all issues regardless of status (default isopen).
When Something Doesn't Work: Stop and Use --help
Do NOT guess, loop, or retry with invented flags/subcommands. If a command fails or you're unsure about the correct syntax:
- Run
redmine <command> --help(orredmine <command> <subcommand> --help) to see the actual available options, flags, and subcommands. - Read the help output carefully — it is authoritative and always up to date. Trust it over your own assumptions.
- Never invent flags or subcommands that aren't shown in
--help. If you think an option should exist but it doesn't appear in the help, it doesn't exist. - Do not loop — if the same command fails twice, stop and re-read the help output. Do not keep retrying with slight variations hoping one will work.
- Ask the user if the help output doesn't clarify things — that's better than spiraling through failed attempts.
Permission Errors
- Never retry with other credentials (other profiles, API keys from env vars, CI settings, or config files). Permissions come from the user's Redmine role — stop and ask the user.
- User and group names resolve through the project's members, so they work without admin.
After Creating Resources
When you create an issue, project, user, or other resource, the CLI returns the new ID. Offer the user a clickable URL so they can open it in the browser:
- Issues:
redmine issues open <id>opens the issue directly. You can also provide the URL:<server>/issues/<id> - Projects:
<server>/projects/<identifier> - Users:
<server>/users/<id> - Time entries:
<server>/time_entries/<id>/edit
Get the server URL with redmine config --jq .server. Always mention the URL or the open command after a successful create so the user can quickly navigate to the new resource.
Attachments: Always Download and Inspect Them
Issues often carry attachments (screenshots, diagrams, logs, PDFs) that contain information not present in the text. Whenever an issue has attachments, download them and inspect their contents before answering - especially images, which frequently hold the actual error, mockup, or detail the ticket is about.
- Discover attachment IDs:
redmine issues get <id> --attachmentslists each attachment'sid,filename,filesize, andcontent_type(JSON:.attachments[]). Without--attachmentsthe issue output doesn't show them. - Download one file:
redmine attachments download <att-id> -d <dir>saves it under its real filename (or--path <file>for an exact path,--path -to stream to stdout). Nocurl, no manual API-key handling - it reuses the active profile's auth. - Download everything at once:
redmine issues get <id> --download-attachments <dir>pulls every attachment of the issue into<dir>in one step. Same-named attachments are kept side by side: the newest keeps the plain name, older ones becomename (attachment-<id>).ext; read the reported paths. Neither command overwrites an existing file: it fails with "already exists". Add--clobberto replace it. A filename starting with.(e.g..bashrc) is refused with "refusing to save the hidden filename"; pass--allow-hiddenonly if you really want that dotfile in<dir>, or download that one attachment with--path <file>under a name you choose. - Inspect metadata only (no download):
redmine attachments get <att-id>.
After downloading an image, open/read it and use what it shows.
Non-Obvious Behaviors
--custom-field name=valueworks onissues create/update,projects create/update,time log/update,versions create/update,users create/update,my-account updateandgroups create/update. For multi-value fields repeat the same field (--custom-field Tags=a --custom-field Tags=b);--custom-field Tags=clears it. Values keep spaces and=: quote each pair and repeat the flag per field.- If
time logfails withvalidation_failed, the server may require time entry custom fields or an activity: pass them with--custom-field/--activity. redmine issues get <id> --journalsincludes comments/history.redmine issues get <id> --include allowed_statuses -o jsonlists the statuses the current user may transition to.redmine issues updateonly sends flags you explicitly pass — omitted flags are not changed.- If
--projectis omitted, the configured default project is used (set viaredmine auth login). - Projects can accumulate hundreds of versions, most of them closed or locked. When you need a version for a new issue, time entry, or similar workflow, always start from
redmine versions list --openso the shortlist stays small and you don't pick a version that can no longer accept work. - Any date flag (
--due-date,--date,--from,--to) accepts the literal keywordtodayas a shortcut for the current date.


