Getting Started
Installation
pip
pip install aifmt
uvx (no install required)
uvx aifmt
From source
git clone https://github.com/ericchansen/aifmt.git
cd aifmt
pip install -e .
MCP Client Configuration
Add aifmt to your MCP client and all four tools are instantly available.
GitHub Copilot CLI
{
"mcpServers": {
"aifmt": {
"command": "uvx",
"args": ["aifmt"]
}
}
}
Claude Code
{
"mcpServers": {
"aifmt": {
"command": "uvx",
"args": ["aifmt"]
}
}
}
VS Code (Copilot Chat)
Add to .vscode/mcp.json:
{
"servers": {
"aifmt": {
"command": "uvx",
"args": ["aifmt"]
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"aifmt": {
"command": "uvx",
"args": ["aifmt"]
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"aifmt": {
"command": "uvx",
"args": ["aifmt"]
}
}
}
Gemini CLI
Add to ~/.gemini/settings.json:
{
"mcpServers": {
"aifmt": {
"command": "uvx",
"args": ["aifmt"]
}
}
}
Copilot CLI Plugin
aifmt ships with a Copilot CLI skill and custom instructions for prevention:
copilot-plugin/skills/aifmt/SKILL.md— Teaches the assistant when and how to use all four toolscopilot-plugin/instructions/visual-content.instructions.md— Prevention rules: usevisual_width()notlen(), even emoji counts for GitHub, prefer Mermaid over ASCII art
Copy these into your Copilot CLI plugin directory to enable automatic fixing and prevention.