Skip to content
flow

ConfigurationSettings scopes

Settings scopes

How Flow picks a setting's value per repository, from a subdirectory, your own per-repo file, the team's checked-in file and your global settings.

View as Markdown
On this page

Most settings have one value for the whole app. A few mean something different per repository: the team may want a say, you may want your own value, or both. Settings scopes are how Flow decides which value wins in a given directory. Overrides are sparse: no file is created until you set a value, and a repository with no overrides behaves exactly like your global settings.

The scopes

From highest to lowest, by default:

ScopeWhereWho owns it
DirectorySUBDIR/.flowspace.json (a real subdirectory of a checkout)the team, or you, for one part of a repository
User repo~/.flow/repo_config/REPO/flowspace.json and …/drop.jsonyou, for one repository, in every worktree
Repo.flowspace.json and .drop.json at the checkout topthe team, checked in
User~/.flow/flowspace.json, ~/.flow/settings.json, ~/.config/drop/config.jsonyou, everywhere
Built-in defaultFlow itselfFlow

The top of a checkout, whether the primary checkout or a linked worktree, always counts as Repo, never Directory: that file is the team's, and it must not beat your own per-repo file.

Each setting honours only some of these scopes, listed in its Order below. A scope missing from a setting's order is ignored for that setting. For example, a team file can never choose your session.primary_command, and no snooze.* setting reads the team's file.

Which files Flow reads

For a session in a directory, Flow reads these files in order:

  1. DIR/.flowspace.json, when the session is in a subdirectory of its checkout (or outside any repository)
  2. ~/.flow/repo_config/REPO/flowspace.json
  3. WORKTREE_TOP/.flowspace.json
  4. PRIMARY_CHECKOUT/.flowspace.json, when that is a different directory
  5. ~/.flow/flowspace.json

Outside a git repository, only the directory's file and the user file are read. A session on a remote host reads only your User value and ~/.flow/flowspace.json: its paths never reach your local disk.

Your per-repository files

~/.flow/repo_config/REPO/ is keyed by the folder name of the repository's primary checkout, so every worktree of a repository shares it. Two different checkouts with the same folder name share one config; Settings › Repos says so when it happens. For a bare repository, REPO is the bare directory's name without .git.

The directory holds two files, named after their checked-in counterparts so you can move one across:

  • flowspace.json has the same shape as .flowspace.json, plus an optional top-level settings object for setting values.
  • drop.json has the same shape as .drop.json.
json
{
  "run": [{ "label": "Dev", "command": "make dev", "cwd": "web" }],
  "settings": {
    "session.primary_command": "zellij",
    "git.merge_method": "rebase"
  }
}

A relative cwd in this file is relative to the worktree top, as if the file were checked in there. A checked-in .flowspace.json may carry a settings object too; a key whose order has no Repo scope is ignored there.

A corrupt file is skipped and never stops a launch or a drop command (a corrupt checked-in .drop.json is still an error for drop). Flow refuses to write over a corrupt file. When an override is removed and its file is left empty, Flow deletes the file and its directory.

Merge and single settings

Each scoped setting is one of two kinds:

  • Merge: every scope contributes entries and they combine. Your run commands sit beside the team's; when two files use the same label (or name), the nearest file wins.
  • Single: one scope wins, the highest one in the setting's order that holds a usable value.

A value of the wrong shape counts as unset, whichever scope holds it. git.merge_method and tabs.new_tab only take their listed choices, so a typo in a team file falls through to the next valid value instead of winning.

The scoped settings

Every setting that can vary per repository. Order lists the scopes it honours, highest first. Every other setting is app-wide.

SettingLabelKindHomeValueOrder
profilesWorkspace profilesmergeflowspace (top-level key)arrayDirectory › User repo › Repo › User
runRun commandsmergeflowspace (top-level key)arrayDirectory › User repo › Repo › User
docsWeb docsmergeflowspace (top-level key)arrayDirectory › User repo › Repo › User
run_providersRun providersmergeflowspace (top-level key)arrayDirectory › User repo › Repo › User
reviewersReviewersmergeflowspace (top-level key)objectDirectory › User repo › Repo › User
quick_linksQuick linksmergeflowspace (top-level key)objectDirectory › User repo › Repo › User
code_searchExternal code searchmergeflowspace (top-level key)objectDirectory › User repo › Repo › User
worktreeDirWorktree directorysingledrop configstringUser repo › Repo › User
branchPrefixBranch prefixsingledrop configstringUser repo › Repo › User
isolationBaseFork basesingledrop configstringUser repo › Repo › User
session.primary_commandPrimary commandsinglesettings (settings object; User: settings.json)stringUser repo › User
git.merge_methodMerge methodsinglesettings (settings object; User: settings.json)squash / merge / rebaseUser repo › Repo › User
git.open_pr_in_reviewOpen pull requests in a review tabsinglesettings (settings object; User: settings.json)boolUser repo › User
git.pin_pr_review_tabPin pull request review tabssinglesettings (settings object; User: settings.json)boolUser repo › User
pr.diff_groupsDiff groupssinglesettings (settings object; User: settings.json)objectUser repo › Repo › User
tabs.new_tabNew tab typesinglesettings (settings object; User: settings.json)ask / terminalUser repo › User
snooze.defaultSnooze defaultsinglesettings (settings object; User: settings.json)ask / 30m / unread / pr / ciUser repo › User
snooze.durationsSnooze quick durationssinglesettings (settings object; User: settings.json)arrayUser repo › User
snooze.favsSnooze favoritessinglesettings (settings object; User: settings.json)arrayUser repo › User
snooze.recents_nSnooze recent conditionssinglesettings (settings object; User: settings.json)0 / 3 / 5User repo › User
snooze.trig.unreadSnooze until next messagesinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.unread_minSnooze ignores turns shorter thansinglesettings (settings object; User: settings.json)off / 30s / 2m / 5mUser repo › User
snooze.trig.prSnooze until PR approvedsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.pr_changesSnooze wakes on changes requestedsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.trig.ciSnooze until CI finishessinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ci_modeSnooze wakes when checkssinglesettings (settings object; User: settings.json)pass / anyUser repo › User
snooze.ask_wakeAsk what wakes a snooze earlysinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.questionWake early on a questionsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.permWake early on a permission promptsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.errorWake early on an errorsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.contextWake early when context is nearly fullsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.commentWake early on a PR commentsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.approvedWake early when the PR is approvedsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.changesWake early when changes are requestedsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.reviewedWake early on a comment-only reviewsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.mentionWake early on a PR mentionsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.closedWake early when the PR merges or closessinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.ci_failWake early when a CI check failssinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.ci_doneWake early when CI finishessinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.ov.watchesWake early on named watchessinglesettings (settings object; User: settings.json)arrayUser repo › User
snooze.ignore_authorsSnooze ignored people and botssinglesettings (settings object; User: settings.json)arrayUser repo › User
snooze.ignore_checksSnooze ignored checkssinglesettings (settings object; User: settings.json)arrayUser repo › User
snooze.check_picksSnooze chosen checkssinglesettings (settings object; User: settings.json)objectUser repo › User
snooze.wake.topMove a woken session to the topsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.wake.unreadMark a woken session unreadsinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.wake.notifyNotify when a session wakessinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.wake.soundPlay a sound when a session wakessinglesettings (settings object; User: settings.json)boolUser repo › User
snooze.watchesSnooze watchesmergesettings (settings object; User: settings.json)arrayUser repo › User

Home means: a top-level key of a flowspace file (flowspace); a top-level key of a drop config file (drop config); or the settings store for User and a flowspace file's settings object above it (settings).

code_search also keeps part of its User value in Settings › Code (code_search.engine, code_search.sourcegraph_url, code_search.url, code_search.by_lang.LANG, code_search.docs.LANG). That part sits right after ~/.flow/flowspace.json.

Mark a value important

Any of these files may carry a top-level "!important" list of keys:

json
{ "!important": ["worktreeDir", "run"], "worktreeDir": ".wt" }
  • An important value beats every value that isn't, whatever the order.
  • Among several important values, the setting's own order decides.
  • A mark in a scope the setting does not honour is ignored, so a team file can't force session.primary_command.
  • Spell the key exactly as it appears in the file. A mark on a key with no value in that file does nothing.
  • For a Merge setting, the marked file moves to the front for that key only, so it wins duplicate entries; the other files still contribute.

At the User scope the list is an "!important" key in ~/.flow/settings.json, ~/.flow/flowspace.json or ~/.config/drop/config.json, depending on the setting's home.

See and edit scopes in Settings › Repos

Settings › Repos lists the repositories under your source folder (drop's reposDir), those of your open sessions, and any directory already under ~/.flow/repo_config/, one row per primary checkout. A config whose checkout is gone stays listed as "no checkout found". Remote hosts are not listed.

A repository's page shows every scoped setting with the value in force and a chip for where it comes from (Default, User, Repo, User repo):

  1. Click Override to open an editor seeded with the value in force. A text field saves on Enter or when you leave it.
  2. Expand a row to see each scope in order, with its file, value and state (Applied, Overridden, Not honoured, Unset).
  3. Use the !important toggle on the User line (it appears once the User scope has a value). The Repo line, the team's file, is read-only.
  4. Click Reset to remove the override and its mark.

List settings are read-only on this page: it shows their merged items with their sources, and Edit in flowspace.json opens the file for editing, creating it if needed. It is the only action on the page that creates a file. Rows in Settings › General that have a scope rule, and Code's search engine row, carry a small "Per repo" chip that opens this page.

Scopes from a shell

sh
flow-cli read config-trace --key git.merge_method          # how a key resolves in the current directory
flow-cli read config-trace --dir ~/src/app                 # every scoped key, for another directory
flow-cli read repos                                        # the repositories Settings › Repos lists
flow-cli settings repo-set git.merge_method rebase         # your User repo value, for the focused session's repo
flow-cli settings repo-set worktreeDir .wt --repo app --important
flow-cli settings repo-unset git.merge_method --dir ~/src/app

repo-set and repo-unset write ~/.flow/repo_config/REPO/ for the repository you name with --repo (its key) or --dir, else the focused local session's. They refuse a key that has no scope rule, a key whose order has no User repo scope, a value of the wrong shape, and a corrupt file. A list or object value replaces your whole User repo value, so read the trace first and write the full new value. The reply is the key's trace: the winner, its value, the reason and every layer.

Limits

  • Only the settings in the table above vary per repository.
  • Two checkouts with the same folder name share one repo_config directory.
  • Sessions on remote hosts read only your User values.
  • Changing a team's .flowspace.json or .drop.json is a change to their repository: commit it like any other file.
Sources

Written from these files in the Flow app repo

  • docs/settings-scopes.md
  • src/scope.rs
  • src/repo_config.rs
  • src/flowspace.rs
  • src/drop/config.rs
  • agent-skills/settings/MANIFEST.md
  • agent-skills/settings/SKILL.md