Skip to content

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.

Terminal window
flui dev creds
flui dev creds --dry-run # show what would be written
flui dev creds --api-path ../flui.api # one-off override
flui dev creds --no-backup # don't back up the existing file
FlagEffect
--api-path <path>Override the apiPath preference for this run.
--[no-]backupBack up the existing .env.local before overwriting keys. Default: on.
--dry-runPrint which keys would be written without touching the file.
--savePersist 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.

Terminal window
flui dev tunnel # default set of forwards
flui dev tunnel --ports postgres,redis # narrower set
flui dev tunnel --ports postgres,redis,kube-api,grafana
flui dev tunnel --no-retry # exit on disconnect
flui dev tunnel --no-kill-local # don't reclaim local ports
FlagDefaultEffect
--ports <list>postgres,redis,kube-api,vmsingle,lokiComma-separated forwards. Available: postgres, redis, kube-api, grafana, vmsingle, loki.
--[no-]retryonAuto-reconnect if the SSH session drops.
--[no-]kill-localonKill any local process bound to the requested ports before opening the tunnel.

Typical local-dev flow

Terminal window
flui env export-config --api-path ../flui.api # 1. endpoints into .env
flui dev creds --api-path ../flui.api # 2. secrets into .env.local
flui dev tunnel --ports postgres,redis,kube-api # 3. open the tunnels
# in another terminal
cd ../flui.api && pnpm run start:dev # 4. run the API locally

The 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.