Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceThe jadpo command

ToolsCommandsThe jadpo command

jadpo fmt

On this page

Format source files.

Rewrite Jadpo files in the one layout the formatter owns: indentation, spacing, blank lines and one member per line. In a project it first fixes each file's use lines: adds a missing import, removes an unused one and sorts them. With --layout it also moves each declaration another file uses into a file of its own, as layout.promotion_required asks. With --check, change nothing and fail if any file would change. Without a path, the project is found by walking up to app.jadpo.

Also: jadpo format.

usage
jadpo fmt [path]

Arguments

  • path (optional): A file or folder instead of the whole project

Flags

  • --check: Report unformatted files and change nothing
  • --layout: Also make the moves promotion asks for

On every command

  • --json: Print data for tools instead of text
  • --full: Show everything a report shortens
  • --help: Show every flag, with examples
  • --color <when>: Choose when to use colour

jadpo fmt --json writes one JSON document to standard output instead of text, with the same exit code. The document has schemaVersion, command ("fmt"), ok, data (what the command produced, null when it failed) and diagnostics (each error with its rule, reason, next and help). A command that needs a terminal refuses --json and names the flags that do the same job.

Examples

shell
# Format the project you are injadpo fmt# Make the moves layout.promotion_required asks for, then formatjadpo fmt --layout# Check formatting without changing anything, as CI doesjadpo fmt --check# Format one filejadpo fmt app.jadpo

Errors

  • cli.fmt_arguments: A jadpo fmt command names a path that isn't there or isn't a .jadpo file
  • format.changes_required: A file jadpo fmt --check read isn't laid out as jadpo fmt would write it
  • format.unsafe: A file was left as it was, because what the formatter made of it didn't read back as the same code, which is a mistake in Jadpo's formatter
  • format.write_failed: A file jadpo fmt formatted couldn't be written, usually because it is read-only
  • layout.promotion_required: Declaration is used beyond the file that holds it
  • toolchain.project_not_found: You ran a command that works on a project in a folder with no app.jadpo, in it or in any folder above it
  • toolchain.source_read_failed: A .jadpo file in the project couldn't be read, because it isn't UTF-8 text or you aren't allowed to read it

Markdown for agents: /docs/jadpo-fmt.md.Built from Jadpo main at aee2e8f.