Dev tools
The dev topic groups two helpers aimed at Flui contributors who run
the flui.api repo on their workstation against a real, remote
cluster. They write to local files in the source repos and open
network tunnels back to cluster services — they do not deploy or
operate applications.
If you are not a Flui contributor and you only want to deploy and
manage applications, you do not need this topic. The everyday surface
is flui deploy plus flui app *.
flui dev creds
Writes the cluster’s secrets (database password, queue password, JWT
signing key, encryption key, SSH CA) into <apiPath>/.env.local so a
locally-running API process can read them. .env.local is meant to
be git-ignored by the source repo.
flui dev credsflui dev creds --dry-run # show what would be writtenflui dev creds --api-path ../flui.api # one-off overrideflui dev creds --no-backup # don't back up the existing file| Flag | Effect |
|---|---|
--api-path <path> | Override the apiPath preference for this run. |
--[no-]backup | Back up the existing .env.local before overwriting keys. Default: on. |
--dry-run | Print which keys would be written without touching the file. |
--save | Persist any prompted preference into the active profile. |
Pair with flui dev tunnel to expose the matching services on
localhost; without that, the secrets are there but nothing on
localhost:5432 etc. answers.
flui dev tunnel
Opens SSH tunnels from your workstation to the in-cluster services the local API needs to talk to. The command stays in the foreground — CTRL-C closes every forward at once.
flui dev tunnel # default set of forwardsflui dev tunnel --ports postgres,redis # narrower setflui dev tunnel --ports postgres,redis,kube-api,grafanaflui dev tunnel --no-retry # exit on disconnectflui dev tunnel --no-kill-local # don't reclaim local ports| Flag | Default | Effect |
|---|---|---|
--ports <list> | postgres,redis,kube-api,vmsingle,loki | Comma-separated forwards. Available: postgres, redis, kube-api, grafana, vmsingle, loki. |
--[no-]retry | on | Auto-reconnect if the SSH session drops. |
--[no-]kill-local | on | Kill any local process bound to the requested ports before opening the tunnel. |
Typical local-dev flow
flui env export-config --api-path ../flui.api # 1. endpoints into .envflui dev creds --api-path ../flui.api # 2. secrets into .env.localflui dev tunnel --ports postgres,redis,kube-api # 3. open the tunnels
# in another terminalcd ../flui.api && pnpm run start:dev # 4. run the API locallyThe four steps map roughly to “tell the API where the cluster is”,
“give it the credentials to talk to it”, “open the network paths”,
and “start it”. Once the loop is set up, only dev tunnel typically
needs to run continuously; the other two are run on cluster changes.