feat: Milestone 1 scaffold - CLI skeleton and working config #1

Merged
David merged 1 commit from feat/milestone-1-scaffold into main 2026-05-12 17:08:12 +02:00
Owner

Summary

First milestone of the Rust port of github.com/dukechill/youtrack-cli. Lands the project skeleton, the full clap command tree, and a working config subcommand. Every other subcommand is wired to clap but currently returns a milestone-tagged "not yet implemented" error so the CLI exits cleanly.

  • Cargo.toml: single-binary crate, edition 2024, MIT licensed. Deps: clap (derive), tokio, reqwest (rustls), serde + serde_yml + serde_json, secrecy, thiserror, anyhow, tracing, comfy-table, time, url. Dev deps: wiremock, tempfile.
  • src/cli.rs: full clap definition covering list, board list, sprint list/current, issue {comment,inspect,sprint show/set,set-state,set-estimation,daily-sync}, config {set,view,show}, work {add,check}. Global flags --config, --color.
  • src/config.rs: drop-in compatible with the Go ~/.youtrack-cli.yaml. Keys url, token, default_sprint, board_name. Masking matches Go ([first4]...[last4] when len > 8). File written 0600 on Unix. Tests for round-trip and masking.
  • src/commands/config/{set,view,show}.rs: fully working.
  • All other src/commands/**: stubs returning bail!("'<cmd>' is not yet implemented in the Rust port (milestone N)").
  • PLAN.md: locked-in decisions (single binary, Forgejo hosting, MIT, --color auto, --json on every read command). Will be removed once milestone 1 is reviewed.
  • justfile: build/test/lint/fmt/check/dev/create-release modeled on the sibling icanhazrust recipe.
  • LICENSE, README.md, .gitignore.

Test plan

  • cargo build --release (clean).
  • cargo test --all-targets - 4 unit tests pass (mask_short_token_returns_raw, mask_long_token_keeps_4_each_side, round_trip_yaml, set_value_rejects_unknown_key).
  • cargo clippy --all-targets -- -D warnings (clean).
  • cargo fmt --check (clean).
  • Smoke test: --config <tmp> config set url/token/board ... then config show masks the token, config view emits raw YAML matching Go's format, file permissions are 0600.
  • youtrack-cli list returns the expected stub error.

Notes for reviewers

  • PLAN.md lists one still-open question: whether to rewrite the Codex skill prompts for Rust binary semantics or copy verbatim. Defaulting to verbatim; flag if you disagree.
  • Stubs reference milestones 2-6 from PLAN.md so the next PRs have an obvious order.
  • No Forgejo check.yml workflow yet - milestone 8 in the plan. Easy to add now if you'd rather not wait.
## Summary First milestone of the Rust port of `github.com/dukechill/youtrack-cli`. Lands the project skeleton, the full `clap` command tree, and a working `config` subcommand. Every other subcommand is wired to clap but currently returns a milestone-tagged "not yet implemented" error so the CLI exits cleanly. - `Cargo.toml`: single-binary crate, edition 2024, MIT licensed. Deps: clap (derive), tokio, reqwest (rustls), serde + serde_yml + serde_json, secrecy, thiserror, anyhow, tracing, comfy-table, time, url. Dev deps: wiremock, tempfile. - `src/cli.rs`: full clap definition covering `list`, `board list`, `sprint list/current`, `issue {comment,inspect,sprint show/set,set-state,set-estimation,daily-sync}`, `config {set,view,show}`, `work {add,check}`. Global flags `--config`, `--color`. - `src/config.rs`: drop-in compatible with the Go `~/.youtrack-cli.yaml`. Keys `url`, `token`, `default_sprint`, `board_name`. Masking matches Go (`[first4]...[last4]` when `len > 8`). File written 0600 on Unix. Tests for round-trip and masking. - `src/commands/config/{set,view,show}.rs`: fully working. - All other `src/commands/**`: stubs returning `bail!("'<cmd>' is not yet implemented in the Rust port (milestone N)")`. - `PLAN.md`: locked-in decisions (single binary, Forgejo hosting, MIT, `--color auto`, `--json` on every read command). Will be removed once milestone 1 is reviewed. - `justfile`: `build`/`test`/`lint`/`fmt`/`check`/`dev`/`create-release` modeled on the sibling `icanhazrust` recipe. - `LICENSE`, `README.md`, `.gitignore`. ## Test plan - [x] `cargo build --release` (clean). - [x] `cargo test --all-targets` - 4 unit tests pass (`mask_short_token_returns_raw`, `mask_long_token_keeps_4_each_side`, `round_trip_yaml`, `set_value_rejects_unknown_key`). - [x] `cargo clippy --all-targets -- -D warnings` (clean). - [x] `cargo fmt --check` (clean). - [x] Smoke test: `--config <tmp> config set url/token/board ...` then `config show` masks the token, `config view` emits raw YAML matching Go's format, file permissions are 0600. - [x] `youtrack-cli list` returns the expected stub error. ## Notes for reviewers - `PLAN.md` lists one still-open question: whether to rewrite the Codex skill prompts for Rust binary semantics or copy verbatim. Defaulting to verbatim; flag if you disagree. - Stubs reference milestones 2-6 from `PLAN.md` so the next PRs have an obvious order. - No Forgejo `check.yml` workflow yet - milestone 8 in the plan. Easy to add now if you'd rather not wait.
Port of the Go `youtrack-cli` to Rust. This first milestone lands the project skeleton: Cargo workspace, clap command tree covering every subcommand the Go CLI exposes, working `config set`/`view`/`show` against `~/.youtrack-cli.yaml` (drop-in compatible with the Go YAML format), and stubs for every other command that return a milestone-tagged "not yet implemented" error.

PLAN.md records the decisions made: single binary (no workspace yet), Forgejo hosting at dev.a8n.run/NiceGuyIT/youtrack-cli, MIT license, `--color auto` default, `--json` planned for every read command, Codex skill copied verbatim later. Open scope is full Go feature parity first; broader scope (server/MCP/webhooks) is out of scope for this port and is called out as a non-goal.

Tests cover token masking and a config round-trip through serde_yml. `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test --all-targets` all pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
David merged commit 262a59061f into main 2026-05-12 17:08:12 +02:00
David deleted branch feat/milestone-1-scaffold 2026-05-12 17:08:12 +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!1
No description provided.