Skip to main content

Configuration reference

Sunset has no configuration file or application environment-variable contract. Configuration is supplied as command-line flags. Values apply to one command invocation and do not require a restart.

Parse and update settings

SettingTypeDefaultApplies toEffect
--outputpath<path>/.sunset/output for parse; empty means the same engine default for updatebothChanges where index.md and files/ are written.
--detailstringsummaryparsefull renders the complete CST; all other values select summary mode.
--excludecomma-separated stringsemptybothExcludes matching filenames or relative paths.
--concurrencyintegerNumCPUbothSets parser concurrency when greater than zero.
--no-cachebooleanfalseparseAvoids loading and saving .sunset/cache/cache.json.
--max-depthinteger0parseLimits full-CST depth; zero is unlimited.
--quietbooleanfalsebothHides non-error progress and result output.

The positional root defaults to .. update always uses summary mode and has no --no-cache or --max-depth flag.

File and directory behavior

The scanner reads .gitignore from the project root. Blank lines and comments are ignored; ! negates a rule, a trailing / makes it directory-only, and a leading / is removed before matching. Rules containing / match from the project root. Other rules match the basename and each path suffix. The last matching rule wins. The CLI always loads .gitignore; the internal scanner API also has SkipGitignore.

The scanner always skips these directory names: .git, .idea, .vscode, node_modules, __pycache__, and vendor. It also skips every hidden directory whose name starts with . (including names not in that list).

--exclude is split on commas and each value is trimmed. A pattern is checked against both the filename and the relative path with filepath.Match. Patterns beginning with * also get a simple filename suffix check, which supports patterns such as *.test.ts. A matching exclusion removes the file before extension detection.

The cache is stored at .sunset/cache/cache.json. sunset clean [path] removes .sunset recursively. Output filenames are derived from relative paths by replacing path separators with underscores.