Configuration
Finqu CLI uses a .env file to store settings, credentials, and theme connections as FINQU_-prefixed environment
variables.
Configuration File
By default, the CLI looks for .env in the current directory. You can override this with:
- The
--config <path>global option - The
FINQU_CONFIGenvironment variable
Configuration Structure
Example Configuration
FINQU_THEME_DIR=/path/to/theme/directory
FINQU_RESOURCE_URL=https://<your-env>.api.myfinqu.com
FINQU_API_VERSION=1.2
FINQU_ACCESS_TOKEN=<oauth_access_token>
FINQU_REFRESH_TOKEN=<oauth_refresh_token>
FINQU_EXPIRES_AT=1784447850458
FINQU_STORE_MERCHANT_ID=6
FINQU_STORE_ID=57704
FINQU_STORE_THEME_ID=870
FINQU_STORE_VERSION_ID=152bd77a7749171803307263acec8028
FINQU_STORE_DOMAIN=example.finqustore.comConfiguration Keys
Environment Variables
All configuration keys listed in the table above can be set as environment variables with a FINQU_ prefix in screaming
snake case (e.g. FINQU_THEME_DIR, FINQU_RESOURCE_URL). Both the .env file and the process environment are
supported.
The following additional environment variables are also supported:
These are particularly useful in CI/CD environments where you want to avoid storing credentials in files.
Configuration Precedence
The CLI resolves configuration values in the following order (highest to lowest priority):
- Command-line flags:
--config,--verbose - Environment variables:
FINQU_CONFIG,FINQU_API_CLIENT_ID,FINQU_API_CLIENT_SECRET, and anyFINQU_-prefixed config key - Configuration file: Values from
.env(or the file specified by--config)
Automatic Management
The configuration file is automatically created and updated by CLI commands:
finqu sign-instores authentication tokensfinqu theme configurestores theme connection details- Token refresh happens automatically when tokens expire
Note: The
.envfile is automatically created and updated by the CLI commands. You typically don’t need to edit it manually.
Migrating from finqu.config.json
If you are upgrading from an older version that used finqu.config.json, run the migration command:
finqu migrateThis converts your existing JSON configuration to the new .env format. See finqu migrate for
options.
finqu migrate
Convert a legacy finqu.config.json configuration file to the new .env format.
Usage
finqu migrateOptions
Migration process
- Reads the legacy
finqu.config.jsonfile - Extracts settings from the
productionenvironment (warns about other environments) - Flattens nested
storeobject into individual keys - Writes all values as
FINQU_-prefixed variables to the.envfile - Preserves any existing non-
FINQU_keys in the output file