cli: add doublezero geolocation probe subcommands#3713
Merged
Conversation
f3e46d0 to
50c8027
Compare
juan-malbeclabs
approved these changes
May 18, 2026
ben-dz
added a commit
that referenced
this pull request
May 19, 2026
Stacked on #3713 (PR 2: `doublezero geolocation probe`). ## Summary of Changes - Adds `doublezero geolocation user <create|delete|update|get|list|add-target|remove-target|set-result-destination|update-payment>` to the `doublezero` CLI, mirroring the existing `doublezero-geolocation user` surface - Wires `UserCliCommand` / `UserCommands` via the existing `Command::Geolocation` dispatch arm (no new client construction — reuses `GeoClient` / `GeoCliCommandImpl` from the probe arm) ## Diff Breakdown | Category | Files | Lines (+/-) | Net | |-------------|-------|--------------|------| | Core logic | 2 | +98 / -6 | +92 | | Scaffolding | 6 | +138 / -6 | +132 | | Docs | 1 | +4 / -0 | +4 | Purely additive clap wiring for the PR-3 slice; the larger `config/set.rs` changes are from the base PRs (1–2) included in this diff. <details> <summary>Key files (click to expand)</summary> - `client/doublezero/src/cli/geolocation/user.rs` — new file: clap `UserCliCommand` / `UserCommands` enum mirroring `doublezero-geolocation-cli/src/cli/user.rs` - `client/doublezero/src/main.rs` — `GeolocationCommands::User` dispatch arm; `GeoUserCommands` import alias - `client/doublezero/src/cli/geolocation/mod.rs` — registers `pub mod user` and adds `User(UserCliCommand)` variant to `GeolocationCommands` - `smartcontract/cli/src/config/set.rs` — (base PR 1) `--geo-program-id` flag, validation, persistence, and two new tests - `smartcontract/cli/src/config/get.rs` — (base PR 1) displays Geolocation Program ID in `config get` output </details> ## Testing Verification - `cargo check -p doublezero` — clean - `make rust-fmt && make rust-lint` — clean (all 8 crates) - `doublezero geolocation user --help` — lists all 9 subcommands: `create`, `delete`, `update`, `get`, `list`, `add-target`, `remove-target`, `set-result-destination`, `update-payment`
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 of Changes
doublezero geolocation probe <create|update|delete|get|list|add-parent|remove-parent>to the maindoublezeroCLI, mirroringdoublezero-geolocation probe ...--geo-program-idglobal flag (resolution: flag → configgeo_program_id→ built-in default)GeoClient+GeoCliCommandImplconstruction needed for any futuregeolocationsubtree work; theusersubtree lands in a follow-upDiff Breakdown
Pure clap wiring and dispatch — no new business logic. All probe command implementations are inherited unchanged from `doublezero_cli::geolocation::probe::*`.
Key files (click to expand)
Testing Verification