feat(devkit): add completions, version, config subcommands and piped input support#423
Open
RennyThompson wants to merge 1 commit into
Conversation
…nfig, piped input Closes StellarCommons#400 — Add completions subcommand with bash/zsh/fish support via clap_complete Closes StellarCommons#401 — Add version subcommand with build metadata (commit, timestamp, rustc, target) Closes StellarCommons#402 — Add config subcommand showing active key/value pairs with env/default source Closes StellarCommons#403 — Add piped stdin support to validate and inspect subcommands Changes: - packages/devkit/Cargo.toml: add clap_complete dependency; enable clap env feature - packages/devkit/build.rs: capture git SHA, build timestamp, rustc version, target at compile time - src/cli/completions.rs: ShellType enum + CompletionsArgs that generates shell scripts via clap_complete - src/cli/version.rs: BuildInfo struct with display/JSON output; VersionArgs with --json/--check flags - src/cli/config.rs: Config struct loading from env vars + optional file; ConfigArgs run() displays table - src/cli/mod.rs: add Completions/Version/Config/Validate/Inspect variants to Commands enum; add InputSource enum (File | Stdin) with load_csv/load_json helpers; add DataQualityReport and FeeSummary structs used by validate/inspect dispatch - src/utilities/mod.rs: new module exporting csv_reader and json_reader - src/utilities/csv_reader.rs: read_csv_file, read_csv_stdin, read_csv_str, write_csv_str/file - src/utilities/json_reader.rs: read_json_file, read_json_stdin, read_json_str, write_json_str/file - src/lib.rs: expose utilities module
|
@RennyThompson Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This was referenced Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements four CLI v2 features assigned to @RennyThompson:
devkit completions --shell <bash|zsh|fish>generates shell completion scripts viaclap_completedevkit versionprints build metadata (git SHA, build timestamp, rustc version, target);--jsonfor machine-readable output;--check <version>for semver comparisondevkit configprints all active configuration key/value pairs with source (env var or default);--set key=valuefor runtime overridesdevkit validateanddevkit inspectboth accept a--filepath or read from piped stdin viaInputSourceenum; supports--format csv|jsonand--output-format text|jsonFiles changed
packages/devkit/Cargo.tomlclap_completedep; enable clapenvfeaturepackages/devkit/build.rssrc/cli/completions.rsShellTypeenum +CompletionsArgssrc/cli/version.rsBuildInfostruct +VersionArgssrc/cli/config.rsConfigstruct (env + file loading) +ConfigArgssrc/cli/mod.rsCommandsvariants;InputSource(File/Stdin);DataQualityReport;FeeSummarysrc/utilities/mod.rscsv_readerandjson_readersrc/utilities/csv_reader.rssrc/utilities/json_reader.rssrc/lib.rsutilitiesmoduleTesting
Each new module includes inline unit tests covering happy paths, edge cases, and error conditions.