Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

profile.toml

A profile’s manifest: who it is, what it builds on, its features and variables, and every file it manages. Profiles explains it, and Write a Profile writes one.

Editors complete and check it from its schema, as Schemas says.

[profile]

Identity.

KeyTakesMeaning
namestring, requiredNames the profile: in its source, among the layers, in output, and in from.
versionstringFor humans; a git source is pinned by commit.
descriptionstringOne line for humans.
devsetstringThe devset versions the profile works with.

[requires]

Profiles this one builds on, by name: each a layer before it. Each entry:

KeyTakesMeaning
featureslist of stringsIts features to turn on.
default-featuresbooleanWhether its default features are on; true unless set.
optionalbooleanWhether it applies only when a feature activates it. Default false.
gitstringThe repository of another source.
tagstringIts tag; only with git.
branchstringIts branch; only with git.
revstringIts commit; only with git.
pathstringThe directory in the repository its profiles are in; only with git.

[features]

What a target or a requirer may turn on. The [features] table: default, and every feature with what it turns on.

[vars.<name>]

Variables templates and paths use; the target answers them. Each entry:

KeyTakesMeaning
promptstringWhat to ask; the name if unset.
defaultstringThe answer offered.

[merge]

Merge defaults.

KeyTakesMeaning
on-conflictapply-others or apply-noneWhat a run does when a file conflicts.
driverstringA merge program, with %O %A %B %P substituted. From a profile it is only a suggestion: devset never runs a program a profile names.

on-conflict takes:

  • apply-others: write every other file and advance the lock; conflicts wait in .devset/conflicts/.
  • apply-none: write nothing but the conflicts until every one is resolved.

[scaffolds.<name>]

Groups of starter files, each written once, when none of its sentinels is there. Each entry:

KeyTakesMeaning
unlessstring or list of stringsPaths or globs of which any, there before the run, means the target has its own: the group is not written. A string or a list; none writes the group when the profile is first applied.

[files."<path>"]

Managed files, by path in the target, as found under files/; a path may use variables. Each entry:

KeyTakesMeaning
policyowned, merge or onceHow devset manages the file; owned unless set, and once in a scaffold.
validatetoml, json, yaml or noneHow a merged result is checked; inferred from the extension unless set.
templatebooleanWhether the file is a template, rendered with the answers and the devset object. Default false.
scopefile, keys or blockHow much of the file devset owns: all of it, the keys the payload defines, or a block. Default file.
comment#, //, --, ;, %, /* or <!--The comment syntax of a block’s markers, where devset does not know the file type’s.
executablebooleanWhether devset writes the file executable, mode 755, as a script it ships must be. Default false.
scaffoldstringThe scaffold group the file belongs to, written with it.
starterstringFor a part, a file under files/ the target’s file starts from when it is absent.
whentable, belowWhen the entry applies; always, unless set.

policy takes:

  • owned: the profile is authoritative; local edits are drift.
  • merge: local edits are kept, and merged with the profile’s.
  • once: written once if absent; the target’s from then on.

validate takes:

  • toml: TOML.
  • json: JSON with comments and trailing commas (JSONC), a superset of JSON.
  • yaml: YAML.
  • none: not checked.

scope takes:

  • file: the whole file.
  • keys: every leaf the payload, a partial document, defines; the file’s other keys are the target’s.
  • block: one comment-marked block, named after the profile; the file’s other lines are the target’s.

comment takes:

  • #: shells, TOML, YAML, Python, .gitignore.
  • //: C, Rust, JavaScript, JSONC.
  • --: SQL, Lua, Haskell.
  • ;: INI, Lisp, assembly.
  • %: TeX, Erlang, MATLAB.
  • /*: CSS.
  • <!--: Markdown, HTML, XML.

when

When an entry applies: every condition holds.

KeyTakesMeaning
featureslist of stringsFeatures of this profile that are on.
profileslist of stringsProfiles active in the target.
varstable of lists of stringsVariables of this profile, each answered with one of its values.
existslist of stringsPaths or globs that will exist when the run finishes, whole files or parts; may use variables.