Other Commands
A grab-bag of utility commands that don’t fit the main resource families.
Make authenticated requests to any Redmine REST API endpoint.
redmine api /users/current.json
redmine api /issues.json -f project_id=myproject -f limit=5# Method auto-detected when body fields are suppliedredmine api /issues.json \ -F 'issue={"subject":"Bug report","project_id":1}'# - reads from stdinredmine api /issues.json --input body.json# --jq runs against the response bodyredmine api /issues.json -f project_id=myproject --jq '.issues[].subject'redmine api /users/current.json --jq '.user.login'redmine api -X DELETE /issues/123.jsonredmine api -X PUT /issues/123.json -F 'issue={"status_id":5}' --silent| Flag | Description |
|---|---|
-X, --method |
HTTP method (default: GET, or POST when a body is provided) |
-f, --field |
Query parameter as key=value (repeatable) |
-F, --raw-field |
JSON body field as key=value (repeatable) |
--input |
Read request body from file (- for stdin) |
-i, --include |
Show response status line and headers |
--silent |
Suppress response output |
categories
Section titled “categories”redmine categories list --project <identifier>Lists issue categories for a project.
trackers
Section titled “trackers”redmine trackers listredmine trackers get BugLists all available trackers. The list view includes the default status for each tracker, and trackers get shows richer metadata such as enabled standard fields when the Redmine server exposes them.
statuses
Section titled “statuses”redmine statuses listLists all issue statuses.
custom-fields
Section titled “custom-fields”redmine custom-fields listredmine custom-fields get "Severity"redmine custom-fields get 7 --output jsonLists or inspects custom field definitions. The list view surfaces target resource type, field format, and the required/filter/searchable/multiple flags. custom-fields get adds the default value, length and regexp constraints, possible values for list fields, plus the trackers and roles a field is restricted to.
Shell completion
Section titled “Shell completion”redmine completion bash > /etc/bash_completion.d/redmineredmine completion zsh > "${fpath[1]}/_redmine"redmine completion fish > ~/.config/fish/completions/redmine.fishCompletion candidates such as tracker, version, category and member names come from the server. The bash script quotes them before bash sees them, so a name like $(cmd) is offered as text and never run; candidates containing line breaks are dropped and control characters are neutralized. Bash scripts generated by older versions passed candidates to bash unquoted: if you saved the output of redmine completion bash to a file, regenerate it after upgrading.
Completion honors the global flags already on the command line, so redmine --profile work issues list --project <TAB> (likewise --config, --server, --api-key-file) completes against that profile or server. With --api-key-file -, completions that need the server are skipped instead of reading the key from the terminal.
self-update
Section titled “self-update”redmine updateChecks GitHub for the latest release, downloads it, and replaces the current binary only after two checks pass:
- Checksum — the archive’s SHA256 must match the release’s checksums file.
- Attestation — the archive’s SHA256 must have a GitHub artifact attestation (SLSA build provenance, signed through Sigstore and recorded in its transparency log) issued by this repository’s
release.ymlworkflow for exactly the release tag being installed.
Besides the repository, the built-in check pins the signer workflow and the source ref, so it is stricter than gh attestation verify --repo aarondpn/redmine-cli alone. The equivalent gh command is below (Windows archives end in .zip). install.sh runs it when a recent gh is installed and logged in; otherwise the script installs after the checksum check only and prints the command so you can run it yourself (see Installation):
gh attestation verify redmine-cli-<os>-<arch>.tar.gz --repo aarondpn/redmine-cli \ --signer-workflow aarondpn/redmine-cli/.github/workflows/release.yml \ --source-ref refs/tags/<tag>The checksums come from the same place as the archive, so only the attestation proves the binary was built by the project’s release pipeline. The update is refused if the attestation is missing, invalid, or signed by any other identity. A release is attested a few minutes after it is published; if you update within the first 30 minutes and its attestation is not there yet, redmine update says so and asks you to try again shortly instead of reporting a failed verification.
When installed via Homebrew, delegates to brew upgrade.
| Flag | Description |
|---|---|
--skip-attestation |
Install with checksum verification only. Prints a warning. |
Verification needs to reach api.github.com (attestations API) and tuf-repo-cdn.sigstore.dev (Sigstore trusted root, cached for a day under your user cache directory). If either is unreachable, redmine update refuses to install and suggests --skip-attestation. Set GITHUB_TOKEN or GH_TOKEN to avoid GitHub API rate limits; it is only sent to api.github.com.
If the binary’s directory is not writable, the error suggests reinstalling with the install.sh from the same release tag rather than from main.
Startup update check
Section titled “Startup update check”On every invocation, redmine checks GitHub for a newer release in the background. When one is available, a notice is printed to stderr after the command output:
A new version of redmine is available: v1.2.0 → v1.3.0https://github.com/aarondpn/redmine-cli/releases/tag/v1.3.0Run "redmine update" to upgradeThe check starts in the background together with the command and gives up 2 seconds after startup. Its result is only printed after a command that succeeded; a failed command exits right away. If the check is still running when the command finishes, the CLI waits for it, at most until that 2-second deadline, and prints Checking for updates... to stderr once the wait exceeds 200 ms. A fresh cached result (see below) answers immediately, so the delay only happens when GitHub has to be asked: once a day after a successful check, but on every run while checks fail or time out (failures are not cached). It is automatically skipped when:
- the command is
redmine updateitself; - stderr is not a TTY (piped output, CI);
REDMINE_NO_UPDATE_CHECKis1ortrue.
The result is cached for 24 hours in ~/.redmine-cli-update-check.json (readable only by you). A cache entry whose release URL is not a release page under https://github.com/aarondpn/redmine-cli/releases/tag/ is ignored, so a tampered cache cannot inject a link into the notice.
To disable permanently:
export REDMINE_NO_UPDATE_CHECK=1