Skip to content

Getting Started

Terminal window
npm i -D indentier

Requires Node.js 22+.

Terminal window
# Scaffold config files
npx indentier --init
# Format a file to stdout
npx indentier src/index.ts
# Format in place
npx indentier --write "src/**/*.ts"
# Check (exits 1 if any file would change — useful in CI)
npx indentier --check "src/**/*.ts"

indentier --init creates two files:

.indentierrc.json — options (all optional):

{
"mode": "default",
"offset": 20,
"minColumn": 80,
"plugins": []
}

.indentierignore — paths to skip (.gitignore syntax):

node_modules/
dist/
coverage/

The core package handles JavaScript and TypeScript natively. For other languages install a plugin:

Terminal window
npm i -D @indentier/plugin-rust
.indentierrc.json
{
"plugins": ["@indentier/plugin-rust"]
}

See Plugins for the full list.