| layout | default |
|---|---|
| title | Chapter 4: File, Git, and Preview Workflows |
| nav_order | 4 |
| parent | Daytona Tutorial |
Welcome to Chapter 4: File, Git, and Preview Workflows. In this part of Daytona Tutorial: Secure Sandbox Infrastructure for AI-Generated Code, you will build an intuitive mental model first, then move into concrete implementation details and practical production tradeoffs.
This chapter maps the day-to-day development workflow inside Daytona sandboxes.
- manage file uploads, downloads, and directory operations
- clone and manipulate repositories in sandbox contexts
- expose running services with preview links
- keep preview and repo workflows reproducible for agents
Treat each sandbox as a disposable but scriptable workspace: hydrate files, clone code, run tasks, expose service previews for review, then persist artifacts through snapshots/volumes if needed.
You can now run a full code-to-preview loop inside Daytona with cleaner automation boundaries.
Next: Chapter 5: MCP Agent Integration and Tooling
flowchart TD
A[SDK call] --> B{Operation}
B -->|file upload/download| C[Sandbox filesystem]
B -->|git clone/commit/push| D[Git operations in sandbox]
B -->|preview link| E[Port-forwarded URL]
C --> F[Persistent file state]
D --> G[Source control synced]
E --> H[Browser-accessible preview]