Skip to content

Dev tools

The dev topic groups two helpers for Flui contributors who run the flui-core repo on their workstation against a real, remote cluster. They write to local files in the source repos and open network tunnels to cluster services. They do not deploy or operate applications.

If you only want to deploy and manage applications, you do not need this topic. Use flui deploy and flui app * instead.

flui dev creds

Writes the cluster’s secrets (database, Redis and Grafana passwords, JWT signing key, API key, encryption keys, 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-core # 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.

Run it together with flui dev tunnel, which exposes the matching services on localhost. Without the tunnel the secrets are in place, but nothing answers on localhost:5432 or the other ports.

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, and 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-core # 1. endpoints into .env
flui dev creds --api-path ../flui-core # 2. secrets into .env.local
flui dev tunnel --ports postgres,redis,kube-api # 3. open the tunnels
# in another terminal
cd ../flui-core && pnpm run start:dev # 4. run the API locally

The first step tells the API where the cluster is, the second gives it the credentials, the third opens the network paths and the fourth starts it. Once this is set up, only dev tunnel usually needs to keep running. Run the first two again when the cluster changes.