Skip to content

feat: generate SDK for TypeScript and Python #623

Merged
jdx merged 28 commits into
jdx:mainfrom
gaojunran:feat-sdk-python-ts
Jun 5, 2026
Merged

feat: generate SDK for TypeScript and Python #623
jdx merged 28 commits into
jdx:mainfrom
gaojunran:feat-sdk-python-ts

Conversation

@gaojunran

@gaojunran gaojunran commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

New Features

  • Added generate sdk command to generate type-safe SDK client libraries from usage specs in TypeScript and Python
  • Generated SDKs provide command types, client interfaces, and execution methods for programmatic CLI access

Documentation

  • Added comprehensive SDK generation guide and CLI reference documentation

gaojunran and others added 8 commits May 3, 2026 18:20
…sive tests

- Fix var=true boolean flag typed as Optional[bool] in Python
- Fix -- separator ordering for double_dash=required args
- Fix Python var flag default type mismatch
- Align SDK tests across Python and TypeScript
- Add ~30 new Python tests and ~14 new TypeScript tests
- Add compile/import validation tests for Python and TypeScript
- Mark Rust SDK as coming soon in docs
- Add Typer and Click integration links
- Python: add client_edge_cases, config_and_flag_edge_cases,
  double_dash_automatic
- TypeScript: add config_boolean_default_false,
  config_string_with_default, example_without_lang, flag_edge_cases,
  global_flags_flags_only, double_dash_automatic
@codecov

codecov Bot commented May 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.79608% with 85 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.31%. Comparing base (beb1a66) to head (3bc509a).
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/sdk/python/mod.rs 97.17% 27 Missing and 7 partials ⚠️
cli/src/cli/generate/sdk.rs 0.00% 22 Missing ⚠️
lib/src/sdk/typescript/types.rs 97.68% 14 Missing and 5 partials ⚠️
lib/src/sdk/typescript/wrappers.rs 97.98% 4 Missing and 2 partials ⚠️
lib/src/sdk/mod.rs 98.92% 1 Missing and 2 partials ⚠️
cli/src/cli/generate/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #623      +/-   ##
==========================================
+ Coverage   78.94%   79.31%   +0.37%     
==========================================
  Files          49       56       +7     
  Lines        7284    10487    +3203     
  Branches     7284    10487    +3203     
==========================================
+ Hits         5750     8318    +2568     
- Misses       1147     1409     +262     
- Partials      387      760     +373     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Remove Rust SDK module, language enum variant, CLI option, and all
snapshot files. Rust SDK will be re-added in a future update.
@gaojunran gaojunran force-pushed the feat-sdk-python-ts branch from f9986cc to 44a8480 Compare May 4, 2026 08:17
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini is experiencing higher than usual traffic and was unable to create the review. Please try again in a few hours by commenting /gemini review.

@greptile-apps

greptile-apps Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces a generate sdk subcommand and the full Rust code-generation pipeline for TypeScript and Python SDKs from usage specs. Each generated SDK includes typed arg/flag dataclasses (or interfaces), per-command client classes with an exec method, a runtime module, and a package entry point.

  • TypeScript: generates types.ts (choice unions, GlobalFlags, per-command *Args/*Flags interfaces), client.ts (async exec + buildFlagArgs per class), and runtime.ts (async spawn-based CliRunner). String escaping, reserved-word sanitization, and global-flag deduplication all appear correctly handled.
  • Python: generates types.py (choice Literal types, GlobalFlags dataclass, per-command dataclasses), client.py (synchronous exec + _build_flag_args per class), runtime.py (subprocess-based CliRunner). Global flags are flattened into each subcommand's *Flags dataclass, and from __future__ import annotations is present throughout.
  • Both targets have extensive snapshot tests plus an integration compile test (sdk_compile.rs) that validates generated output against python3 and npx tsc.

Confidence Score: 5/5

The generated output is safe; string escaping, reserved-word sanitization, and choice-collision detection look correct across both targets.

Escape helpers are applied consistently, sanitize_ident covers exec/runner/buildFlagArgs, global flags are correctly deduplicated in TypeScript interface bodies and Python _build_flag_args loops, and from future import annotations is present in all three Python files. Snapshot and integration compile tests provide strong regression coverage.

No files require special attention.

Important Files Changed

Filename Overview
lib/src/sdk/mod.rs Core SDK module: defines shared types, CodeWriter, ChoiceTypeMap, escape helpers, and choice-collision detection. Well-implemented with correct escaping for both targets.
lib/src/sdk/typescript/types.rs Generates types.ts: GlobalFlags interface, per-command Args/Flags interfaces, choice union types. escape_ts_string applied throughout; global flags filtered from subcommand interface bodies; sanitize_ident includes exec/runner/buildFlagArgs.
lib/src/sdk/typescript/wrappers.rs Generates client.ts: per-command classes with async exec() and private buildFlagArgs(). escape_ts_string applied to bin_name, flag arg names, and subcmd path elements. Global flags deduped in buildFlagArgs.
lib/src/sdk/python/mod.rs Generates Python SDK files. escape_py_string/escape_py_docstring applied throughout; sanitize_py_comment sanitizes newlines in # comments; render_flags_dataclass correctly flattens global+own flags.
lib/src/sdk/python/runtime.rs Embeds runtime.py: synchronous CliRunner using subprocess.run(). Includes from future import annotations for Python 3.7/3.8 compatibility.
lib/tests/sdk_compile.rs Integration compile tests gated on python3/npx availability; validates generated SDK against both toolchains using a comprehensive full_spec().
cli/src/cli/generate/sdk.rs CLI subcommand for generate sdk with --language, --output, --package-name options; writes generated files to output directory.

Reviews (20): Last reviewed commit: "fix(sdk): validate count-flag default as..." | Re-trigger Greptile

Comment thread lib/src/sdk/python/runtime.rs
Comment thread lib/src/sdk/typescript/mod.rs
Comment thread lib/src/sdk/typescript/wrappers.rs
Comment thread lib/src/sdk/python/mod.rs
Comment thread docs/cli/sdk.md Outdated
gaojunran added 2 commits May 4, 2026 16:35
- P2: re-export CliResult/CliRunner from Python __init__.py and
  CliResult from TypeScript index.ts
- P2: escape */ in JSDoc and triple-quote in Python docstrings to
  prevent premature termination from user-supplied spec text
- P2: fix unreachable "True"/"False"/"None" in sanitize_py_ident
  (heck::AsSnakeCase lowercases before match)
- P2: remove incorrect await from docs synchronous API example
Replace spawnSync with spawn + Promise wrapper in runtime.ts. All
exec() methods now return Promise<CliResult> and are marked async,
which is more idiomatic for Node.js and avoids blocking the event
loop on subprocess calls.

Update docs examples to use await. Update all TypeScript snapshots.
@gaojunran gaojunran force-pushed the feat-sdk-python-ts branch from 059c78e to 5b958fc Compare May 4, 2026 08:42
Comment thread lib/src/sdk/python/mod.rs Outdated
…types

- P1: escape backslashes and double quotes in Python string defaults
  (config props, arg defaults, flag defaults, VERSION/ABOUT/AUTHOR,
  bin_path). Add escape_py_string() and escape_ts_string() helpers.
- P2: export CliError from TypeScript index.ts
- P2: stop emitting empty XxxFlags extends GlobalFlags {} interfaces
  in types.ts when subcommands only have global flags with no local
  flags — client.ts already uses GlobalFlags directly in this case
Comment thread lib/src/sdk/typescript/wrappers.rs Outdated
Comment thread lib/src/sdk/typescript/types.rs
Comment thread lib/src/sdk/typescript/wrappers.rs
gaojunran added 2 commits May 4, 2026 17:40
- Python: escape choice values, cmd path elements, flag_arg_name,
  negate flag names in string literals; escape alias docstrings
- TypeScript: escape choice values in type unions, cmd path elements
  in subcmd_path, bin_name in constructor, flag_arg_name, negate
  flag names in string literals

Note: flag short names (char type) cannot contain " or \ so they
do not need escaping.
…gment

- Python: render multi-part exec docstrings as proper multiline
  docstrings instead of single-line with embedded \n
- docs: fix broken sentence from Rust SDK removal
  (child_process.spawn / not -> child_process.spawn, not)
@gaojunran gaojunran force-pushed the feat-sdk-python-ts branch 2 times, most recently from 20bf555 to 6c483d9 Compare May 4, 2026 10:51
Comment thread lib/src/sdk/typescript/types.rs
Python render_command_types was generating {name}Flags dataclasses
for subcommands that only inherit global flags (no local flags).
Since client.py uses GlobalFlags directly for these cases, the
generated dataclass was dead code. Now only emit Flags dataclass
when there are local visible flags, matching the TypeScript fix.
@gaojunran gaojunran force-pushed the feat-sdk-python-ts branch from 1f8596e to dd222a2 Compare May 4, 2026 11:05
@gaojunran gaojunran closed this May 4, 2026
@gaojunran gaojunran reopened this May 4, 2026
@gaojunran gaojunran marked this pull request as ready for review May 4, 2026 11:38
Comment thread lib/src/lib.rs Outdated
#[cfg(feature = "docs")]
pub mod docs;
pub mod parse;
#[cfg(feature = "sdk")]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add a feature?

@gaojunran gaojunran May 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add a feature?

I found it relatively independent and make it a feature. Should we remove it?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@gaojunran

Copy link
Copy Markdown
Contributor Author

@greptileai

Comment thread lib/src/sdk/typescript/types.rs
Comment thread lib/src/sdk/python/mod.rs
@gaojunran gaojunran marked this pull request as draft May 17, 2026 14:05
@gaojunran

Copy link
Copy Markdown
Contributor Author

@greptileai

Comment thread lib/src/sdk/typescript/types.rs
Comment thread lib/src/sdk/python/mod.rs
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR introduces comprehensive SDK generation for TypeScript and Python, allowing developers to generate type-safe client libraries from CLI usage specs. The implementation spans CLI integration, core infrastructure, language-specific generators, documentation, and validation tests.

Changes

SDK Generation Feature

Layer / File(s) Summary
CLI command integration
cli/assets/fig.ts, cli/assets/usage.1, cli/usage.usage.kdl, cli/src/cli/generate/mod.rs, cli/src/cli/generate/sdk.rs
New generate sdk subcommand accepts a spec file or raw spec string, target language (typescript/python), output directory, and optional package name. Resolves the spec, generates SDK files via the core generator, and writes outputs to disk.
Core SDK infrastructure
lib/src/lib.rs, lib/src/sdk/mod.rs, lib/src/spec/mod.rs
Defines SdkLanguage, SdkOptions, SdkOutput, SdkFile types and implements a language dispatcher. Provides CodeWriter for indentation-aware code generation, choice-type collision detection with ChoiceTypeMap, and shared utility functions (escaping, header generation, type import collection).
TypeScript SDK generation
lib/src/sdk/typescript/mod.rs, lib/src/sdk/typescript/runtime.rs, lib/src/sdk/typescript/types.rs, lib/src/sdk/typescript/wrappers.rs
Generates types.ts (interfaces for args, flags, choices, config), client.ts (command classes with exec methods), runtime.ts (CliResult/CliError/CliRunner for subprocess execution), and index.ts (module exports). Includes comprehensive type and client generation test coverage.
Python SDK generation
lib/src/sdk/python/mod.rs, lib/src/sdk/python/runtime.rs
Generates types.py (dataclasses for args, flags, choice literals, config), client.py (command classes with adaptive exec signatures), runtime.py (CliResult/CliRunner), and __init__.py (package exports). Includes snapshot tests and edge case coverage for flags, arguments, and subcommand variations.
Documentation
docs/.vitepress/config.mts, docs/cli/reference/commands.json, docs/cli/reference/generate.md, docs/cli/reference/generate/sdk.md, docs/cli/reference/index.md, docs/cli/sdk.md, docs/spec/index.md
Comprehensive user guide explaining SDK use cases (CLIs without native bindings, version synchronization), quick start examples for TypeScript and Python, supported languages, internal three-module structure, and generated reference documentation.
Testing and configuration
lib/Cargo.toml, lib/tests/sdk_compile.rs, mise.toml
Adds integration tests that generate SDKs from a full CLI spec and validate by importing/type-checking the outputs. Python test runs import checks via python3; TypeScript test runs strict tsc type-checking. Configures tool versions for Python and npm:tsc.

Sequence Diagram

sequenceDiagram
  participant User as User/CLI
  participant Generate as generate::Sdk
  participant SdkCore as sdk::generate
  participant TypeScript as typescript::generate
  participant Python as python::generate
  participant Output as Output Files

  User->>Generate: generate sdk --file spec.yaml --language typescript --output ./sdk
  Generate->>Generate: parse spec, validate language
  Generate->>SdkCore: generate(&spec, &SdkOptions)
  alt language == TypeScript
    SdkCore->>TypeScript: generate(&spec, &opts)
    TypeScript->>TypeScript: render types.ts, client.ts, runtime.ts, index.ts
    TypeScript-->>SdkCore: SdkOutput
  else language == Python
    SdkCore->>Python: generate(&spec, &opts)
    Python->>Python: render types.py, client.py, runtime.py, __init__.py
    Python-->>SdkCore: SdkOutput
  end
  SdkCore-->>Generate: SdkOutput
  Generate->>Generate: ensure output directory
  Generate->>Output: write each file
  Output-->>User: SDK files written to ./sdk
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 A rabbit's ode to SDKs

From specs to code, the CLI's voice,
Now speaks in Python, TypeScript's choice!
With types so safe and runners true,
The SDKs hop straight through.
No more stringly-typed cheer—
The magic wand of choice is here! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: generate SDK for TypeScript and Python' directly and clearly summarizes the main change in the pull request—adding SDK generation capabilities for TypeScript and Python languages.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@gaojunran gaojunran force-pushed the feat-sdk-python-ts branch from 1b024e3 to 384176d Compare June 5, 2026 08:41
@gaojunran gaojunran marked this pull request as ready for review June 5, 2026 12:56
@gaojunran

Copy link
Copy Markdown
Contributor Author

@jdx ready for review! sorry for being late!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
lib/tests/sdk_compile.rs (2)

164-167: ⚡ Quick win

Move npm availability check earlier.

The npm existence check is performed after generating the SDK, creating the temp directory, and writing files. If npm is not available, this work is wasted. Consider moving this check to the start of the test alongside the npx_tsc_available() check for better efficiency.

♻️ Suggested reordering

Move lines 164-167 to after line 148:

#[test]
fn test_typescript_sdk_typechecks() {
    if !npx_tsc_available() {
        eprintln!("Skipping TypeScript SDK typecheck test - tsc not available via npx");
        return;
    }
    
    if !tool_exists("npm") {
        eprintln!("Skipping TypeScript SDK typecheck test - npm not found");
        return;
    }

    let spec = full_spec();
    // ... rest of test
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/tests/sdk_compile.rs` around lines 164 - 167, Move the npm availability
check earlier in the test to avoid doing work when npm is missing: in the
test_typescript_sdk_typechecks function, place the tool_exists("npm") check
right after the existing npx_tsc_available() check (so both precondition checks
run before creating the temp dir, generating the SDK, or writing files), and
keep the same eprintln! message and early return behavior.

190-202: Note: tsconfig requires TypeScript 5.0+.

The "moduleResolution": "bundler" option was introduced in TypeScript 5.0. Since mise.toml specifies "latest" for the TypeScript version, this should work correctly. However, if developers use older TypeScript versions locally, this test may fail.

Consider adding a comment documenting this requirement, or explicitly checking the TypeScript version if broader compatibility is needed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/tests/sdk_compile.rs` around lines 190 - 202, The embedded tsconfig
string assigned to tsconfig uses "moduleResolution": "bundler" which requires
TypeScript 5.0+; update the test to either add an inline comment near the
tsconfig variable noting the TypeScript 5.0+ requirement or add a runtime
version check before running the test (e.g., detect the installed tsc version
and skip the test if <5.0) so local older TypeScript installations don't cause
spurious failures; reference the tsconfig variable in sdk_compile.rs and
implement the chosen mitigation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cli/assets/fig.ts`:
- Line 465: Update the --file flag description to document stdin support: change
the description string (currently "A usage spec taken in as a file") to mention
that "-" can be used to read from stdin (consistent with other generate
commands). Reference the --file flag description in cli/assets/fig.ts and the
helper file_or_spec which accepts "-" as the stdin sentinel so users know they
can pass "-" to read from standard input.

In `@cli/assets/usage.1`:
- Line 325: Update the --file flag description for the "A usage spec taken in as
a file" entry to mention stdin support (that "-" will read from stdin) so it
matches other generate commands; locate the usage text for the usage spec entry
in the cli/assets/usage.1 content and append a short phrase like 'use "-" to
read from stdin' to the --file flag description to reflect existing
implementation behavior.

In `@cli/src/cli/generate/sdk.rs`:
- Line 12: Update the doc comment on the usage spec in
cli/src/cli/generate/sdk.rs (the line currently "/// A usage spec taken in as a
file") to document that passing "-" will read the spec from stdin, matching the
behavior of generate::file_or_spec; keep the wording concise and reference "-"
as the stdin convention so it aligns with other generate commands' docs.

In `@cli/usage.usage.kdl`:
- Line 139: Update the help text for the flag declaration flag "-f --file" in
the usage command to explicitly note it accepts "-" / stdin (e.g., "A usage spec
taken in as a file or '-' to read from stdin") so it matches other generate
commands and actual implementation behavior; change the help string in the flag
"-f --file" declaration accordingly.

In `@docs/cli/reference/commands.json`:
- Line 753: Update the usage help text to document stdin support: modify the
"help" string for the usage spec (the JSON entry with "help": "A usage spec
taken in as a file") to mention that stdin is accepted (e.g., "A usage spec
taken from a file or from stdin"), then update the source KDL spec
(cli/usage.usage.kdl) accordingly and regenerate the commands.json so the change
is reflected in the generated output.

---

Nitpick comments:
In `@lib/tests/sdk_compile.rs`:
- Around line 164-167: Move the npm availability check earlier in the test to
avoid doing work when npm is missing: in the test_typescript_sdk_typechecks
function, place the tool_exists("npm") check right after the existing
npx_tsc_available() check (so both precondition checks run before creating the
temp dir, generating the SDK, or writing files), and keep the same eprintln!
message and early return behavior.
- Around line 190-202: The embedded tsconfig string assigned to tsconfig uses
"moduleResolution": "bundler" which requires TypeScript 5.0+; update the test to
either add an inline comment near the tsconfig variable noting the TypeScript
5.0+ requirement or add a runtime version check before running the test (e.g.,
detect the installed tsc version and skip the test if <5.0) so local older
TypeScript installations don't cause spurious failures; reference the tsconfig
variable in sdk_compile.rs and implement the chosen mitigation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 64c1e291-016d-4d1e-8e11-07e9123e0c39

📥 Commits

Reviewing files that changed from the base of the PR and between 163804e and 3bc509a.

⛔ Files ignored due to path filters (71)
  • Cargo.lock is excluded by !**/*.lock
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_boolean_flag_default_false.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_choice_collision.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_client.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_client_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_config_all_optional.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_config_and_flag_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_config_boolean_default_false.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_config_props.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_config_string_with_default.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_count_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_deep_nesting.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_double_dash_automatic.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_example_without_lang.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_exec_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_flag_edge_cases-2.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_flag_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_flag_with_choices.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_flag_with_env.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_flags_only_subcommand.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_full_feature_client.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_full_feature_types.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_global_flags_flags_only.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_global_repeatable_flags.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_hyphenated_subcommands.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_init.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_minimal.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_multiple_aliases.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_negate_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_optional_arg_empty_flags.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_optional_variadic_arg.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_package_name_override.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_required_flag_type.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_runtime.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_types.snap is excluded by !**/*.snap
  • lib/src/sdk/python/snapshots/usage__sdk__python__tests__python_var_value_flag_with_default.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__choice_collision.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__deep_nesting.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__flags_only_subcommand.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__full_feature_client.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__full_feature_types.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__hyphenated_subcommands.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__minimal_spec.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__package_name_override.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_arg_defaults.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_boolean_flag_default_false.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_client.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_client_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_config_all_optional.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_config_and_flag_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_config_boolean_default_false.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_config_string_with_default.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_count_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_double_dash_automatic.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_example_without_lang.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_flag_edge_cases-2.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_flag_edge_cases.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_flag_with_choices.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_flag_with_env.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_global_flags_flags_only.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_global_repeatable_flags.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_index.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_multiple_aliases.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_negate_flag_build.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_optional_arg_empty_flags.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_optional_variadic_arg.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_required_flag_type.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_runtime.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_types.snap is excluded by !**/*.snap
  • lib/src/sdk/typescript/snapshots/usage__sdk__typescript__types__tests__typescript_var_value_flag_with_default.snap is excluded by !**/*.snap
  • mise.lock is excluded by !**/*.lock
📒 Files selected for processing (24)
  • cli/assets/fig.ts
  • cli/assets/usage.1
  • cli/src/cli/generate/mod.rs
  • cli/src/cli/generate/sdk.rs
  • cli/usage.usage.kdl
  • docs/.vitepress/config.mts
  • docs/cli/reference/commands.json
  • docs/cli/reference/generate.md
  • docs/cli/reference/generate/sdk.md
  • docs/cli/reference/index.md
  • docs/cli/sdk.md
  • docs/spec/index.md
  • lib/Cargo.toml
  • lib/src/lib.rs
  • lib/src/sdk/mod.rs
  • lib/src/sdk/python/mod.rs
  • lib/src/sdk/python/runtime.rs
  • lib/src/sdk/typescript/mod.rs
  • lib/src/sdk/typescript/runtime.rs
  • lib/src/sdk/typescript/types.rs
  • lib/src/sdk/typescript/wrappers.rs
  • lib/src/spec/mod.rs
  • lib/tests/sdk_compile.rs
  • mise.toml

Comment thread cli/assets/fig.ts
Comment thread cli/assets/usage.1
Comment thread cli/src/cli/generate/sdk.rs
Comment thread cli/usage.usage.kdl
Comment thread docs/cli/reference/commands.json
@jdx jdx merged commit 9ab1095 into jdx:main Jun 5, 2026
7 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