dev
Run a local command in the application root with the linked application's runtime variables injected over your environment.
coolship dev [target] [-- command...] [flags]dev runs a local process so that it sees what it would see on Coolify, without pulling a .env file first. A command after -- runs directly. Without one, the binding's dev setting runs through your shell:
[project]
dev = "npm run dev"The application's runtime variables are injected over the inherited environment. Unlike env pull, shared references such as {{team.API_KEY}} are injected as the values they resolve to. Values Coolify withholds are reported and left to your own environment. The command's exit status becomes Coolship's, and Ctrl-C is forwarded to it.
Flags
| Flag | Purpose |
|---|---|
--preview | Inject the preview-deployment scope instead of the regular one. |
Examples
coolship dev -- npm run dev
coolship dev -- go run .
coolship dev api -- go run . # named target in a monorepo
coolship dev # runs the binding's dev setting
coolship dev --preview -- npm testBehavior
- The process runs in the application root (
rootin the binding), whatever directory you invoked Coolship from. - The injected pairs are layered over your environment: a variable set both locally and on Coolify takes Coolify's value.
- On cancellation the child receives an interrupt and is killed after a grace period if it does not exit.
devis the only command that resolves shared references;env pullkeeps them as references so a push can never flatten them. See Environment variables.
Output
dev prints nothing of its own on stdout; the child's streams are yours. Withheld variables are reported on stderr before the process starts. --format json does not change the child's output.
Exit codes
The child's exit status. 2 when the directory is not linked or there is neither a command nor a dev setting; 1 when the variables cannot be read; 130 when interrupted before the child started.