Skip to content

ReferenceConfig keys

Config keys

Every config key joflux reads, with its aliases, default and environment variables.

joflux looks each setting up under several names, so configs written for the older GitHub-to-Codeberg tool keep working. A dotted name means a key inside a section: github.org is org under [github]. When a file has more than one of a setting’s names, the first one in the list below wins, which puts the flat keys ahead of the sectioned ones.

SettingNames, first match winsDefaultEnvironment
Organizationgithub_org, source_org, github.orgRequired
Tokengithub_token, source_token, github.tokenRequiredJOFLUX_GITHUB_TOKEN
API URLgithub_api_url, github.api_urlhttps://api.github.com
SettingNames, first match winsDefaultEnvironment
Instance URLforgejo_url, codeberg_url, target_url, forgejo.urlRequired
Organizationforgejo_org, codeberg_org, target_org, forgejo.orgRequired
Tokenforgejo_token, codeberg_token, target_token, forgejo.tokenRequiredJOFLUX_FORGEJO_TOKEN, then JOFLUX_CODEBERG_TOKEN
SettingNames, first match winsDefault
Poll interval, in secondspoll_interval, migration.poll_interval30
Maximum wait, in secondsmax_wait_time, migration.max_wait_time3600
Log levellog_level, migration.log_levelINFO
Output directoryoutput_dir, migration.output_dirmigration_output
Import metadatametadata, migration.metadatatrue

metadata switches the wiki, issues, pull requests, labels, milestones and releases on or off together; Configuration has what it changes.

A token from the config file is used when it’s set and not blank. Otherwise joflux reads the environment variables in the order shown, and the first one that’s set and not blank wins. With neither, the run stops with a config error naming the first key and the variables it tried, such as missing required config key: github_token or env var: JOFLUX_GITHUB_TOKEN.

A missing or blank required key stops the run with missing required config key: and the setting’s first name. poll_interval and max_wait_time must be positive whole numbers, and anything else stops it with config key must be a positive integer:. metadata must be true or false, and anything else, a quoted "false" included, stops it with config key must be true or false:. log_level is case insensitive and must be one of DEBUG, INFO, WARNING, ERROR or CRITICAL.

The file has to hold a mapping at the top level. Every config error exits with code 2.