nself is an open-source CLI tool for managing a self-hosted Nhost backend stack using Docker Compose. It allows you to initialize, start, stop, reset, and update your self-hosted Nhost services with ease.
- Init: Initialize your project with a customizable
.envfile. - Up: Start all enabled Docker services based on your configuration.
- Down: Stop all running Docker services.
- Reset: Reset your environment by removing Docker containers, images, volumes, and the Docker Compose file.
- Update: Update
nselfto the latest version.
You can install nself using the provided install.sh script.
curl -fsSL https://raw.githubusercontent.com/acamarata/nself/main/install.sh | bashNote: Ensure you have curl and bash installed on your system.
After installation, navigate to your project directory and use the following commands:
nself initThis will copy the .env.example to .env.dev. Modify the .env.dev file according to your needs and then run:
nself initto generate the .env file.
nself upThis command will generate the docker-compose.yml based on your .env configuration and start all enabled services.
nself downThis will stop all running Docker services defined in your docker-compose.yml.
nself resetThis command stops services, removes Docker images and volumes, and deletes the docker-compose.yml file, allowing you to reconfigure and rebuild your environment.
nself updateChecks for the latest version of nself and updates your local CLI if a newer version is available.
Edit the .env.dev or .env file to configure your services. The .env.example provides all necessary environment variables with explanations.
MIT License. See LICENSE for more information.