CLI for Coolify API
Warning
Until version 1.0.0, the CLI should be considered unstable. Any minor or patch release may introduce breaking changes. Please read the release notes carefully before updating.
Installation
curl -fsSL https://raw.githubusercontent.com/coollabsio/cli-coolify/main/scripts/install.sh | bash
This will install the CLI in /usr/local/bin/coolify.
If you are a Windows or macOS user, please test the installation script and let us know if it works for you.
Initial Setup
Before using any commands, you need to initialize the CLI by creating a configuration file:
coolify init
This interactive wizard will guide you through setting up your Coolify instance(s). You can choose to:
- Connect to Coolify Cloud using your API token
- Add self-hosted Coolify instance(s) with their FQDN and token
Alternatively, you can generate a default configuration non-interactively:
coolify init --default
The configuration will be stored in ~/.config/coolify/config.json.
Getting Your API Token
To use the CLI, you'll need an API token:
- Log in to your Coolify dashboard (Cloud or self-hosted)
- Navigate to
/security/api-tokens - Create a new token with appropriate permissions
- Use this token when initializing the CLI or adding a new instance
Managing Instances
After initialization, you can manage your Coolify instances:
Add a New Instance
coolify instances add MyInstance https://my.instance.tld mytoken
Or use the interactive mode:
coolify instances add
List All Instances
coolify instances list
Set Default Instance
coolify instances set default MyInstance
Remove an Instance
coolify instances remove MyInstance
Update Instance Token
coolify instances set token MyInstance newtoken
Currently Supported Commands
Update
coolify update- Update the CLI to the latest version
Instances
coolify instances list- List all instancescoolify instances add- Create a new instance configurationcoolify instances remove- Remove an instance configurationcoolify instances get- Get an instance configurationcoolify instances set <default>|<token>- Set an instance as default or set a token for an instancecoolify instances version- Get the version of the Coolify API for an instance
Servers
coolify servers list- List all serverscoolify servers get- Get a server--resources- Get the resources and their status of a server