Problem
The CLI currently stores contexts globally in ~/.config/coolify/config.json, which works well for personal defaults but is awkward for repository-specific workflows.
When working across multiple repos, teams, or customer environments, it is easy to accidentally run commands against the wrong Coolify context unless the operator remembers to pass --context every time or changes the global default back and forth.
That creates avoidable risk for commands like deploys, deletes, restarts, env syncs, and other mutations.
Proposal
Support a repo-local config file that the CLI can discover from the current working directory upward.
Possible shapes:
.coolifyrc
.coolify.toml
.coolify/config.json
A minimal first version could support only the context name, for example:
or:
{
"context": "production"
}
Then the CLI could resolve config with a precedence like:
- Explicit flags (
--context, --host, --token)
- Repo-local config
- Global config default
Why this would help
- Makes repo-specific automation safer
- Reduces accidental deploys to the wrong instance
- Avoids constantly switching the global default context
- Gives teams a shareable, documented convention for which Coolify context belongs to a repo
- Keeps credentials global while allowing repo-local intent
Notes
I am not suggesting storing tokens in the repo. The repo-local file could just point to a named context that already exists in the user's global config.
That would keep secrets in the existing global config while making per-repo targeting much clearer.
Problem
The CLI currently stores contexts globally in
~/.config/coolify/config.json, which works well for personal defaults but is awkward for repository-specific workflows.When working across multiple repos, teams, or customer environments, it is easy to accidentally run commands against the wrong Coolify context unless the operator remembers to pass
--contextevery time or changes the global default back and forth.That creates avoidable risk for commands like deploys, deletes, restarts, env syncs, and other mutations.
Proposal
Support a repo-local config file that the CLI can discover from the current working directory upward.
Possible shapes:
.coolifyrc.coolify.toml.coolify/config.jsonA minimal first version could support only the context name, for example:
or:
{ "context": "production" }Then the CLI could resolve config with a precedence like:
--context,--host,--token)Why this would help
Notes
I am not suggesting storing tokens in the repo. The repo-local file could just point to a named context that already exists in the user's global config.
That would keep secrets in the existing global config while making per-repo targeting much clearer.