Format

2026-03-27

Format your code with one command. Works across languages using each language's standard formatter.

Format

8v fmt
Formatting (rust) ...
  src/handlers/auth.rs    changed
  src/models/user.rs      changed

  ✓ 2 files formatted

8Vast detects your language and runs the right formatter. Files that are already correctly formatted are skipped.

Check without modifying

Validate formatting without changing files — useful in CI pipelines:

8v fmt --check

When everything is formatted:

Checking format (rust) ...

  ✓ All files formatted correctly

When files need formatting:

Checking format (rust) ...
  src/handlers/auth.rs    needs formatting
  src/models/user.rs      needs formatting

  ✗ 2 files need formatting

Exit codes: 0 means all formatted, 1 means files need formatting.

Supported languages

LanguageFormatterConfig file
Rustcargo fmtrustfmt.toml
TypeScript/JavaScriptprettier.prettierrc
Pythonruff formatpyproject.toml
Gogofmt
.NETdotnet format.editorconfig
Javagoogle-java-format

8Vast uses your existing formatter configuration. If you have a .prettierrc or rustfmt.toml, those rules apply. No need to configure 8Vast separately.

Format on commit

When you run 8v init, a pre-commit hook is installed that runs 8v lint before every commit. You can add formatting to this flow by running 8v fmt before lint in your workflow, or configure it in .8v/config.yaml.

Multi-language projects

If your project has multiple languages (e.g., Rust backend + TypeScript frontend), 8v fmt formats all of them in a single pass:

8v fmt
Formatting (rust) ...
  1 file changed
Formatting (typescript) ...
  3 files changed

  ✓ 4 files formatted

Next