Skip to main content
formae is configured using a Pkl configuration file that controls agent behavior, datastore settings, discovery, synchronization, logging, and observability.

Configuration format

The configuration file uses Pkl syntax and amends the base formae:/Config.pkl schema, which provides validation and defaults for all settings.

Default configuration

Configuration lives under your formae config directory, $HOME/.config/formae/ by default (it also honors $XDG_CONFIG_HOME and $FORMAE_CONFIG_DIR). Each configuration is stored as a named profile at profiles/<name>.pkl, and the active one is recorded in a plain-text active file alongside them. The first time you run a command that needs configuration, formae creates a ready-to-use default profile pointed at a local agent (any pre-existing configuration is migrated into this layout automatically). Use the formae profile command to create, switch between, and compare profiles, or --profile <name> to target one for a single command. Everything below describes the contents of a single profile file. A minimal profile file looks like:

Complete configuration reference

Below is a complete configuration showing all available options with their defaults:
Several optional sections have no defaults and are omitted above: Authentication (agent.auth, cli.auth), Resource plugins (agent.resourcePlugins), and Network (top-level network). See the respective sections below to configure them.

Configuration reference

Server settings

Controls the agent’s network configuration and cluster identity. Essential for multi-agent deployments.

Datastore

Choose between SQLite (default, suitable for single-agent), PostgreSQL (recommended for production with high availability requirements), Aurora Data API (for AWS deployments), or Microsoft SQL Server (for Azure deployments, including Azure SQL Database). SQLite configuration PostgreSQL configuration Aurora Data API configuration Use Aurora Data API for data access via AWS RDS Data API. Microsoft SQL Server configuration Use Microsoft SQL Server for self-hosted SQL Server instances or Azure SQL Database.
With authMode = "workload-identity", the agent authenticates using the Azure AD workload identity available in its runtime environment, and the user and password properties are ignored. This is the recommended mode for Azure SQL Database when the agent runs on Azure infrastructure with a managed identity.

Synchronization

Enable synchronization of managed resources. When enabled, formae periodically checks if resources have been modified outside of the tool.

Discovery

Automatically finds and catalogs infrastructure resources not yet under formae management. Useful for onboarding existing infrastructure. Discovery scans targets that have been marked as discoverable = true in your forma files. See the discovery documentation for details on configuring discoverable targets.

Logging

Configure log output levels and file locations.
Keep the file log level at debug for troubleshooting support.

OpenTelemetry

Enable telemetry export to your observability platform. When enabled, metrics, logs, and traces are pushed via OTLP. OTLP configuration Prometheus configuration

Retry

Control how formae handles transient failures during resource operations. These values are the agent-wide defaults and can be overridden per plugin in Resource plugins.

Resource plugins

agent.resourcePlugins is a list of per-plugin configuration blocks that override defaults published by each plugin. Each installed plugin ships its own typed configuration that you import through the plugins:/ scheme. Any plugin that is not listed uses its built-in defaults. Available overrides on every resource plugin: Plugins may also expose plugin-specific fields defined in their own schema/Config.pkl. These appear alongside the fields above on the same configuration block.

Disabling a plugin

Use enabled = false to stop the agent from loading a plugin. No other options apply in this case.

Tuning an installed plugin

This example uses the SFTP plugin because it exposes plugin-specific fields (defaultTimeoutSeconds, defaultFilePermissions) in addition to the common overrides.
You can combine multiple plugin blocks under a single resourcePlugins { ... } listing. The type field is automatically set by each plugin’s wrapper, so you only need to fill in the overrides you care about.

labelConfig

labelConfig customizes how human-readable labels are generated for resources discovered by this plugin. The query is a JSONPath expression evaluated against the resource’s properties. Each plugin ships a sensible default (for example, the AWS plugin uses the Name tag, $.Tags[?(@.Key=='Name')].Value). Override per resource type when the plugin’s default doesn’t suit your environment, or set defaultQuery to change the rule for every type:
When the query returns nothing, formae falls back to the resource’s provider identifier as the label. See Label: Labels for discovered resources for the full resolution order and collision behavior.

CLI

Configure how the CLI connects to the agent API, and how its output is themed. See Authentication for cli.auth.

Authentication

Authentication is configured separately for the agent and CLI. The agent.auth block controls server-side validation; the cli.auth block provides client-side credentials. Both fields are optional. If unset, the agent serves unauthenticated requests. Each auth plugin ships its own typed configuration that you import through the plugins:/ scheme, the same pattern used for Resource plugins. The example below uses the auth-basic plugin, which is the default HTTP Basic Authentication option.
See Security and networking for more detail on the auth-basic setup.

Network

Top-level network configuration. The type field selects the network plugin. See Tailscale for setup instructions.

Plugin directory

Top-level setting for where formae discovers installed plugins.

Artifact repositories

Top-level artifacts block configures the orbital repositories formae consults to install and update its binary, plugins, and tooling. Both the agent and the CLI share this configuration; formae plugin install, formae update, and formae plugin upgrade all resolve packages against the listed repositories. Each entry in artifacts.repositories is a Repository with two fields: The default value is equivalent to:
A typical override that points at a private hub mirroring the same shape:

Deprecated flat fields

Earlier releases configured a single repository via flat artifacts.url, artifacts.username, and artifacts.password fields. Those fields are still accepted for backwards compatibility but emit deprecation warnings on agent startup, and they cover only the binary repository: plugin installation requires the new repositories listing. Migrate by replacing:
with the explicit listing shown above. The username and password fields have no like-for-like replacement in 0.85; per-repository credentials will be reintroduced in a later release.

Deprecated plugins block

Earlier releases configured authentication, network access, and the plugin directory under a single top-level plugins { ... } block. That block is still accepted for backwards compatibility but emits deprecation warnings at startup. Migrate as follows: