Disco CLI is the command-line tool you'll use to interact with the Disco open-source PaaS. It's your control panel for initializing servers, managing projects, setting environment variables, and deploying applications from the comfort of your terminal.
Disco is an open-source web deployment platform that lets you host web apps on your own server or Raspberry Pi with the simplicity of a managed PaaS. It helps you Deploy Any Web App, Pay Less, and Own It All.
The Disco ecosystem consists of two main parts:
disco-cli
(This repo): The command-line interface you use on your local machine.disco-daemon
: The agent that runs on your server, executing commands sent by the CLI.
The Disco CLI is the "remote control" for all your Disco-managed servers. It's designed to be intuitive and powerful, providing a seamless bridge between your local development environment and your production infrastructure.
- Initialization (
disco init
): The first time you connect to a new server, the CLI uses SSH to securely connect, install Docker, and set up the disco-daemon. It also generates a secure API key and saves it to a local configuration file (~/.disco/config.json
). - Communication: For all subsequent commands, the CLI acts as an API client, sending secure HTTPS requests to the daemon's REST API. This means you can manage your server from anywhere without needing persistent SSH access.
The CLI is built with oclif, a robust framework for creating command-line tools.
You can install the Disco CLI with a single command. It will automatically detect your operating system (macOS, Linux) and install the appropriate binary.
curl -fsSL https://cli-assets.letsdisco.dev/install.sh | sh
For other installation methods, including Windows, please see our official documentation.
Get your first project deployed in minutes.
-
Initialize your server: Point a domain to your server's IP, then povide the CLI with SSH access to your server. It will handle the rest.
disco init [email protected]
-
Connect your GitHub account: Disco uses a GitHub App for seamless, secure access to your repositories. The CLI will guide you through the one-time setup.
disco github:apps:add
-
Add and deploy your project: Tell Disco about your project's repository. As long as it contains a
Dockerfile
and adisco.json
file, Disco can deploy it.disco projects:add --name my-blog --github your-user/your-repo --domain blog.example.com
Once added, your project will deploy automatically. Future deployments are triggered by a simple
git push
to your main branch.
The CLI organizes commands by topic for easy discoverability. Here are some of the main ones:
Command Topic | Description |
---|---|
init |
Initialize a new server and install the disco-daemon. |
projects |
Add, list, move, and remove projects. |
deploy |
Manually trigger and view deployment logs. |
env |
Read, set, and remove environment variables. |
postgres |
Manage PostgreSQL databases and instances. |
domains |
Add or remove domains from a project. |
github |
Manage your GitHub App integration. |
apikeys |
List and remove API keys for CI/CD integration. |
logs |
View application and system logs. |
To see all available commands and options, run disco --help
.
We welcome contributions of all kinds! Whether it's reporting a bug, suggesting a new feature, or submitting a pull request, your help is appreciated.
- Bugs & Feature Requests: Please open an issue on the GitHub issue tracker.
- Discussions: Join our community on Discord to chat with the team and other users.
This project is licensed under the MIT License.