Welcome to the devcontainer-generator project! This tool helps you automatically generate devcontainer.json
files for your development environments based on the structure and contents of a given GitHub repository.
- Project Structure
- Installation
- Configuration
- Usage
- Setting Up Daytona Workspace
- Contributing
- License
devcontainer-generator
├── tests.ipynb
├── requirements.txt
├── schemas
│ └── devContainer.base.schema.json
├── README.md
├── main.py
└── data
└── devcontainers.db
- tests.ipynb: Jupyter Notebook containing tests and exploratory data analysis.
- requirements.txt: List of dependencies needed to run the project.
- schemas/: Directory containing the JSON schema for the
devcontainer.json
file. - README.md: This documentation file.
- main.py: Main script to generate
devcontainer.json
files. - data/: Directory containing the SQLite database files.
To run this project in Daytona, you'll need to have Daytona installed. Follow these steps to set up the project:
-
Install Daytona:
(curl -L https://download.daytona.io/daytona/install.sh | sudo bash) && daytona server stop && daytona server -y && daytona
-
Create new project and run IDE:
daytona create https://github.com/daytonaio/devcontainer-generator.git
-
Set up environment variables: Create a
.env
file in the project's root directory and add the following environment variables:AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint AZURE_OPENAI_API_KEY=your_azure_openai_api_key AZURE_OPENAI_API_VERSION=your_azure_openai_api_version MODEL=your_model_name GITHUB_TOKEN=your_github_token SUPABASE_URL=your_supabase_url SUPABASE_KEY=your_supabase_api_key SUPABASE_DB_URL=your_supabase_db_url
Ensure the following environment variables are set in your .env
file:
AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint
AZURE_OPENAI_API_KEY=your_azure_openai_api_key
AZURE_OPENAI_API_VERSION=your_azure_openai_api_version
MODEL=your_model_name
GITHUB_TOKEN=your_github_token
Run the migrate.py
script to create the devcontainers
table in Supabase. Here's how you can do it:
python migrate.py
After creating the table, you can use the Supabase client in your Python code to interact with the database.
The JSON schema for the devcontainer.json
file is located in schemas/devContainer.base.schema.json
.
Run the main.py
script to start the FastHTML app and generate devcontainer.json
files. Here's how you can do it:
python main.py
Instructions:
- After starting the app, open your web browser and go to
http://localhost:8000
. - Enter the URL of the GitHub repository for which you want to generate a
devcontainer.json
file. - Click the "Generate devcontainer.json" button.
- The generated
devcontainer.json
will be displayed and can be copied to your clipboard.
Steps to Set Up Daytona Workspace
-
Create Daytona Workspace:
daytona create https://github.com/nkkko/devcontainer-generator
-
Select Preferred IDE:
daytona ide
-
Open the Workspace:
daytona code
We welcome contributions! Please read our CONTRIBUTING.md file for guidelines on how to contribute to this project.
This project is licensed under the MIT License. See the LICENSE file for more details.
Thank you for using devcontainer-generator! If you have any questions or issues, feel free to open an issue on GitHub.