Skip to content

Projects

Projects represent a comprehensive set of settings and resources that define how your code is managed, built, and deployed within a Workspace. Each Project is associated with a specific repository and contains the necessary configurations to ensure a consistent development environment.

Project Configuration

A project configuration is designed to simplify the management of development environments, allowing you to predefine settings that can be easily applied to any new or existing Workspace.

A project configuration contains all necessary properties to define and manage projects within a Workspace. It stores information such as the repository URL, build configuration, and environment variables. This allows for easy reuse of previously set configurations, ensuring a consistent and reproducible setup across multiple Workspaces.

A project configuration encapsulates all the essential elements for setting up a project, including:

  • Repository URL

    The URL of the Git repository associated with the Project.

  • Build Configuration

    • Automatic auto-detects the most appropriate Builder for your project.
    • Devcontainer utilizes a predefined development container specified by a devcontainer.json file.
    • Custom image builds the Project image by specifying a custom base container.
    • None builds a Project by using the default base image (daytonaio/workspace-project).
  • Environment Variables

    Environment variables are specified in the KEY=VALUE format. These variables are essential for the Project’s build and runtime environments. You can set the variables directly or pass them from the machine’s environment during execution.

  • Project Configuration name

    A unique identifier for the Project Configuration, which distinguishes it from other configurations within the system.

With the daytona project-config command, you can add, view, update, list, set as default, or delete Project Configurations, giving you full control over the configuration and reuse of your Project setups across different Workspaces.

Add a Project Configuration

Daytona allows you to add a new Project Configuration, enabling you to store and reuse project properties across multiple Workspaces.

  1. Run the following command to add a new Project Configuration:
Terminal window
daytona project-config add
  1. Enter the repository URL of the project you want to configure.
Git repository
>
  1. Select the build configuration for the project.
Choose a build configuration
Automatic
Devcontainer
Custom image
None
  1. Enter the environment variables for the project in the KEY=VALUE format.
Environment Variables
Enter environment variables in the format KEY=VALUE
To pass machine env variables at runtime, use $VALUE
  1. Enter a name for the Project Configuration.
Project config name
>

Upon completion, Daytona will save the Project Configuration, allowing you to reuse it across multiple Workspaces.

Project Configuration Information

Daytona allows you to view detailed information of a Project Configuration, providing you with an overview of the properties stored within it.

  1. Run the following command to view the details of a Project Configuration:
Terminal window
daytona project-config info

Upon running this command, Daytona will display a list of your Project Configurations

  1. Select the Project Configuration you want to view.
Select a Project Config To View
1 item
┃ MyProjectConfig
┃ https://github.com/username/MyProject

Upon selecting the Project Configuration, Daytona will display the details of the selected configuration. You will be able to view the Project Configuration name, the repository URL it is linked to, the build configuration, and the Devcontainer path.

Project Config Info
Name MyProjectConfig
Repository https://github.com/username/MyProject
Build Devcontainer
Devcontainer path .devcontainer/devcontainer.json

List Project Configuration

Daytona allows you to list all Project Configurations, providing you with an overview of the properties stored within each configuration.

  1. Run the following command to list all Project Configurations:
Terminal window
daytona project-config list

Upon running this command, Daytona will display a list of your Project Configurations. You will be able to view the Project Configuration name, the repository URL it is connected to, the build configuration, and if it is set as a default configuration.

Name Repository Build Default
─────────────────────────────────────────────────────────────────────
MyProjectConfig daytonaio/daytona Devcontainer Yes

Set Default Project Configuration

Daytona allows you to set a default Project Configuration, enabling you to define a configuration that will be used by default when creating new Workspaces.

  1. Run the following command to set a default Project Configuration:
Terminal window
daytona project-config set-default
  1. Select the Project Configuration you want to set as the default.
Select a Project Config To Set As Default
1 item
┃ MyProjectConfig
┃ https://github.com/username/MyProject

Upon selecting the default Project Configuration, Daytona will set it as the default configuration for new Workspaces.

Project config 'MyProjectConfig' set as default

Update Project Configuration

Daytona allows you to update an existing Project Configuration, enabling you to modify the properties stored within it.

  1. Run the following command to update a Project Configuration:
Terminal window
daytona project-config update
  1. Select the Project Configuration you want to update.
Select a Project Config To Update
1 item
┃ MyProjectConfig
┃ https://github.com/username/MyProject
  1. Update the properties of the Project Configuration.
Choose a build configuration
Automatic
Devcontainer
Custom image
None
Environment Variables
Enter environment variables in the format KEY=VALUE
To pass machine env variables at runtime, use $VALUE

Upon completion, Daytona will save the updated Project Configuration, allowing you to reuse it across Workspaces.

Project config updated successfully

Delete Project Configuration

Daytona allows you to delete an existing Project Configuration, enabling you to remove properties that are no longer needed.

  1. Run the following command to delete a Project Configuration:
Terminal window
daytona project-config delete
  1. Select the Project Configuration you want to delete.
Select a Project Config To Delete
1 item
┃ MyProjectConfig
┃ https://github.com/username/MyProject
Project config deleted successfully