orchestrate-multi-target-sdks
Skill17 starsChanged 10 months agoApache-2.0View on GitHub
Use when generating SDKs for multiple languages from a single OpenAPI spec, or multiple SDK variants from different sources. Covers workflow.yaml multi-target configuration, per-language gen.yaml, monorepo structure. Triggers on "multiple SDKs", "multi-language SDK", "SDK for each language", "multi-target SDK", "SDK monorepo", "generate SDKs for".
- Reads credentials
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- configure-sdk-optionsSkill
- customize-sdk-hooksSkill
- diagnose-generation-failureSkill
- extract-openapi-from-codeSkill
- generate-mcp-serverSkill
- generate-terraform-providerSkill
- improve-sdk-namingSkill
- manage-openapi-overlaysSkill
- orchestrate-multi-repo-sdksSkill
- setup-sdk-testingSkill
- speakeasy-contextSkill
- start-new-sdk-projectSkill
- writing-openapi-specsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Always use CLI commands: Never create .speakeasy directories manually.
- Distinctive: line 51
Add a new OpenAPI source to an existing workflow:
- Distinctive: line 75
Add a new SDK target to an existing workflow:
- Very specific: line 218
Do NOT create
.speakeasy/directories manually: - Use speakeasy quickstart and speakeasy configure - Very specific: line 219
Do NOT write
workflow.yamlorgen.yamlfiles directly: - Use CLI commands - Distinctive: line 253
After adding sources or targets, regenerate:
- Very specific: line 261
After modifying workflow.yaml or per-target gen.yaml, prompt the user to regenerate the SDK(s):
- Distinctive: line 265
If the user confirms, run:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Orchestrate Multi-Target SDKs
Generate SDKs for multiple languages or variants from a single repository using CLI commands.
When to Use
- Generating SDKs for multiple languages from the same API spec
- Creating SDK variants (Azure, GCP, regional) from different specs
- Setting up an SDK monorepo
- User says: "generate SDKs for multiple languages", "SDK for each language", "multi-target"
Quick Start: Multiple Languages
Always use CLI commands. Never create .speakeasy directories manually.
# Step 1: Initialize first target (creates .speakeasy/workflow.yaml)
speakeasy quickstart --skip-interactive --output console \
-s openapi.yaml -t typescript -n "MySDK" -p "my-sdk"
# Step 2: Add more language targets using configure
speakeasy configure targets \
--target-type python \
--source my-source \
--output ./sdks/python
speakeasy configure targets \
--target-type go \
--source my-source \
--output ./sdks/go
# Step 3: Generate all SDKs
speakeasy run --output consoleCLI Reference
speakeasy configure sources
Add a new OpenAPI source to an existing workflow:
speakeasy configure sources \
--location ./openapi.yaml \
--source-name my-api
# With authentication header
speakeasy configure sources \
--location https://api.example.com/openapi.yaml \
--source-name my-api \
--auth-header "Authorization"| Flag | Short | Description |
--location | -l | OpenAPI document location (file or URL) |
--source-name | -s | Name for the source |
--auth-header | Authentication header name (optional) | |
--output | -o | Output path for compiled source (optional) |
--non-interactive | Force non-interactive mode |
speakeasy configure targets
Add a new SDK target to an existing workflow:
speakeasy configure targets \
--target-type typescript \
--source my-api \
--output ./sdks/typescript
# With all options
speakeasy configure targets \
--target-type go \
--source my-api \
--target-name my-go-sdk \
--sdk-class-name MyAPI \
--package-name github.com/myorg/myapi-go \
--output ./sdks/go| Flag | Short | Description |
--target-type | -t | Language: typescript, python, go, java, csharp, php, ruby, terraform |
--source | -s | Name of source to generate from |
--target-name | Name for the target (defaults to target-type) | |
--sdk-class-name | SDK class name (optional) | |
--package-name | Package name (optional) | |
--base-server-url | Base server URL (optional) | |
--output | -o | Output directory (optional) |
--non-interactive | Force non-interactive mode |
Example: Multi-Language SDKs
Single OpenAPI spec → TypeScript, Python, Go SDKs:
# Initialize with first target
speakeasy quickstart --skip-interactive --output console \
-s ./openapi.yaml -t typescript -n "MySDK" -p "my-sdk" -o ./sdks/typescript
# Add Python
speakeasy configure targets \
--target-type python \
--source my-source \
--sdk-class-name MySDK \
--package-name my-sdk \
--output ./sdks/python
# Add Go
speakeasy configure targets \
--target-type go \
--source my-source \
--sdk-class-name MySDK \
--package-name github.com/myorg/my-sdk-go \
--output ./sdks/go
# Generate all
speakeasy run --output consoleExample: SDK Variants (Multiple Sources)
Different OpenAPI specs → variant SDKs:
# Initialize with main API
speakeasy quickstart --skip-interactive --output console \
-s ./openapi.yaml -t typescript -n "MySDK" -p "my-sdk"
# Add Azure variant source
speakeasy configure sources \
--location ./openapi-azure.yaml \
--source-name azure-api
# Add Azure target
speakeasy configure targets \
--target-type typescript \
--source azure-api \
--target-name typescript-azure \
--sdk-class-name MySDKAzure \
--package-name "@myorg/my-sdk-azure" \
--output ./packages/azure
# Generate all
speakeasy run --output consoleRepository Structure
my-api-sdks/
├── openapi.yaml # Source spec
├── .speakeasy/
│ └── workflow.yaml # Multi-target config (created by CLI)
├── sdks/
│ ├── typescript/
│ │ ├── .speakeasy/
│ │ │ └── gen.yaml # Created by configure
│ │ └── src/
│ ├── python/
│ │ ├── .speakeasy/
│ │ │ └── gen.yaml
│ │ └── src/
│ └── go/
│ ├── .speakeasy/
│ │ └── gen.yaml
│ └── go.mod
└── .github/workflows/
└── sdk_generation.yamlRunning Generation
# Generate all targets
speakeasy run --output console
# Generate specific target only
speakeasy run -t typescript --output console
speakeasy run -t python --output consoleCI Workflow
# .github/workflows/sdk_generation.yaml
name: Generate SDKs
on:
push:
branches: [main]
paths: ['openapi.yaml']
workflow_dispatch:
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
mode: pr
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}What NOT to Do
- Do NOT create
.speakeasy/directories manually - Usespeakeasy quickstartandspeakeasy configure - Do NOT write
workflow.yamlorgen.yamlfiles directly - Use CLI commands - Do NOT copy
.speakeasy/directories between projects - Each needs its own config
Incorrect
# WRONG: Do not do this
mkdir -p .speakeasy
cat > .speakeasy/workflow.yaml << 'EOF'
...
EOFCorrect
# RIGHT: Use CLI commands
speakeasy quickstart --skip-interactive --output console \
-s openapi.yaml -t typescript -n "MySDK" -p "my-sdk"
speakeasy configure targets --target-type python --source my-sourceTroubleshooting
| Issue | Solution |
| Wrong target generated | Specify -t target-name in speakeasy run |
| Source not found | Run speakeasy configure sources to add it |
| Target not found | Run speakeasy configure targets to add it |
| Config out of sync | Run speakeasy run to regenerate |
After Making Changes
After adding sources or targets, regenerate:
speakeasy run --output consoleAfter Making Changes
After modifying workflow.yaml or per-target gen.yaml, prompt the user to regenerate the SDK(s):
Configuration complete. Would you like to regenerate the SDK(s) now with
speakeasy run?
If the user confirms, run:
# Generate all targets
speakeasy run --output console
# Or generate a specific target
speakeasy run -t <target-name> --output consoleChanges to workflow.yaml and gen.yaml only take effect after regeneration.
Related Skills
start-new-sdk-project- Initial SDK setup for single targetconfigure-sdk-options- Language-specific gen.yaml optionsmanage-openapi-overlays- Spec customization with overlaysorchestrate-multi-repo-sdks- Separate repository per language
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

