Getting Started

Configuration

FORG is configured through a JSON file, environment variables, and CLI flags. Settings are resolved in this priority order: CLI flags > environment variables > project config > global config > defaults.

Config file location

PlatformPath
macOS / Linux~/.forg/config.json
Windows%APPDATA%\forg\config.json

Read or write values with the CLI:

forg config get api_url
forg config set log_level debug
forg config list          # show all current values

Global config options

// ~/.forg/config.json
{
  "api_url":         "https://forg.pro",
  "port":            6247,
  "log_level":       "info",
  "keystore":        "os",          // "os" | "file://<path>"
  "data_dir":        null,          // null = platform default
  "heartbeat_interval": 30,         // seconds
  "session_timeout": 1800,          // seconds of inactivity = new session
  "emit_timeout":    3000,          // ms to wait for /emit to return
  "tls_verify":      true,
  "proxy":           null           // "http://proxy:3128" or null
}

All config keys

KeyTypeDefaultDescription
api_urlstringhttps://forg.proBase URL of the FORG backend. Override for self-hosted.
portnumber6247Local agent listener port.
log_levelstringinfodebug | info | warn | error
keystorestringosKeystore backend. os = native keychain, file:// = file-backed.
data_dirstring | nullnullOverride data directory for caches and logs.
heartbeat_intervalnumber30Seconds between heartbeat pings to the backend.
session_timeoutnumber1800Seconds of inactivity before a new session ID is generated.
emit_timeoutnumber3000Max ms to wait before dropping an /emit call.
tls_verifybooleantrueVerify TLS certificates. Set false only in test environments.
proxystring | nullnullHTTP proxy URL for outbound requests.

Environment variable overrides

Every config key can be overridden with an environment variable prefixed FORG_, uppercased, with dots replaced by underscores:

Config keyEnvironment variable
api_urlFORG_API_URL
portFORG_PORT
log_levelFORG_LOG_LEVEL
keystoreFORG_KEYSTORE
session_timeoutFORG_SESSION_TIMEOUT
tls_verifyFORG_TLS_VERIFY
proxyFORG_PROXY

Per-project config

Place a .forg.json file in the root of a project directory. Settings here override the global config only when forg is invoked from within that directory tree.

// /path/to/my-project/.forg.json
{
  "project_id": "proj_abc123def456",
  "log_level":  "debug",
  "session_timeout": 300
}

The project_id field tags all signals emitted while in this directory with the given project, enabling per-project cost reporting in the dashboard.

CLI flags

Most config values can be passed as flags for one-off overrides:

forg status --port 6248
forg emit '{}' --log-level debug
forg activate lic_xxx --api-url https://my-forg-instance.com
© 2026 UpgradIQ, Inc.Edit this page on GitHub