Install dprint
Install using one of the methods below.
-
Shell (Mac, Linux, WSL):
curl -fsSL https://dprint.dev/install.sh | sh -
Windows Installer
-
Powershell (Windows):
iwr https://dprint.dev/install.ps1 -useb | iex -
Scoop (Windows):
scoop install dprint -
Homebrew (Mac):
brew install dprint -
Cargo (builds and installs the cargo package from source):
# this will be slower since it builds from the source cargo install --locked dprint -
Deno:
For just your project, run
deno install npm:dprintthen you can configure a task like so:{ "tasks": { "fmt": "dprint fmt", "fmt:check": "dprint check" } }Then run
deno task dprint initto initialize and format by running:deno task fmtAlso, you could install it globally via Deno:
deno install -g -A npm:dprint dprint help -
npm:
# for your project npm install dprint npx dprint help # or install globally npm install -g dprint dprint help -
python/uv via https://github.com/trim21/dprint-py:
uv add dprint-py uv run dprint help -
asdf plugin-add dprint https://github.com/asdf-community/asdf-dprint asdf install dprint latest -
Install with any AUR helper, for example:
paru -S dprintor binaries
paru -S dprint-bin
For binaries and source, see the GitHub releases.
Editor Extensions
- Visual Studio Code
- IntelliJ - Thanks to the developers at Canva
- Neovim with nvim-lspconfig
- The
dprint lspsubcommand provides code formatting over the language server protocol. This can be used to format in other editors.
Next step: Setup