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.
flui dev credsflui dev creds --dry-run # show what would be writtenflui dev creds --api-path ../flui-core # 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. |
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.
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-core # 1. endpoints into .envflui dev creds --api-path ../flui-core # 2. secrets into .env.localflui dev tunnel --ports postgres,redis,kube-api # 3. open the tunnels
# in another terminalcd ../flui-core && pnpm run start:dev # 4. run the API locallyThe 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.