CLI Configuration
The Fluxbase CLI stores its configuration in a YAML file.
Configuration File Location
Section titled “Configuration File Location”| Platform | Path |
|---|---|
| macOS / Linux | ~/.fluxbase/config.yaml |
| Windows | %USERPROFILE%\.fluxbase\config.yaml |
You can override this with the --config flag or FLUXBASE_CONFIG environment variable.
Configuration File Structure
Section titled “Configuration File Structure”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"Configuration Options
Section titled “Configuration Options”Profiles
Section titled “Profiles”Each profile contains:
| Field | Description |
|---|---|
name | Profile identifier |
server | Fluxbase server URL |
credential_store | Where credentials are stored: file or keychain |
credentials | Authentication tokens (when using file storage) |
user | Cached user information |
default_namespace | Default namespace for functions/jobs |
output_format | Default output format for this profile |
Defaults
Section titled “Defaults”Global defaults that apply to all profiles:
| Field | Description |
|---|---|
output | Default output format: table, json, yaml |
no_headers | Hide table headers by default |
quiet | Enable quiet mode by default |
namespace | Default namespace |
Environment Variables
Section titled “Environment Variables”Environment variables override configuration file settings:
| Variable | Description |
|---|---|
FLUXBASE_SERVER | Server URL (overrides profile) |
FLUXBASE_TOKEN | API token (overrides credentials) |
FLUXBASE_PROFILE | Profile to use (overrides current_profile) |
FLUXBASE_CONFIG | Path to config file (overrides default location) |
FLUXBASE_DEBUG | Set to true to enable debug output |
CI/CD Example
Section titled “CI/CD Example”export FLUXBASE_SERVER="https://api.example.com"export FLUXBASE_TOKEN="your-api-token"
# Commands will use these credentialsfluxbase sync --namespace productionCredential Storage
Section titled “Credential Storage”File Storage (Default)
Section titled “File Storage (Default)”Credentials are stored in the configuration file with 0600 permissions (owner read/write only).
System Keychain
Section titled “System Keychain”For enhanced security, use the system keychain:
fluxbase auth login --use-keychainThis 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.
Managing Configuration
Section titled “Managing Configuration”Initialize Configuration
Section titled “Initialize Configuration”fluxbase config initView Configuration
Section titled “View Configuration”# View full configuration (credentials masked)fluxbase config view
# View as JSONfluxbase config view -o jsonSet Configuration Values
Section titled “Set Configuration Values”# Set default output formatfluxbase config set defaults.output json
# Set default namespacefluxbase config set defaults.namespace production
# Switch current profilefluxbase config set current_profile prodGet Configuration Values
Section titled “Get Configuration Values”fluxbase config get defaults.outputfluxbase config get current_profileProfile Management
Section titled “Profile Management”List Profiles
Section titled “List Profiles”fluxbase config profilesAdd a Profile
Section titled “Add a Profile”# Add empty profilefluxbase config profiles add staging
# Then configure itfluxbase auth login --profile staging --server https://staging.example.comRemove a Profile
Section titled “Remove a Profile”fluxbase config profiles remove stagingSwitch Profiles
Section titled “Switch Profiles”fluxbase auth switch prodSecurity Best Practices
Section titled “Security Best Practices”- Use keychain storage for production credentials
- Use environment variables in CI/CD pipelines
- Create separate profiles for different environments
- Never commit the config file to version control
- Use API tokens instead of passwords when possible
Troubleshooting
Section titled “Troubleshooting”Reset Configuration
Section titled “Reset Configuration”# macOS / Linuxrm -rf ~/.fluxbasefluxbase auth login
# Windows (PowerShell)Remove-Item -Recurse -Force "$env:USERPROFILE\.fluxbase"fluxbase auth loginDebug Mode
Section titled “Debug Mode”Enable verbose output to diagnose issues:
# Using flagfluxbase --debug functions list
# Using environment variableexport FLUXBASE_DEBUG=truefluxbase functions listDebug mode shows:
- HTTP request/response details
- Authentication flow
- Configuration loading
Check Credential Status
Section titled “Check Credential Status”# Show all profiles and their statusfluxbase auth status
# Show current user infofluxbase auth whoamiToken Expiration
Section titled “Token Expiration”If you see authentication errors, your tokens may have expired:
# Re-authenticatefluxbase auth login
# Or use a fresh API tokenfluxbase auth login --server URL --token NEW_TOKENConfiguration Not Loading
Section titled “Configuration Not Loading”-
Check the config file exists:
Terminal window cat ~/.fluxbase/config.yaml -
Verify file permissions (should be readable by your user):
Terminal window ls -la ~/.fluxbase/config.yaml -
Try initializing a fresh config:
Terminal window fluxbase config init