Skip to Content

Configuration

Finqu CLI uses a JSON configuration file to store settings, credentials, and theme connections. The configuration supports multiple environments, allowing you to work with different themes or API endpoints.

Configuration File

By default, the CLI looks for finqu.config.json in the current directory. You can override this with:

  • The --config <path> global option
  • The FINQU_CONFIG environment variable

Configuration Structure

The configuration file supports multiple environments. Each environment is a top-level key in the JSON object:

{ "production": { "themeDir": "/path/to/theme/directory", "resourceUrl": "https://<your-env>.api.myfinqu.com", "apiVersion": "1.2", "accessToken": "<oauth_access_token>", "refreshToken": "<oauth_refresh_token>", "expiresAt": 1784447850458, "store": { "merchantId": 6, "id": 57704, "themeId": 870, "versionId": "152bd77a7749171803307263acec8028", "domain": "example.finqustore.com" } }, "development": { "themeDir": "/path/to/dev/theme", "resourceUrl": "https://dev.api.myfinqu.com", "apiVersion": "1.2", "accessToken": "<dev_access_token>", "refreshToken": "<dev_refresh_token>", "expiresAt": 1784447850458, "store": { "merchantId": 6, "id": 57705, "themeId": 871, "versionId": "dev_version_id", "domain": "dev.finqustore.com" } } }

Configuration Keys

KeyDescription
themeDirLocal directory path for theme files
resourceUrlFinqu API base URL (set automatically by finqu sign-in)
apiVersionFinqu API version (optional, default: 1.2)
accessTokenOAuth 2.0 access token (automatically managed)
refreshTokenOAuth 2.0 refresh token (automatically managed)
expiresAtAccess token expiration timestamp (automatically managed)
storeStore/theme selection (set by finqu theme configure)
verboseEnable or disable verbose logging

Environment Selection

Use the --env <environment> global option to specify which environment configuration to use:

finqu theme deploy --env development finqu theme download --env production

If not specified, the CLI defaults to the production environment.

Configuration Precedence

The CLI resolves configuration values in the following order (highest to lowest priority):

  1. Command-line flags: --config, --env, --verbose
  2. Environment variables: FINQU_CONFIG, FINQU_API_CLIENT_ID, FINQU_API_CLIENT_SECRET
  3. Configuration file: Values from finqu.config.json (or the file specified by --config)

Automatic Management

The configuration file is automatically created and updated by CLI commands:

  • finqu sign-in stores authentication tokens
  • finqu theme configure stores theme connection details
  • Token refresh happens automatically when tokens expire

Note: You typically don’t need to edit the configuration file manually. The CLI manages it for you. However, you can manually edit it if needed, for example to add multiple environments or adjust settings.

Environment Variables

You can override configuration values using environment variables:

VariableDescription
FINQU_CONFIGOverride the default configuration file path
FINQU_API_CLIENT_IDAPI Client key to use for authentication (alternative to using --key)
FINQU_API_CLIENT_SECRETAPI Client secret to use for authentication (alternative to using --secret)

These are particularly useful in CI/CD environments where you want to avoid storing credentials in files.