Skip to content

init

Overview

Generate the initial Quix files based on the existing repository

Aliases: init

Usage:

quix init [<directory>] [options]

Arguments:

  • <directory> : Base directory (defaults to current directory)

Options:

  • -dev, --devcontainers : If specified, generates devcontainers files
  • --vscode : If specified, generates VS Code launch files
  • --pycharm : If specified, generates PyCharm launch files
  • --ide <ide> : Selects the IDE explicitly. (vscode, pycharm)
  • -d, --generate-dockerfiles : If specified, generates dockerfiles based on the applications [default: True]

How It Works

The quix init command sets up the initial Quix files based on your existing repository. When executed, it generates the necessary configuration files such as dockerfile and app.yaml for your application.

If run at the root level of your project, it will also create a quix.yaml file if one does not exist, and it attempts to generate any missing app.yaml and dockerfile files for all applications within the project. This ensures that your development environment is properly configured for seamless development and deployment.

Tip

The -dev, --devcontainers, --vscode, --pycharm, and --ide <ide> options work similarly to those in the quix ide command.

Example usage

Creating an Application from Python Code

If you have a Python file named main.py and you want to create a Quix application from it, you can use the following command:

$ quix init

When you run this command, it will automatically generate a dockerfile and an app.yaml file for your application. These files are essential for containerizing your application and defining its configuration, allowing you to easily deploy and manage your application in a consistent environment.

Using quix init simplifies the process of setting up your application, ensuring that all required files are created and properly configured.

Additional Functionality

If you run the quix init command at the root level of your project directory, it generates an empty quix.yaml file if it's not there yet. Additionally, it will attempt to generate any missing app.yaml and dockerfile for all applications within the project.

Running the command at the root level ensures that your entire project is properly initialized and configured, with all necessary files created for seamless development and deployment.