Publishing & Packaging SDKs
Relevant source files
The following files were used as context for generating this wiki page:
The Daytona project maintains a suite of Software Development Kits (SDKs) for Python, TypeScript, Ruby, and Go. These SDKs are published to their respective package registries (PyPI, npm, RubyGems) to enable programmatic management of isolated development sandboxes. The process involves specific versioning requirements, automated CI/CD workflows, and strict packaging guidelines to maintain project identity and security.
Sources: PUBLISHING.md:1-10, README.md:100-120
Release Workflows
Daytona utilizes Nx as the build system to orchestrate the building and publishing of SDKs from the repository root. This unified approach ensures that dependencies are managed and packages are released in the correct order.
Manual Publishing
Maintainers can manually trigger releases using Nx commands after setting the required environment variables for authentication and versioning.
| Registry | Command | Version Var | Token Var |
|---|---|---|---|
| PyPI (Python) | yarn nx publish sdk-python | PYPI_PKG_VERSION | PYPI_TOKEN |
| npm (TS) | yarn nx publish sdk-typescript | NPM_PKG_VERSION | NPM_TOKEN |
| RubyGems (Ruby) | yarn nx publish sdk-ruby | RUBYGEMS_PKG_VERSION | RUBYGEMS_API_KEY |
Sources: PUBLISHING.md:21-48, libs/sdk-ruby/README.md:54-65
Automated Publishing (CI/CD)
The repository uses a GitHub Actions workflow (.github/workflows/sdk_publish.yaml) for automated releases. This workflow handles environment setup for Go, Java, Python, Node.js, and Ruby, configures credentials, and executes yarn publish to release all SDKs.
The workflow updates the Homebrew tap for the CLI as the final step in the release process.
Sources: PUBLISHING.md:50-75
Version Management
Version management follows Semantic Versioning (SemVer) for stable releases, while pre-release formats vary by language to comply with ecosystem-specific standards.
Versioning Formats
| Language | Registry | Release Format | Pre-release Example |
|---|---|---|---|
| TypeScript | npm | MAJOR.MINOR.PATCH | 0.126.0-alpha.1 |
| Python | PyPI | PEP 440 | 1.2.0a1 |
| Ruby | RubyGems | RubyGems standard | 0.126.0.alpha.1 |
Sources: PUBLISHING.md:77-105
Build and Versioning Targets
In libs/sdk-go/project.json and libs/sdk-python/project.json, the project defines specific targets for versioning. For example, the set-version target in the Go SDK writes the version string to a file, which is then added to a chore commit during the prepare-release stage.
Sources: libs/sdk-go/project.json:104-123, libs/sdk-python/project.json:57-77
Packaging Guidelines
The project enforces strict guidelines for third-party distributions to prevent confusion between official and community-maintained packages.
Naming Restrictions
Third-party packagers MUST NOT use the name daytona or suggest official endorsement.
- Acceptable:
unofficial-daytona-package - Unacceptable:
daytona,official-daytona
Distribution Requirements
- License Compliance: Must include AGPL 3.0 or Apache 2.0 license and preserve copyright notices.
- Version Accuracy: Must use exact version numbers without modification.
- Mandatory Note: Distributers must include a standard note stating the package is an unofficial distribution.
Sources: PACKAGING.md:5-35
Build System Integration
Nx manages the build graph, ensuring that API clients are generated or published before the SDKs that depend on them.
In libs/sdk-python/project.json, the publish target specifically runs poetry publish twice: once for the internal daytona_sdk name and once for the public daytona name.
Sources: libs/sdk-python/project.json:62-75, nx.json:160-200, libs/sdk-go/project.json:7-20
Documentation Generation
As part of the packaging process, documentation is generated from source code to be hosted in the central docs application.
- Ruby: Uses a custom script
generate-docs.rbwith YARD to create.mdxfiles. - Go: Uses
gomarkdocwith templates for files, functions, and types. - Python: Uses
pydoc-markdownwith specific configurations for sync and async modules.
Sources: libs/sdk-ruby/scripts/generate-docs.rb:8-30, libs/sdk-go/project.json:76-92, libs/sdk-python/package.json:8-15
The publishing and packaging system ensures that Daytona SDKs are consistently versioned, documented, and distributed across multiple ecosystems while protecting the project's intellectual property and brand identity through clear packaging mandates.