Skip to content

Enable all module query commands via AutoCLI integration - #30

Merged
vNodesV merged 4 commits into
copilot/investigate-command-module-lossfrom
copilot/activate-all-query-modules
Feb 11, 2026
Merged

Enable all module query commands via AutoCLI integration#30
vNodesV merged 4 commits into
copilot/investigate-command-module-lossfrom
copilot/activate-all-query-modules

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Most memed q subcommands were missing because SDK 0.50 core modules (auth, bank, staking, etc.) dropped GetQueryCmd() in favor of AutoCLI proto-generated commands. Only ibc, transfer, and wasm still use the legacy pattern.

Approach

Integrate autocli.AppOptions.EnhanceRootCommand() to auto-generate query (and tx) commands from protobuf service descriptors for all core modules.

  • ModuleOptions map populated via AppModule{}.AutoCLIOptions() on zero-value structs — safe because these methods only return static proto descriptors, no keeper access
  • Core SDK modules use ModuleOptions (not Modules) to avoid nil-pointer panics from GetTxCmd() on zero-value structs with unexported codec fields
  • Wasm goes in Modules map so HasCustomQueryCommand/HasCustomTxCommand detection works
moduleOptions := map[string]*autocliv1.ModuleOptions{
    authtypes.ModuleName:     auth.AppModule{}.AutoCLIOptions(),
    banktypes.ModuleName:     bank.AppModule{}.AutoCLIOptions(),
    // ...
}
modules := map[string]appmodule.AppModule{
    "wasm": wasm.AppModule{},
}

Result

memed q now exposes 19 subcommands: auth, authz, bank, block, comet-validator-set, distribution, evidence, feegrant, gov, ibc, ibc-transfer, mint, params, slashing, staking, tx, txs, upgrade, wasm.

Tx commands also gain auth, mint, slashing entries via the same EnhanceRootCommand call.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 11, 2026 19:14
Integrate SDK 0.50 AutoCLI to generate query commands for all core
modules (auth, bank, staking, distribution, gov, slashing, mint,
params, feegrant, authz, evidence, upgrade). Uses ModuleOptions with
static proto descriptors from zero-value AppModule instances to avoid
nil keeper panics. Wasm module uses Modules map for custom command
detection. All 19 query subcommands now available.

Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
Co-authored-by: vNodesV <100853686+vNodesV@users.noreply.github.com>
Copilot AI changed the title [WIP] Add and activate all query modules for functionality Enable all module query commands via AutoCLI integration Feb 11, 2026
Copilot AI requested a review from vNodesV February 11, 2026 19:21
@vNodesV
vNodesV marked this pull request as ready for review February 11, 2026 19:38
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@vNodesV
vNodesV merged commit 40fa2dd into copilot/investigate-command-module-loss Feb 11, 2026
9 of 15 checks 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.

2 participants