Daytona
Daytona is a Secure and Elastic Infrastructure for Running AI-Generated Code
Install / Use
/learn @daytonaio/DaytonaREADME
<div align="center">
</div>
<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/daytonaio/daytona/raw/main/assets/images/Daytona-logotype-white.png"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/daytonaio/daytona/raw/main/assets/images/Daytona-logotype-black.png"> <img alt="Daytona logo" src="https://github.com/daytonaio/daytona/raw/main/assets/images/Daytona-logotype-black.png" width="50%"> </picture> </div> <h3 align="center"> Run AI Code. <br/> Secure and Elastic Infrastructure for Running Your AI-Generated Code. </h3> <p align="center"> <a href="https://www.daytona.io/docs"> Documentation </a>· <a href="https://github.com/daytonaio/daytona/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=%F0%9F%90%9B+Bug+Report%3A+"> Report Bug </a>· <a href="https://github.com/daytonaio/daytona/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=%F0%9F%9A%80+Feature%3A+"> Request Feature </a>· <a href="https://go.daytona.io/slack"> Join our Slack </a>· <a href="https://x.com/daytonaio"> Connect on X </a> </p> <p align="center"> <a href="https://www.producthunt.com/posts/daytona-2?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-daytona-2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=957617&theme=neutral&period=daily&t=1746176740150" alt="Daytona  - Secure and elastic infra for running your AI-generated code. | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> <a href="https://www.producthunt.com/posts/daytona-2?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-daytona-2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=957617&theme=neutral&period=monthly&topic_id=237&t=1746176740150" alt="Daytona  - Secure and elastic infra for running your AI-generated code. | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> </p>
Installation
Python SDK
pip install daytona
TypeScript SDK
npm install @daytonaio/sdk
Ruby SDK
gem install daytona
Go SDK
go get github.com/daytonaio/daytona/libs/sdk-go
Features
- Lightning-Fast Infrastructure: Sub-90ms Sandbox creation from code to execution.
- Separated & Isolated Runtime: Execute AI-generated code with zero risk to your infrastructure.
- Massive Parallelization for Concurrent AI Workflows: Fork Sandbox filesystem and memory state (Coming soon!)
- Programmatic Control: File, Git, LSP, and Execute API
- Unlimited Persistence: Your Sandboxes can live forever
- OCI/Docker Compatibility: Use any OCI/Docker image to create a Sandbox
Quick Start
- Create an account at app.daytona.io
- Generate a new API key
- Follow documentation to start using Daytona
Creating your first Sandbox
Python SDK
from daytona import Daytona, DaytonaConfig
config = DaytonaConfig(api_key="YOUR_API_KEY")
daytona = Daytona(config)
sandbox = daytona.create()
response = sandbox.process.code_run('print("Hello World!")')
print(response.result)
Typescript SDK
import { Daytona } from "@daytonaio/sdk";
const daytona = new Daytona({apiKey: "YOUR_API_KEY"});
const sandbox = await daytona.create();
const response = await sandbox.process.codeRun('print("Hello World!")');
console.log(response.result);
Ruby SDK
require 'daytona'
config = Daytona::Config.new(api_key: 'YOUR_API_KEY')
daytona = Daytona::Daytona.new(config)
sandbox = daytona.create
response = sandbox.process.code_run(code: 'print("Hello World!")')
puts response.result
Go SDK
package main
import (
"context"
"fmt"
"github.com/daytonaio/daytona/libs/sdk-go/pkg/daytona"
"github.com/daytonaio/daytona/libs/sdk-go/pkg/types"
)
func main() {
config := &types.DaytonaConfig{APIKey: "YOUR_API_KEY"}
client, _ := daytona.NewClientWithConfig(config)
ctx := context.Background()
sandbox, _ := client.Create(ctx, nil)
response, _ := sandbox.Process.ExecuteCommand(ctx, "echo 'Hello World!'")
fmt.Println(response.Result)
}
Contributing
Daytona is Open Source under the GNU AFFERO GENERAL PUBLIC LICENSE, and is the copyright of its contributors. If you would like to contribute to the software, read the Developer Certificate of Origin Version 1.1 (https://developercertificate.org/). Afterwards, navigate to the contributing guide to get started.
