Run nixfmt from ChatGPT or Claude
Command-line tool to format Nix language code. With BCD, ChatGPT, Claude and other AI apps can install and run nixfmt on your own computer and read what it prints.
Works on
- MacWorks
Homebrew has a ready-made build; the AI can install it with
brew install nixfmt. - LinuxWorks
Homebrew on Linux has a ready-made build.
- WindowsNot in Homebrew
Homebrew does not run on Windows. If nixfmt has a Windows build, BCD can run it in PowerShell.
About nixfmt
- Version
- 1.5.0
- License
- MPL-2.0
- Installs (last 365 days)
- 1,447 · #2,242 in Homebrew
- Homepage
- github.com/NixOS/nixfmt
- Install
brew install nixfmt
Try asking
“Install nixfmt with Homebrew and show me its version”
“Read nixfmt --help and give me three useful examples for my files”
“Update nixfmt and tell me what changed”
Depends on
Questions
Can ChatGPT run nixfmt on my computer?
Yes. With BCD on your Mac or Linux computer and command permission turned on for it, ChatGPT runs nixfmt there and reads the output. Claude and other apps with MCP connectors can too.
Do I need to install nixfmt first?
No. If Homebrew is installed, the AI can run brew install nixfmt for you.
Is it safe?
A new computer starts read-only: running commands is turned on per computer, and BCD reaches only the folders you allow.
Try it on your computer
BCD connects ChatGPT, Claude and other AI apps to your own Mac, Windows or Linux computer. One computer is free, with 20,000 tool calls a month and no card.
Program data from Homebrew, updated 2026-11-11. Installs are Homebrew's installs on request over the last 365 days.