Environment and Dependencies
When you open a project, OOMOL Studio will start a Linux container in the background, and your project will run inside this container, isolated from your computer's actual environment.
Each project has its own independent environment, ensuring that the code and dependencies of different projects do not affect each other or your computer's operating environment.
When you delete a project, the container will be removed, and your computer and other projects will remain unaffected.
Container Environment
The container created for a new project is a minimal container. To ensure startup speed, only necessary software is installed in the container. Therefore, if you need certain system commands or software (e.g., netcat), you will need to install them yourself in the container.
The container runs the script under the script.bootstrap
property in package.oo.yaml
during its first load:


You can add the system dependencies you want to install in this script, which is written in shell
script.
The default script is used to install dependencies for Node.js and Python code. Please do not delete it, as doing so will cause the code to fail to run.
After writing the startup script, you can find the button to restart the initialization script in the Project Initialization
section of the bottom panel. Clicking it will rerun the script under script.bootstrap
in package.oo.yaml
:


The initialization script you write will also be downloaded and referenced by others when the Package is published. When others use your project, the same initialization script will be executed to prepare the environment.
Once the initialization script is executed successfully, your project environment is ready, and you can start writing your workflows.
Code Dependencies
When writing code, you often need to rely on third-party libraries. There are several ways to introduce code dependencies:
Code Dependency Management
In the Code Dependency Management
section of the bottom panel, search for dependencies for the corresponding language and install them.


Dependencies installed this way will automatically record version information in files.
Python dependencies will be recorded in poetry.toml
:


Node.js dependencies will be recorded in package.json
:


Since this method can only search for the latest version of dependencies, if you want to install a historical version, you need to install it via commands in the terminal.
Enter Installation Commands in the Terminal
You can directly install dependencies in the terminal and specify the version to install.
Python dependencies can be installed using Poetry commands:


Node.js dependencies can be installed using Npm commands:


OOMOL Studio does not restrict users to using the dependency management software described in the documentation. The documentation describes OOMOL Studio's default implementation.
Users can choose dependency management software freely, but make sure to implement a version management mechanism. Otherwise, it cannot be guaranteed that the dependencies installed when downloading the Package match the versions installed by the developer, which may cause workflows to fail to run properly.
Since each project is a container, the code dependencies you install in the project can be referenced anywhere within the project.