start-new-sdk-project

Use when generating a new SDK from an OpenAPI spec. This is the PRIMARY skill for SDK generation. Triggers on "create SDK", "generate SDK", "new SDK", "quickstart", "TypeScript SDK", "Python SDK", "Go SDK", "Java SDK", "generate TypeScript", "generate Python", "generate Go", "make SDK", "build SDK", "SDK from OpenAPI", "SDK from spec", "initialize SDK project".

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "start-new-sdk-project" with this command: npx skills add speakeasy-api/skills/speakeasy-api-skills-start-new-sdk-project

start-new-sdk-project

Always use speakeasy quickstart to initialize a new SDK project. This is the ONLY correct command for new projects - it creates both the SDK and the essential .speakeasy/workflow.yaml configuration file.

⚠️ Never use speakeasy generate sdk for new projects - it does not create the workflow file needed for maintainable SDK development.

When to Use

  • Generating any SDK from an OpenAPI spec (TypeScript, Python, Go, Java, etc.)
  • Starting a brand new SDK project
  • No .speakeasy/workflow.yaml exists yet
  • First-time Speakeasy setup
  • User says: "generate SDK", "TypeScript SDK", "Python SDK", "Go SDK", "create SDK", "new SDK"

Inputs

InputRequiredDescription
OpenAPI specYesLocal file, URL, or registry source
Target languageYestypescript, python, go, java, csharp, php, ruby, kotlin, terraform
SDK nameYes (non-interactive)PascalCase name (e.g., AcmeSDK)
Package nameYes (non-interactive)Package identifier (e.g., acme-sdk)

Outputs

OutputLocation
Workflow config.speakeasy/workflow.yaml
Generated SDKOutput directory (default: current dir)

Prerequisites

For non-interactive environments (CI/CD, automation), set:

export SPEAKEASY_API_KEY="<your-api-key>"

Run speakeasy auth login to authenticate interactively, or set the SPEAKEASY_API_KEY environment variable.

Command

speakeasy quickstart --skip-interactive --output console -s <schema> -t <target> -n <name> -p <package-name>

Flags

FlagShortDescription
--skip-interactiveRequired for automation. Skips all prompts
--schema-sOpenAPI spec source (see Schema Sources below)
--target-tTarget language (see Supported Targets)
--name-nSDK name in PascalCase (e.g., MyCompanySDK)
--package-name-pPackage name (language variants auto-inferred)
--out-dir-oOutput directory (default: current dir)
--outputOutput format: summary, console, mermaid. Use console for automation
--init-gitInitialize git repo (omit to skip in non-interactive mode)

Schema Sources

The --schema flag accepts multiple source types:

TypeFormatExample
Local filePath./api/openapi.yaml
URLHTTP(S)https://api.example.com/openapi.json
Registry sourcesource-namemy-api
Registry source (tagged)source-name@tagmy-api@latest
Registry source (full)org/workspace/source@tagacme/prod/my-api@v2

Registry sources are OpenAPI specs you manage in your Speakeasy workspace. Use speakeasy pull --list --format json to see available sources. This lets you generate SDKs from specs managed in Speakeasy without needing local files.

Supported Targets

LanguageTarget Flag
TypeScripttypescript
Pythonpython
Gogo
Javajava
C#csharp
PHPphp
Rubyruby
Kotlinkotlin
Terraformterraform

Example

# From local OpenAPI file
speakeasy quickstart --skip-interactive --output console \
  -s ./api/openapi.yaml \
  -t typescript \
  -n "AcmeSDK" \
  -p "acme-sdk"

# From URL
speakeasy quickstart --skip-interactive --output console \
  -s "https://api.example.com/openapi.json" \
  -t python \
  -n "AcmeSDK" \
  -p "acme-sdk"

# From registry source (managed in your Speakeasy workspace)
speakeasy quickstart --skip-interactive --output console \
  -s "my-api@latest" \
  -t go \
  -n "AcmeSDK" \
  -p "acme-sdk"

# With custom output directory and git init
speakeasy quickstart --skip-interactive --output console \
  -s ./api/openapi.yaml \
  -t python \
  -n "AcmeSDK" \
  -p "acme-sdk" \
  -o ./sdks/python \
  --init-git

What It Creates

  1. Workflow configuration: .speakeasy/workflow.yaml
  2. Generated SDK: Full SDK in the output directory, ready to use

Next Steps After Quickstart

  1. Review the generated SDK in the output directory
  2. Add more targets to .speakeasy/workflow.yaml for multi-language support
  3. Run speakeasy run to regenerate after spec or config changes

Essential CLI Commands

CommandPurpose
speakeasy quickstart ...Initialize new SDK project
speakeasy run -y --output consoleRegenerate SDK from workflow
speakeasy lint openapi --non-interactive -s spec.yamlValidate OpenAPI spec
speakeasy auth loginAuthenticate with Speakeasy
speakeasy pull --list --format jsonList registry sources

What NOT to Do

  • Do NOT use speakeasy generate sdk for new projects. This low-level command generates code but does NOT create .speakeasy/workflow.yaml. Without a workflow file, you lose:

    • Reproducible builds via speakeasy run
    • Multi-target SDK generation
    • CI/CD integration
    • Version tracking and upgrade paths
  • Do NOT skip --skip-interactive in automated environments. The command will hang waiting for user input.

  • Do NOT omit --output console in automated environments. You need structured output to verify success.

quickstart vs generate sdk

CommandCreates workflow.yamlUse case
speakeasy quickstart✅ YesNew projects - Always use this
speakeasy generate sdk❌ NoOne-off generation (rare, advanced use only)

Always use quickstart for new SDK projects. The workflow file it creates is essential for maintainable SDK development.

Troubleshooting

ErrorCauseSolution
Workflow already exists.speakeasy/workflow.yaml already presentRun speakeasy run to regenerate the existing SDK instead
UnauthorizedMissing or invalid API keyRun speakeasy auth login or set SPEAKEASY_API_KEY
Schema not foundInvalid path, URL, or source nameVerify path exists or use speakeasy pull --list for sources

Related Skills

  • diagnose-generation-failure - When generation fails
  • manage-openapi-overlays - Customize spec with overlays
  • configure-sdk-options - Language-specific gen.yaml configuration for all supported languages

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

extract-openapi-from-code

No summary provided by upstream source.

Repository SourceNeeds Review
General

writing-openapi-specs

No summary provided by upstream source.

Repository SourceNeeds Review
General

speakeasy-context

No summary provided by upstream source.

Repository SourceNeeds Review