chore: rename shipped binary from youtrack-cli to yt #17

Merged
David merged 1 commit from chore/rename-binary-to-yt into main 2026-05-14 00:57:29 +02:00
Owner

Summary

Renames the shipped binary from youtrack-cli to yt, mirroring how Forgejo CLI ships as fj from a forgejo-cli package. The Cargo package name, the repo, and the Generic Package URL slug all stay as youtrack-cli; only the executable filename changes.

What's in scope

  • Binary + clap command name. Cargo.toml grows an explicit [[bin]] name = "yt". cargo build produces target/release/yt. yt --help shows Usage: yt ....
  • Error messages. Every run 'youtrack-cli auth login --base-url <url>' hint becomes run 'yt auth login --base-url <url>'.
  • Tracing default filter. With the binary crate renamed to yt, EnvFilter::new("yt=warn") (in main.rs) and RUST_LOG: yt=info (in compose.dev.yml) replace the stale youtrack_cli=... defaults. justfile's run-debug and the README example use yt=debug.
  • Dockerfile + CI artifact. Dockerfile copies target/release/yt into the export and runtime stages; ENTRYPOINT is /app/yt; the dep-prime cleanup drops target/release/deps/yt-* and target/release/yt. compose.yml copies /app/yt to /dist/yt. The CI workflow uploads yt-linux-x86_64 (the Generic Package URL's path slug /youtrack-cli/<tag>/ is unchanged; only the trailing filename component is yt-...).
  • Docs. README usage examples and CLAUDE.md project overview both call out the new binary name and add a note explaining the divergence from the package name.

What's deliberately out of scope

Per the scope choice on this PR, none of the following are touched:

  • The Cargo package name (youtrack-cli).
  • YOUTRACK_CLI_CONFIG, YOUTRACK_CLI_GIT_HASH, YOUTRACK_CLI_BUILD_DATE env vars.
  • The XDG config directory (~/.config/youtrack-cli/config.yaml). Existing installs keep working without re-running auth login.
  • Docker resource names: image tags (youtrack-cli:local, youtrack-cli:check), container names (youtrack-cli-build-*, dev-youtrack-cli-dev-*), named volumes (dev-youtrack-cli-cargo-*).
  • The Generic Package URL slug (/api/packages/.../youtrack-cli/<tag>/...). Only the trailing filename changed.

If any of these need to follow the rename later, they should be a separate PR with explicit migration notes (especially the config-dir, which would break existing installs).

Verification

  • cargo fmt --check clean.
  • cargo clippy --all-targets -- -D warnings clean.
  • cargo test --all-targets: 136 tests pass (no test changes were needed; the rename is invisible to the command-level wiremock tests).
  • cargo run -- --help shows Usage: yt [OPTIONS] <COMMAND>.
  • No remaining youtrack_cli (snake_case) references in src/, oci-build/, .forgejo/, compose*.yml, justfile, README.md, or CLAUDE.md.

Test plan

  • After merge, pull and cargo build --release. Confirm target/release/yt exists (and target/release/youtrack-cli does not).
  • target/release/yt --help shows Usage: yt.
  • just build-docker-export produces ./dist/yt.
  • CI publishes the artifact at https://dev.a8n.run/api/packages/pandoras-box/generic/youtrack-cli/<tag>/yt-linux-x86_64. Old youtrack-cli-linux-x86_64 URLs for previous tags still work (they were uploaded under that name); new tags publish under yt-linux-x86_64.
  • Existing ~/.config/youtrack-cli/config.yaml keeps working without changes; no re-auth needed.
## Summary Renames the shipped binary from `youtrack-cli` to `yt`, mirroring how Forgejo CLI ships as `fj` from a `forgejo-cli` package. The Cargo package name, the repo, and the Generic Package URL slug all stay as `youtrack-cli`; only the executable filename changes. ## What's in scope - **Binary + clap command name**. `Cargo.toml` grows an explicit `[[bin]] name = "yt"`. `cargo build` produces `target/release/yt`. `yt --help` shows `Usage: yt ...`. - **Error messages**. Every `run 'youtrack-cli auth login --base-url <url>'` hint becomes `run 'yt auth login --base-url <url>'`. - **Tracing default filter**. With the binary crate renamed to `yt`, `EnvFilter::new("yt=warn")` (in `main.rs`) and `RUST_LOG: yt=info` (in `compose.dev.yml`) replace the stale `youtrack_cli=...` defaults. `justfile`'s `run-debug` and the README example use `yt=debug`. - **Dockerfile + CI artifact**. Dockerfile copies `target/release/yt` into the export and runtime stages; `ENTRYPOINT` is `/app/yt`; the dep-prime cleanup drops `target/release/deps/yt-*` and `target/release/yt`. `compose.yml` copies `/app/yt` to `/dist/yt`. The CI workflow uploads `yt-linux-x86_64` (the Generic Package URL's path slug `/youtrack-cli/<tag>/` is unchanged; only the trailing filename component is `yt-...`). - **Docs**. README usage examples and CLAUDE.md project overview both call out the new binary name and add a note explaining the divergence from the package name. ## What's deliberately out of scope Per the scope choice on this PR, none of the following are touched: - The Cargo package name (`youtrack-cli`). - `YOUTRACK_CLI_CONFIG`, `YOUTRACK_CLI_GIT_HASH`, `YOUTRACK_CLI_BUILD_DATE` env vars. - The XDG config directory (`~/.config/youtrack-cli/config.yaml`). Existing installs keep working without re-running `auth login`. - Docker resource names: image tags (`youtrack-cli:local`, `youtrack-cli:check`), container names (`youtrack-cli-build-*`, `dev-youtrack-cli-dev-*`), named volumes (`dev-youtrack-cli-cargo-*`). - The Generic Package URL slug (`/api/packages/.../youtrack-cli/<tag>/...`). Only the trailing filename changed. If any of these need to follow the rename later, they should be a separate PR with explicit migration notes (especially the config-dir, which would break existing installs). ## Verification - `cargo fmt --check` clean. - `cargo clippy --all-targets -- -D warnings` clean. - `cargo test --all-targets`: 136 tests pass (no test changes were needed; the rename is invisible to the command-level wiremock tests). - `cargo run -- --help` shows `Usage: yt [OPTIONS] <COMMAND>`. - No remaining `youtrack_cli` (snake_case) references in `src/`, `oci-build/`, `.forgejo/`, `compose*.yml`, `justfile`, README.md, or CLAUDE.md. ## Test plan - [ ] After merge, pull and `cargo build --release`. Confirm `target/release/yt` exists (and `target/release/youtrack-cli` does not). - [ ] `target/release/yt --help` shows `Usage: yt`. - [ ] `just build-docker-export` produces `./dist/yt`. - [ ] CI publishes the artifact at `https://dev.a8n.run/api/packages/pandoras-box/generic/youtrack-cli/<tag>/yt-linux-x86_64`. Old `youtrack-cli-linux-x86_64` URLs for previous tags still work (they were uploaded under that name); new tags publish under `yt-linux-x86_64`. - [ ] Existing `~/.config/youtrack-cli/config.yaml` keeps working without changes; no re-auth needed.
chore: rename shipped binary from youtrack-cli to yt
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 10s
Create release / Create release from merged PR (pull_request) Has been skipped
148b309387
Mirrors how Forgejo CLI ships as `fj` from a `forgejo-cli` package: keep the Cargo package name `youtrack-cli` (and the repo / Generic Package slug), but ship the actual executable as `yt`. This is purely a binary-filename rename. Env vars (`YOUTRACK_CLI_CONFIG`, `YOUTRACK_CLI_GIT_HASH`, `YOUTRACK_CLI_BUILD_DATE`), the XDG config directory (`~/.config/youtrack-cli/`), Docker resource names (image tags, container names, named volumes), and the Generic Package URL slug are deliberately untouched: existing config files keep working, the package registry path stays the same, and Docker dev shells aren't disrupted. Concretely: `Cargo.toml` grows an explicit `[[bin]] name = "yt"` section so `cargo build` produces `target/release/yt`; the clap command attribute is now `name = "yt"` so `yt --help` shows `Usage: yt ...`; every "url and token must be set; run 'youtrack-cli auth login --base-url <url>'" error message is updated to point at `yt`; the default `RUST_LOG` filter in `main.rs` and `compose.dev.yml` is `yt=warn` / `yt=info` because the binary crate name changed; the Dockerfile copies `target/release/yt` into `/yt` (export stage) and `/app/yt` (runtime stage) and the `ENTRYPOINT` is `/app/yt`; the dep-prime cleanup deletes `target/release/deps/yt-*` and `target/release/yt`; `compose.yml` copies `/app/yt` to `/dist/yt`; the CI workflow uploads the artifact as `yt-linux-x86_64` (the Generic Package URL path component `/youtrack-cli/<tag>/` is unchanged, only the filename component changed); README and CLAUDE.md usage examples now invoke `yt`. The 5 of 5 PRs that just landed implementing every subcommand still all work end-to-end against the renamed binary; 136 tests pass, clippy clean, fmt clean.
David merged commit 54fe32e1cd into main 2026-05-14 00:57:29 +02:00
David deleted branch chore/rename-binary-to-yt 2026-05-14 00:57:29 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pandoras-box/youtrack-cli!17
No description provided.