Skip to content

feat(cli): add pay qodercli subcommand and Qoder IDE/CLI setup integration#377

Open
radioheadz wants to merge 1 commit into
solana-foundation:mainfrom
radioheadz:feat/qodercli-support
Open

feat(cli): add pay qodercli subcommand and Qoder IDE/CLI setup integration#377
radioheadz wants to merge 1 commit into
solana-foundation:mainfrom
radioheadz:feat/qodercli-support

Conversation

@radioheadz

Copy link
Copy Markdown

Summary

Adds first-class Qoder support to the pay CLI — both runtime launch and persistent setup.

Changes

pay qodercli subcommand

New command that launches qodercli with the pay MCP server injected via
--mcp-config (stateless, session-scoped). Includes Windows support via
PowerShell wrapper and 5 unit tests covering config generation and
cross-platform logic.

pay setup — Qoder IDE & CLI registration

Registers the pay MCP server in both Qoder clients by writing JSON config
files directly (no CLI commands invoked):

  • Qoder IDE: ~/Library/Application Support/Qoder/SharedClientCache/mcp.json
  • Qoder CLI: ~/.qoder/settings.json

Uses the same add_mcp_entry() approach as Claude Code/Desktop for consistency.

Other

  • TUI: green "Q" logo for qodercli sessions.
  • Help text and account-required list updated.

Testing

  • cargo clippy -p pay -- -D warnings: zero warnings.
  • pay setup: successfully writes both config files.
  • pay qodercli: launches with pay MCP available in session.

Generated with Qoder

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

@radioheadz is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown

Greptile Summary

Adds pay qodercli as a new subcommand that launches qodercli with the pay MCP server injected at runtime, and extends pay setup to register the pay MCP server in both the Qoder IDE config and ~/.qoder/settings.json for the Qoder CLI.

  • pay qodercli launcher: New QodercliCommand in qodercli/mod.rs mirrors the existing Claude/Codex launchers. On Windows it uses PID-namespaced temp files and a correct single-quoted PowerShell here-string (fixing the '@ @args problem present in the Claude launcher). Five unit tests cover config generation and env-var forwarding.
  • pay setup Qoder targets: Qoder IDE is added to the generic mcp_config_targets() loop (using add_mcp_entry). Qoder CLI gets its own add_qodercli_mcp_entry helper that reads/merges ~/.qoder/settings.json guarded by an existence check on the parent directory.
  • TUI/help housekeeping: Green Qoder ASCII logo added for the TUI card panel, qodercli added to SUPPORTED_PASS_THROUGH_COMMANDS.

Confidence Score: 5/5

Safe to merge; the Windows launcher correctly addresses the PowerShell here-string and race-condition issues from prior reviews, and all new code paths are covered by tests.

Previous blocking issues — the PowerShell '@ @args terminator bug and fixed-name temp files — are both resolved. The remaining observations (orphaned temp files only when PowerShell itself fails to start, and the potential duplicate MCP registration when a user runs both pay setup and pay qodercli) are quality notes with minimal real-world impact, not correctness defects in the changed code.

rust/crates/cli/src/commands/qodercli/mod.rs — the Windows cleanup-on-error path and the missing equivalent to --strict-mcp-config are worth a second look before wider release.

Important Files Changed

Filename Overview
rust/crates/cli/src/commands/qodercli/mod.rs New qodercli launcher — well-structured with PID-namespaced temp files on Windows and here-string fix; minor: temp files orphaned if powershell itself fails to start, and no --strict-mcp-config equivalent to avoid duplicate server registration when pay setup has already written ~/.qoder/settings.json
rust/crates/cli/src/commands/setup.rs Adds Qoder IDE (via generic add_mcp_entry loop) and Qoder CLI (via add_qodercli_mcp_entry) setup targets; new tests are consistent with implementation; Qoder IDE is handled by the generic loop that writes command+args only
rust/crates/cli/src/commands/mod.rs Routine additions: Qodercli variant in Command enum, ToolKind, requires_account, tool_kind, and execute dispatch — consistent with how Claude/Codex are handled
rust/crates/cli/src/components/help.rs Adds "qodercli" to SUPPORTED_PASS_THROUGH_COMMANDS constant and ROOT_COMMAND_SUMMARY display string; consistent with existing pattern
rust/crates/cli/src/main.rs Single-line addition of Command::Qodercli to the account-required match arm; straightforward
rust/crates/cli/src/tui.rs Adds Qoder green ASCII logo for ToolKind::Qodercli and updates the unreachable!() arm to include Qodercli; no logic issues

Sequence Diagram

sequenceDiagram
    participant User
    participant pay CLI
    participant setup.rs
    participant qodercli/mod.rs
    participant qodercli binary

    User->>pay CLI: pay setup
    pay CLI->>setup.rs: install_mcp_configs()
    setup.rs->>setup.rs: add_mcp_entry(qoder_ide_config_path)
    note right of setup.rs: ~/Library/.../Qoder/SharedClientCache/mcp.json
    setup.rs->>setup.rs: add_qodercli_mcp_entry(~/.qoder/settings.json)
    note right of setup.rs: Guarded by parent-dir existence check

    User->>pay CLI: pay qodercli [args]
    pay CLI->>qodercli/mod.rs: QodercliCommand::run()
    qodercli/mod.rs->>qodercli/mod.rs: build_mcp_config(pay_bin, active_account, env)
    alt Unix/macOS/Linux
        qodercli/mod.rs->>qodercli binary: qodercli --mcp-config <json> --allowed-tools ... --append-system-prompt ...
    else Windows
        qodercli/mod.rs->>qodercli/mod.rs: "write pay_qodercli_mcp_config_{pid}.json"
        qodercli/mod.rs->>qodercli/mod.rs: "write pay_qodercli_launcher_{pid}.ps1"
        qodercli/mod.rs->>qodercli binary: powershell -File launcher.ps1
        qodercli/mod.rs->>qodercli/mod.rs: cleanup temp files (best-effort)
    end
    qodercli binary-->>User: interactive session with pay MCP
Loading

Reviews (4): Last reviewed commit: "feat(cli): add pay qodercli subcommand a..." | Re-trigger Greptile

Comment thread rust/crates/cli/src/commands/setup.rs Outdated
Comment thread rust/crates/cli/src/commands/qodercli/mod.rs
Comment thread rust/crates/cli/src/commands/qodercli/mod.rs Outdated
@radioheadz radioheadz force-pushed the feat/qodercli-support branch from dff8ab9 to f72e063 Compare June 12, 2026 03:25
Comment thread rust/crates/cli/src/commands/qodercli/mod.rs
@radioheadz radioheadz force-pushed the feat/qodercli-support branch from f72e063 to 1be189a Compare June 12, 2026 07:21
@radioheadz radioheadz force-pushed the feat/qodercli-support branch from 1be189a to 4ad2b87 Compare June 12, 2026 07:33
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.

1 participant