-
Notifications
You must be signed in to change notification settings - Fork 27
🤖 feat(cli): add mux api subcommand with oRPC proxy #874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
34bae5e to
9602beb
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Replace manual argv parsing with commander.js to provide proper subcommand handling, automatic help generation, and conventional -v/--version flags. Adds trpc-cli as a dependency (likely for future oRPC CLI tooling).
Integrates trpc-cli to expose the oRPC router as CLI commands, enabling scripted interactions without running the full desktop app or server. Services are lazily initialized only when the api subcommand is invoked to avoid startup overhead for other commands.
Instead of initializing services locally, the api subcommand now proxies oRPC procedure calls to a running mux server. This avoids the heavyweight service initialization when using the CLI and ensures consistent behavior with the server. Key changes: - Add proxifyOrpc utility that wraps an oRPC router to forward calls via HTTPRPCLink to a remote server - Lazily import trpc-cli only when api command is invoked - Remove inline service context creation from CLI entry point - Enhance Zod 4 schema descriptions for better CLI help output
Enhance the proxifyOrpc schema description system to produce readable, hierarchical help output for complex Zod schemas. Previously, the CLI showed raw JSON Schema (anyOf, oneOf) for unions and nested objects. Key changes: - Add hierarchical YAML-like formatting for nested objects - Separate required/optional fields with clear headers - Handle discriminated unions by showing variant labels - Detect common discriminators (type/kind/tag) in plain unions - Replace complex fields with z.any().describe() to prevent trpc-cli from appending JSON Schema noise to descriptions - Convert void/undefined inputs to empty object schema for proper JSON Schema conversion - Preserve _zod property for Zod 4 detection in trpc-cli - Simplify api.ts by removing function wrapper and module-level init - Rename "oRPC API" to "mux API" for consistency
9602beb to
a808f8a
Compare
Summary
mux apisubcommand that exposes oRPC procedures via trpc-cliGenerated with
mux