bottlerocket-os / bottlerocket-os/bottlerocket-core-kit

Migrate apiclient to argh crate

Open
#648 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
34
Forks
77
Avg merge
2d 23h
Merged PRs (30d)
23

Description

**Summary**

Replace custom argument parsing in `apiclient` with `argh` to align with other Bottlerocket components (certdog, bloodhound, ghostdog, etc.).

**Current issues:**
- Custom parsing becomes increasingly complex as we introduce new subcommands and arguments, which could introduce maintenance burden
- Current parsing implementation has side effect (e.g. the parsing of "-h | --help" would indirectly trigger program::exit()) which makes it very hard to unit test.
- Inconsistent with rest of codebase where we use `argh` for the CLI.

Contributor guide

Open the contributing guide

Research direction

Locate apiclient's custom argument-parsing implementation and compare the argh-based CLI patterns used by certdog, bloodhound, and ghostdog. Replace the custom parser while preserving the existing subcommands and arguments, then verify that help handling no longer triggers program exit indirectly and can be unit tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.