Skip to content

sextant init

sextant init writes the starting files Sextant needs to grade a repo: a config, a rules directory, and (depending on the template) a sample rule. It is idempotent — files that already exist are left alone unless you pass --force.

Terminal window
sextant init
sextant init --template strict
sextant init --template rust --force
.sextant/
├── config.toml # verdict thresholds and rule limits
└── rules/ # repo-local rule markdown files
└── (varies by template)

config.toml covers the four built-in tuning sections — [verdict], [size], [complexity], [duplication] — plus a commented-out [judge] block for LLM-evaluated rules.

The .sextant/cache/ directory is created on first grade and is git-ignored.

TemplateWhat it does
defaultLanguage-agnostic config and an empty rules/ directory.
rustAdds a sample regex rule disallowing .unwrap() outside test files.
pythonAdds a sample regex rule disallowing bare except:.
goAdds a sample regex rule disallowing panic( outside test files.
javaAdds a sample regex rule discouraging printStackTrace().
tsAdds a sample regex rule disallowing // @ts-ignore.
strictTighter thresholds (fn_length_warn = 30, cyclomatic_warn = 6) on top of default.

The sample rules are intentionally trivial — copy-paste targets, not recommendations. Read Authoring rules for the full schema.

  • --template <name> — choose a scaffold. Defaults to default.
  • --force — overwrite existing files instead of skipping them.
  1. Commit .sextant/ to your repo. The Action and the plugin both pick it up by reading the working tree.
  2. Run sextant grade once to confirm rules load.
  3. (Optional) Lower the thresholds in config.toml once the baseline is green — start lenient, tighten as you go.
  4. Read Configuration for the full schema.