Skip to content

Set Up a Repository's Config

A repository can carry its own OpenALR settings, so that everyone who works in it tags their turns the same way. This page sets that up in four steps: write the file, trust it, check it applies, and, if your team wants it, route records from it. For why the rules are drawn where they are, see Configuration.

1. Write the File

Create .alr/config.toml at the root of the repository, the folder that holds .git.

New-Item -ItemType Directory -Force .alr
notepad .alr\config.toml
mkdir -p .alr
$EDITOR .alr/config.toml

Put in it only keys a repository may set. This sample is valid:

project       = "ACME-2026-14"
plan_file     = "plans/acme-2026-14.xlsx"
default_tags  = ["client:acme", "cost_center:eng-310"]
required_tags = ["project", "task"]
work_types    = ["pairing"]
clients       = ["acme"]
cost_centers  = ["eng-310"]
tag_checks    = "warn"
task_class    = "interactive"
  • project is the project's code. It is the default project: tag and the default --project of alr plan, alr ev, and alr accept.
  • plan_file is the project's plan file. It is a path relative to the repository root and never leaves it.
  • default_tags are tags every record from this repository carries. They may be free tags or tags keyed project:, task:, client:, or cost_center:.
  • required_tags are tag keys every record should carry: project, task, client, or cost_center. A record without one is counted and reported, never dropped.
  • work_types, clients, and cost_centers add values to your lists. A repository can add and never remove.
  • tag_checks is warn or refuse. A repository can raise it from warn to refuse and never lower it.
  • task_class classes the work. A value the record format does not accept is refused, for that key only.

You do not need every key. Keep the file to what the whole team shares. Commit it like any other file:

git add .alr/config.toml
git commit -m "Add OpenALR project config"

Under the managed profile, the organization's provisioned config decides work_types, clients, cost_centers, and tag_checks, and the repository's values for them are ignored and listed.

The file may also name a rates file with rates_file and rates_sha256. The sample leaves them out. They apply only on a developer's machine whose own alr trust record holds the file, and rates_sha256 must be the SHA-256 of the rates file's bytes.

2. Each Developer Trusts the File

A file in a cloned repository does not apply until the developer who cloned it says so. Under the default setting, repo_settings = "ask", each developer runs this once, in the repository:

alr trust

The command shows the file's path and what it would set, and lists any key a repository may not set. Then it asks Trust it (sha256 ...)? [y/N]. Answer y. It records the SHA-256 of the file's bytes in a [trusted_projects] table in the developer's own user config. It never writes into the repository.

  • Another path. alr trust PATH takes the repository folder or its .alr/config.toml. With no path, it uses the file found from the folder you are in.
  • No terminal. Without a terminal the command refuses unless you add --yes, which trusts without asking.
  • A changed file. The trust holds only while the file's bytes keep the recorded SHA-256. Edit the file, or pull a change to it, and its settings stop applying until the developer runs alr trust again. alr check then names the keys added, removed, and changed since the trusted copy.
  • See the state. alr trust --list shows every trusted file with its hash, the time it was trusted, and whether it is trusted, changed, or missing.
  • Withdraw trust. alr trust --revoke PATH removes the record for that repository. The file's settings stop applying.

Tell the team to run alr trust again after every change to the file. See Give the Team Lead the Repository Config for who commits it.

Two other values of repo_settings exist, and only your own user config sets them. "trusted" applies every project file without a record, though rates and routes still need one. "off" never reads a project file.

3. Check That It Applies

Inside a harness session, list the settings:

/alr-ctl config

Each setting shows the layer it came from. A value from the file reads repo (trusted). The listing ends with a line like project file <path>: trusted, and a key the file tried and was refused is listed with its reason.

From a terminal, run:

alr check

For a trusted file it prints a line like this:

config: project file /src/web/.alr/config.toml: repo (trusted)

For a file that is not trusted, it prints a warning that the file is untrusted or changed since it was trusted, says its settings are ignored, and ends with Use them? Run: alr trust <repository>. A refused key is named in one warning line. The refused key is ignored, and the file's other keys still apply.

4. Optional: Route Records From the Repository

By default, a repository cannot say where your records go. A team that has no central provisioning can let the repository supply log_dir, transmit, or destination, but only where each developer's own user config says so, in a [routing] table:

[routing]
transmit    = "from_project_file"
destination = "from_project_file"
allow_destinations = ["syslog+tls://*.corp.example:6514"]

The repository's own .alr/config.toml then sets transmit and destination. These limits hold:

  • The developer trusts the file. A route needs the developer's own alr trust record. repo_settings = "trusted" alone never supplies one.
  • A destination must match allow_destinations. An empty list allows nothing.
  • A log_dir must be absolute. It must match allow_log_dirs and never be inside the repository.

alr trust lists the routes a file would take before you trust it. Everything else about routing is on the concept page, under Routing from a Project.

What a Repository Cannot Set

A repository's file cannot set any key outside the list in step 1. These are the ones that matter most:

  • Who paid. provider and the credential_* keys.
  • The profile and the trust rule. profile and repo_settings.
  • Prices. price_book_keys, local_rates, and project_rates_paid.
  • The record file's mode. record_file_mode.
  • Names. The names shown for projects, clients, and cost centers come from your own [projects] table and CSV files.
  • Where records go. log_dir, transmit, and destination, except as step 4 allows.

A refused key does not turn off the rest of the file. It is ignored, your own value stays in force, and the attempt is listed in alr check and /alr-ctl config.

Where to Go Next

Report a problem with this page