Installation
Prerequisites
Before installing Divekit, ensure your system meets the following requirements:
System Requirements
- Operating System: Linux, macOS, or Windows
- GitLab: Access to a GitLab instance with API permissions
GitLab Setup
- Access to a GitLab instance
- Admin rights to create groups and repositories
- Personal Access Token with
api
scope
Creating a Personal Access Token
or
- Navigate to your GitLab profile settings
- Go to “Access Tokens”
- Create a new token with required scopes
- Save the token securely - you’ll need it during installation
Storage Requirements
- Minimum 1GB free disk space
- Additional space for repositories (varies by project size)
Network Requirements
- Stable internet connection
- Access to GitLab API endpoints
- No blocking firewalls for HTTP requests
Optional Requirements
- Docker: For running tests in containers
- Maven/Gradle: For Java project support
- IDE: Any Git-compatible IDE for development
Installation
Download the latest release:
- Navigate to Divekit CLI Releases
- Download a built version for your operating system
Install Divekit:
Navigate to the download directory and run the installation script:
./divekit.exe install # On Windows
./divekit install # On Linux/macOS
Environment Setup
After installation, you need to configure your GitLab token in your system’s environment variables. There are two methods available:
Recommended Method: System Environment Variables
Windows
- Open System Properties > Advanced > Environment Variables
- Add a new User Variable:
- Variable name:
GITLAB_TOKEN
- Variable value:
<YOUR_TOKEN>
- Variable name:
- Restart your terminal
Linux
Add to your ~/.bashrc
or ~/.zshrc
:
export GITLAB_TOKEN="<YOUR_TOKEN>"
Then run:
source ~/.bashrc # or source ~/.zshrc
macOS
Add to your ~/.zshrc
:
export GITLAB_TOKEN="<YOUR_TOKEN>"
Then run:
source ~/.zshrc
Alternative Method (Not Recommended)
You can store the token in a .env
file in the Divekit configuration directory:
# In ~/.divekit/.env
GITLAB_TOKEN=<YOUR_TOKEN>
⚠️ Warning: This method is not recommended as the token is stored unencrypted and poses a potential security risk. Prefer using system environment variables instead.
To improve security when using this method:
# Restrict file permissions (Linux/macOS)
chmod 600 ~/.divekit/.env
This ensures only the file owner of your account (you) can read and write the file.
Verify Installation
Run the doctor command to verify your setup:
divekit doctor
This will check if:
- Divekit is properly installed
- Required environment variables are set
- System requirements are met
Troubleshooting
If you encounter any issues:
- Check if the GitLab token is correctly set in your environment variables
- Run
divekit doctor
for detailed diagnostics - 🚧 Check the logs in
~/.divekit/logs
- Ensure you have the correct permissions for the installation directory
First Steps After Installation
Create Your First Assignment
- Create and navigate to a new directory:
mkdir my-assignment
cd my-assignment
- Initialize a new Divekit project:
divekit init
Assignment Content Creation
- Add your assignment files to the repository
- Mark solution parts in your code:
public class Example {
//unsup
return actualSolution;
//unsup
}
- Add variables for individualization:
public class $EntityClass$ {
// ...
}
Assignment Distribution
- Verify your setup:
divekit doctor
- Distribute the repositories:
divekit distribute
Next Steps
For more detailed information, please refer to:
- Configuration options in the Configuration section
- Detailed system requirements in the Prerequisites section