Skip to content

CLI Configuration

The Fluxbase CLI stores its configuration in a YAML file.

PlatformPath
macOS / Linux~/.fluxbase/config.yaml
Windows%USERPROFILE%\.fluxbase\config.yaml

You can override this with the --config flag or FLUXBASE_CONFIG environment variable.

version: "1"
current_profile: "dev"
profiles:
dev:
name: "dev"
server: "http://localhost:8080"
credential_store: "file"
credentials:
access_token: "eyJ..."
refresh_token: "eyJ..."
expires_at: 1234567890
user:
id: "uuid"
email: "user@example.com"
role: "admin"
default_namespace: "default"
output_format: "table"
prod:
name: "prod"
server: "https://api.example.com"
credential_store: "keychain"
default_namespace: "production"
defaults:
output: "table"
no_headers: false
quiet: false
namespace: "default"

Each profile contains:

FieldDescription
nameProfile identifier
serverFluxbase server URL
credential_storeWhere credentials are stored: file or keychain
credentialsAuthentication tokens (when using file storage)
userCached user information
default_namespaceDefault namespace for functions/jobs
output_formatDefault output format for this profile

Global defaults that apply to all profiles:

FieldDescription
outputDefault output format: table, json, yaml
no_headersHide table headers by default
quietEnable quiet mode by default
namespaceDefault namespace

Environment variables override configuration file settings:

VariableDescription
FLUXBASE_SERVERServer URL (overrides profile)
FLUXBASE_TOKENAPI token (overrides credentials)
FLUXBASE_PROFILEProfile to use (overrides current_profile)
FLUXBASE_CONFIGPath to config file (overrides default location)
FLUXBASE_DEBUGSet to true to enable debug output
Terminal window
export FLUXBASE_SERVER="https://api.example.com"
export FLUXBASE_TOKEN="your-api-token"
# Commands will use these credentials
fluxbase sync --namespace production

Credentials are stored in the configuration file with 0600 permissions (owner read/write only).

For enhanced security, use the system keychain:

Terminal window
fluxbase auth login --use-keychain

This stores credentials in:

  • macOS: Keychain Access
  • Windows: Windows Credential Manager
  • Linux: Secret Service (requires gnome-keyring or similar)

When using keychain storage, only minimal metadata is stored in the config file.

Terminal window
fluxbase config init
Terminal window
# View full configuration (credentials masked)
fluxbase config view
# View as JSON
fluxbase config view -o json
Terminal window
# Set default output format
fluxbase config set defaults.output json
# Set default namespace
fluxbase config set defaults.namespace production
# Switch current profile
fluxbase config set current_profile prod
Terminal window
fluxbase config get defaults.output
fluxbase config get current_profile
Terminal window
fluxbase config profiles
Terminal window
# Add empty profile
fluxbase config profiles add staging
# Then configure it
fluxbase auth login --profile staging --server https://staging.example.com
Terminal window
fluxbase config profiles remove staging
Terminal window
fluxbase auth switch prod
  1. Use keychain storage for production credentials
  2. Use environment variables in CI/CD pipelines
  3. Create separate profiles for different environments
  4. Never commit the config file to version control
  5. Use API tokens instead of passwords when possible
Terminal window
# macOS / Linux
rm -rf ~/.fluxbase
fluxbase auth login
# Windows (PowerShell)
Remove-Item -Recurse -Force "$env:USERPROFILE\.fluxbase"
fluxbase auth login

Enable verbose output to diagnose issues:

Terminal window
# Using flag
fluxbase --debug functions list
# Using environment variable
export FLUXBASE_DEBUG=true
fluxbase functions list

Debug mode shows:

  • HTTP request/response details
  • Authentication flow
  • Configuration loading
Terminal window
# Show all profiles and their status
fluxbase auth status
# Show current user info
fluxbase auth whoami

If you see authentication errors, your tokens may have expired:

Terminal window
# Re-authenticate
fluxbase auth login
# Or use a fresh API token
fluxbase auth login --server URL --token NEW_TOKEN
  1. Check the config file exists:

    Terminal window
    cat ~/.fluxbase/config.yaml
  2. Verify file permissions (should be readable by your user):

    Terminal window
    ls -la ~/.fluxbase/config.yaml
  3. Try initializing a fresh config:

    Terminal window
    fluxbase config init