Skip to content

feat(cli): add auth status, docker systemd probe, and version flag#719

Merged
ahmedhesham6 merged 2 commits into
mainfrom
feat/auth-status-docker-probes-version
May 4, 2026
Merged

feat(cli): add auth status, docker systemd probe, and version flag#719
ahmedhesham6 merged 2 commits into
mainfrom
feat/auth-status-docker-probes-version

Conversation

@ahmedhesham6
Copy link
Copy Markdown
Collaborator

Description

Adds several CLI improvements: a new auth status command for credential verification, a smarter Docker preflight probe, and a --version flag.

Changes Made

  • New stakpak auth status command: Shows the active profile, masked credentials, and pings the Stakpak API (/v1/account) to verify reachability and identity. Supports --profile filtering like auth list.
  • Docker systemd user probe (probe_docker_user_systemd): Detects the common failure mode where usermod -aG docker $USER was run but the systemd user manager still holds stale group membership. Provides a concrete remediation command (sudo systemctl restart user@$(id -u).service).
  • OS-aware Docker install remediation: Parses /etc/os-release ID field to recommend dnf on RHEL-family distros vs apt-get on Debian-family, instead of always suggesting apt-get.
  • Autopilot timeout fix: Changed timeout error output from println! to eprintln! and returns Err so the caller knows the startup actually failed.
  • --version flag: Adds CARGO_PKG_VERSION to the CLI struct so stakpak --version works.
  • System prompt simplification: Replaces the inline Slack app manifest YAML with a pointer to stakpak autopilot channel add --help, reducing prompt size.

Testing

  • All tests pass locally (cargo test --workspace)
  • No clippy warnings (cargo clippy --all-targets -- -D warnings)
  • Code is formatted (cargo fmt --check)
  • Added unit tests for probe_docker_user_systemd (stale group, missing systemd-run, non-Linux)
  • Added parse_os_release_id and docker_install_remediation with OS-specific branches

Breaking Changes

None

- Add `stakpak auth status` command: shows active profile, masked
  credentials, and pings the Stakpak API for reachability
- Add `probe_docker_user_systemd` to detect stale group membership
  after usermod -aG docker without restarting user@UID.service
- Make Docker install remediation OS-aware (amzn/rhel/fedora vs
  ubuntu/debian) by parsing /etc/os-release ID field
- Fix autopilot timeout: use eprintln! for error output and return Err
  instead of silently continuing after timeout
- Add `--version` flag to CLI via CARGO_PKG_VERSION
- Simplify system prompt Slack setup: replace inline manifest YAML with
  pointer to `stakpak autopilot channel add --help`
@ahmedhesham6 ahmedhesham6 merged commit 3b5dc50 into main May 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant