ic-query 0.1.21

Internet Computer query CLI for NNS, SNS, and related public network metadata
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# Changelog

All notable changes to `ic-query` will be documented in this file.

The format follows [Keep a Changelog](https://keepachangelog.com/), and this
crate follows [Semantic Versioning](https://semver.org/).

## [0.1.21] - 2026-06-15

### Changed

- Splits NNS topology report tests into focused summary, coverage, versions,
  health, gaps, capacity, regions, providers, and refresh modules with shared
  fixtures.
- Splits broad NNS CLI parsing, help, and local-network rejection tests into
  focused subnet, node, node-provider, node-operator, data-center, registry,
  and topology modules.
- Splits NNS node-provider report tests into focused list, info, text,
  refresh, and fixture modules.
- Splits IC registry tests into focused catalog, wire, governance, inventory,
  and fixture modules.
- Splits subnet catalog tests into focused cache, list, info, stale/time,
  refresh, and fixture modules.
- Splits SNS command parsing and usage tests into focused list, lookup,
  proposals, neurons, invalid-input, and usage modules.
- Splits SNS neuron-cache complete-collection paging and progress reporting
  out of refresh orchestration while preserving refresh, attempt, and cache
  behavior.

## [0.1.20] - 2026-06-15

### Changed

- Splits SNS report assembly into focused list/info, token, parameters,
  proposal, proposals, and neurons modules while preserving the existing
  report builder behavior.
- Splits SNS report builder orchestration out of the report module root,
  keeping the root focused on module wiring, public exports, and constants.
- Splits the SNS report test suite into focused list/info, token, parameters,
  proposal, and neuron test modules with decomposed shared request and source
  fixtures.
- Further splits SNS neuron tests by live rendering, cache refresh, cache
  status, and cache error behavior, and reuses the shared unique temp-directory
  helper in cached NNS report tests.

## [0.1.19] - 2026-06-14

### Changed

- Splits live SNS fetch wiring into focused modules for deployed SNS listing,
  ledger token metadata, governance parameters, proposals, and neuron paging
  while preserving the existing live source API.
- Splits live SNS conversion helpers into focused modules for deployed SNS
  canisters, token metadata, proposal rows, and neuron rows.
- Splits SNS report model structs into focused list, token, governance,
  proposal, and neuron report model modules.

## [0.1.18] - 2026-06-14

### Changed

- Splits the custom filtered NNS node command into focused command
  construction, option parsing, and runtime dispatch modules while preserving
  existing node filters and help output.
- Splits SNS command runtime dispatch and command error definitions out of the
  SNS command module root, leaving the root as a thin module boundary.
- Splits SNS runtime handlers and clap command construction into focused
  submodules for lookup, proposals, neurons, shared args, and shared runtime
  helpers.
- Splits SNS option parsing into focused list, lookup, proposals, and neurons
  parser modules.

## [0.1.17] - 2026-06-14

### Changed

- Deduplicates standard NNS cached leaf report-adapter implementations for
  node-provider, node-operator, and data-center commands behind a shared local
  macro while keeping the filtered node command custom.
- Reuses the same NNS mainnet-only network guard implementation across
  registry, topology, node, node-provider, node-operator, and data-center
  reports.
- Renames the shared NNS macro module to reflect its broader command and
  report helper scope.

## [0.1.16] - 2026-06-14

### Changed

- Centralizes NNS cached leaf cache and refresh-lock path construction across
  node, node-provider, node-operator, and data-center reports.
- Deduplicates NNS JSON cache error mapper implementations across the same
  cached leaf report families.
- Reuses shared NNS refresh text rendering across the same cached leaf report
  families while preserving their current text output order.
- Removes per-family cached-report wrapper structs in favor of the shared JSON
  cache report type.
- Removes now-unused internal refresh-lock path wrappers from cached NNS leaf
  report modules.

## [0.1.15] - 2026-06-14

### Changed

- Tightens shared cache write and refresh helpers, including parent-directory
  handling, parentless relative output paths, and distinct refresh-lock
  read/parse/serialize errors.
- Centralizes SNS neuron cache, lock, and refresh-attempt path construction,
  removing parent-directory panic paths from snapshot refresh and status code.
- Deduplicates NNS cache-file error mapping across node, node-provider,
  node-operator, and data-center refresh paths.
- Simplifies internal command-output helpers to stdout-only writing while
  preserving refresh export-path behavior.
- Hardens subnet catalog and UTC timestamp internals by replacing panic-prone
  invariant paths with typed errors or direct formatting.

## [0.1.14] - 2026-06-14

### Changed

- Splits live SNS source wiring from blocking and async fetch implementations
  so the live SNS module is organized by adapter, fetch, query, conversion, and
  Candid type responsibilities.
- Splits NNS topology CLI support into focused command construction, option
  parsing, and runtime dispatch modules.
- Splits NNS subnet CLI support into focused command construction, option
  parsing, and runtime dispatch modules.
- Splits SNS command specifications into focused command construction, usage
  rendering, and value-enum modules.
- Splits shared cache-file support into focused error, JSON loading, refresh
  lock, and write modules while preserving existing call sites.
- Splits subnet catalog request/report types and report builders out of the
  catalog root module.
- Splits SNS neuron-cache report assembly from complete snapshot refresh
  orchestration.
- Deduplicates byte-to-hex formatting across IC registry and SNS report code
  behind a shared crate helper.
- Removes an unnecessary panic-path conversion from token amount decimal
  rounding.

## [0.1.13] - 2026-06-14

### Changed

- Splits shared NNS leaf command support into focused model, option parsing,
  clap command construction, and runtime dispatch submodules.
- Collapses the shared NNS cached-leaf runner signature behind a report-provider
  trait so callers no longer carry every request, report, cache, and host-error
  type through the public helper boundary.
- Replaces generic callback bundles in shared JSON cache loading and NNS
  topology read dispatch with named provider traits and concrete local mappers.
- Replaces the positional SNS lookup tuple with a named lookup result shared by
  info, token, params, proposal, proposals, neurons, and neuron-cache refresh.

## [0.1.12] - 2026-06-14

### Changed

- Splits IC registry live relation inventory fetching into a focused
  inventory module, keeping the registry root module limited to shared
  constants, principal conversion, and registry key helpers.
- Splits IC registry async live-source querying out of the blocking client
  wrapper module.

## [0.1.11] - 2026-06-14

### Changed

- Splits IC registry adapter models, errors, Candid wire types, transport
  helpers, relation inventory helpers, catalog and domain projection helpers,
  and mainnet annotations into focused submodules.
- Replaces the registry client wildcard parent import with explicit internal
  imports.

## [0.1.10] - 2026-06-14

### Changed

- Splits NNS node, node-provider, node-operator, and data-center text
  rendering into focused report text submodules.
- Splits NNS node, node-provider, node-operator, and data-center request,
  report, cache, and error models into focused report model submodules.
- Splits NNS topology summary, coverage, versions, and host-error helpers out
  of the topology report orchestration module.
- Splits NNS topology text rendering into focused per-report renderer
  submodules.

## [0.1.9] - 2026-06-14

### Changed

- Splits SNS command clap specification, usage rendering, value parsers,
  command value enums, and parsed option types into focused commands
  submodules.
- Splits SNS report lookup/list ordering helpers and report-object assembly
  into focused report submodules.
- Splits SNS report model types into focused request, report, sort/filter, and
  error submodules.
- Splits SNS neuron cache loading, discovery, summaries, and cached sort
  ordering into a focused cache storage submodule.
- Splits generic live SNS agent/query helpers out of the live SNS fetch
  orchestration module.
- Renames the internal live SNS source to match its broader list, token,
  governance, proposal, and neuron query role.

## [0.1.8] - 2026-06-14

### Changed

- Splits SNS neuron cache path, attempt, error, and cache model helpers into
  focused submodules while preserving the existing cache behavior.
- Splits live SNS Candid request and response wire types into a focused live
  source submodule.
- Splits live SNS response conversion and metadata/proposal formatting helpers
  into a focused live source submodule.

## [0.1.7] - 2026-06-14

### Changed

- Corrects release Make targets so `make patch`, `make minor`, and `make major`
  only gate and bump version files, while `make release-patch`,
  `make release-minor`, and `make release-major` stage, commit, tag, and push.
- Requires a clean worktree for `make package` and `make publish`, and documents
  publishing after the release commit/tag push.
- Splits NNS topology health, gap, capacity, region, provider, and refresh
  aggregation into focused report submodules.

## [0.1.6] - 2026-06-14

### Changed

- Hardens SNS neuron snapshot cache coverage for unsupported schemas, stale
  refresh locks, failed refresh preservation, and complete-cache sorting.
- Splits SNS neuron cache storage, refresh, status, and cached-sort mechanics
  into a dedicated report submodule.
- Deduplicates SNS command request construction for timestamps and project
  cache-root lookup.
- Normalizes Rust module layout to avoid `foo.rs` plus `foo/` collisions,
  removes `#[path = "..."]` module shims, and records module/test layout rules
  in `AGENTS.md`.

## [0.1.5] - 2026-06-14

### Changed

- Splits SNS command dispatch into its own module while keeping the public SNS
  module focused on exports.
- Splits SNS text rendering into focused helper, neuron/cache, params, and
  proposal modules.
- Deduplicates typed live SNS Candid query handling across SNS-W and governance
  calls.
- Reuses shared help/version and SNS cache-path helpers in older NNS and SNS
  call sites.
- Makes `make patch`, `make minor`, and `make major` push the release commit
  and tag automatically after the release bump succeeds.

## [0.1.4] - 2026-06-14

### Added

- Adds `icq sns proposals <id|root-principal>` for bounded live SNS governance
  proposal listings, with `--limit`, `--before`, `--status`, `--verbose`, and
  JSON output support.
- Adds `icq sns proposal <id|root-principal> <proposal-id>` for direct SNS
  governance proposal detail lookup.

## [0.1.3] - 2026-06-14

### Added

- Adds `icq sns neurons cache list` and `icq sns neurons cache status
  <id|root-principal>` to inspect local complete neuron snapshots and latest
  refresh-attempt metadata without live SNS-W or governance calls.

### Fixed

- Uses local complete neuron cache metadata for cache-backed `icq sns neurons
  <id|root-principal> --sort ...` reports instead of re-fetching the live SNS
  list before reading the cache.

## [0.1.2] - 2026-06-13

### Changed

- Deduplicates SNS lookup command dispatch, clap command construction, and
  shared lookup option parsing.
- Moves shared duration display formatting into the duration helper module.
- Splits SNS model types, source contracts, text rendering, and live IC API
  querying out of the main SNS report orchestration module.

### Fixed

- Preserves SNS neuron refresh attempt progress metadata when a refresh stops
  before publishing a complete snapshot.

## [0.1.1] - 2026-06-13

### Added

- Adds `icq sns params <id|root-principal>` to query SNS governance nervous
  system parameters, with readable text output and raw Candid fields in JSON.

### Changed

- Moves shared token/e8s text amount rendering into a reusable helper for SNS
  token, neuron, and parameter reports.

## [0.1.0] - 2026-06-13

### Added

- Adds `icq sns neurons refresh <id|root-principal>` to materialize complete
  SNS governance neuron snapshots under `.icq/sns/ic/<root>/neurons/full.json`.
- Adds cache-backed `icq sns neurons <id|root-principal> --sort
  id|stake|maturity|created` over complete neuron snapshots.
- Adds a shared stderr progress-line helper and uses it to show SNS neuron
  refresh page/row counters while long refreshes are running.
- Adds Canic-style `make release-patch`, `make release-minor`,
  `make release-major`, and `make release-push` helpers.

### Changed

- Keeps default `icq sns neurons` output on the bounded live API path with
  `--sort api`, while whole-collection sorts require the complete cache.
- Allows larger `--limit` values for cache-backed SNS neuron sorts while
  keeping live API queries capped at 100 rows.
- Records SNS neuron refresh attempts separately from published complete
  snapshots so failed or capped refreshes do not replace the last complete
  cache.
- Shortens SNS neuron IDs to eight characters in text tables by default, with
  `--verbose` preserving full neuron IDs.
- Renders current SNS token amounts, including token fee, total supply, stake,
  maturity, and staked maturity, as two-decimal token amounts in text output
  while keeping raw base-unit and e8s fields in JSON.

## [0.0.9] - 2026-06-13

### Added

- Adds `icq sns neurons <id|root-principal>` for SNS governance neuron listings
  with clap-validated `--limit` and `--owner` filters.
- Adds `docs/design/0.1/` planning docs for reusable complete snapshot caches
  and SNS neuron refresh semantics.

### Changed

- Deduplicates SNS lookup command option parsing and shared SNS resolution,
  while clap-validating lookup ids and root principals.
- Lets global `--network ic` forward to all networked SNS lookup commands.

## [0.0.8] - 2026-06-13

### Added

- Adds `icq sns token <id|root-principal>` for SNS ledger token metadata,
  supply, fee, supported standards, minting account, and index canister lookup.

### Changed

- Uses the SNS-W `list_deployed_snses` response order for SNS numeric ids,
  preserving deployment order through concurrent metadata enrichment.
- Reports SNS `icrc1:logo` token metadata as a boolean presence value instead
  of emitting the raw logo payload.
- Removes the drifting crates.io version badge from the README.

### Fixed

- Fixes table rendering for long SNS token metadata values without relying on
  dynamic format widths.

## [0.0.7] - 2026-06-13

### Changed

- Further deduplicates cache-backed NNS leaf command plumbing through shared
  request and test-helper macros.
- Collapses repeated NNS topology read request structs into a shared read
  request type while preserving the existing command-specific request names.
- Deduplicates NNS topology read-runner and component request construction
  helpers.

## [0.0.6] - 2026-06-13

### Changed

- Deduplicates cached NNS leaf command dispatch for data-center, node-provider,
  and node-operator commands.
- Deduplicates NNS topology read command parsing and splits topology report
  request/model code into focused submodules.

## [0.0.5] - 2026-06-13

### Changed

- Lets clap render top-level command help from registered command metadata
  instead of maintaining a separate hand-formatted command list.
- Uses clap's ranged numeric parser for
  `icq nns subnet list --range-limit` and removes unused CLI parsing helpers.

## [0.0.4] - 2026-06-13

### Added

- Adds `make patch`, `make minor`, and `make major` release helpers that run
  `make test` before any version or tag mutations, bump the crate version,
  commit it, and create an annotated version tag.
- Adds SNS metadata fallback visibility in text and JSON reports when a
  governance metadata query fails but the deployed SNS row can still be shown.
- Adds `icq sns list --sort id|name` while keeping numeric SNS ids stable by
  root principal.
- Adds exact snapshot-style tests for top-level and SNS list CLI help output.
- Adds binary smoke tests for top-level help, SNS list help, NNS topology help,
  and version output.

### Changed

- Moves the `icq sns list` row id to the first text table column.
- Assigns SNS list row ids after deterministic root-principal ordering so ids
  are not reshuffled by metadata name changes or metadata lookup failures.
- Hardens release bumps by validating the bumped package before commit/tag and
  restoring `Cargo.toml` and `Cargo.lock` if a post-mutation release step fails.
- Uses more collision-resistant temporary filenames and cleanup for atomic cache
  writes.
- Centralizes CLI output-format handling, top-level command metadata, and the
  current-thread async runtime wrapper used by live IC query adapters.
- Deduplicates topology component request construction and mainnet agent/
  canister setup in live registry and SNS queries.
- Splits live registry fetch orchestration into `ic_registry::client` and moves
  NNS topology text rendering into its own report submodule.
- Splits subnet catalog host/cache refresh code, text rendering, and timestamp
  helpers into focused submodules.
- Deduplicates repeated NNS topology read-option parsing.
- Reuses a shared refresh-lock guard helper for pre-fetch subnet catalog
  refreshes.

## [0.0.3] - 2026-06-13

### Added

- Adds `icq sns list` and `icq sns info` for deployed mainnet SNS instances
  queried from the SNS-W canister and SNS governance metadata.
- Resolves SNS names from governance metadata, shows compact five-character
  canister ID prefixes by default, and supports full canister IDs with
  `icq sns list --verbose`.
- Supports `icq sns info <id|root-principal>` lookups by list row id or SNS
  root canister principal.

### Changed

- Groups NNS command implementation modules under `src/nns/` by command family.
- Renames project-local `icq` cache/state directory from `.ic-query/` to
  `.icq/`.
- Updates README positioning so `ic-query` is documented as a standalone IC
  metadata lookup tool, with Canic mentioned only as an optional integration
  example.
- Clarifies cache behavior for subnet versus node/provider/operator/data-center
  commands, including first-use cache population and source endpoint notices.

## [0.0.1] - 2026-06-13

### Added

- Adds the `icq` executable.
- Adds the `icq nns` command family for read-only Internet Computer mainnet
  metadata queries.
- Adds cache-backed subnet list, subnet info, and subnet refresh commands.
- Adds cache-backed NNS registry version, data-center, node, node-provider,
  node-operator, and joined-topology commands.
- Adds text and JSON output for automation-friendly metadata reports.

### Changed

- Moves the former `canic nns ...` command surface into `icq nns ...`.
- Folds the former subnet catalog model and resolver into `ic-query`, so the
  metadata query tool owns subnet classification and lookup.