Show HN: Aict – Unix coreutils that output XML/JSON, built for AI agents
By ronak_parmar
AI 摘要
Hacker News 讨论热度 16 points · 6 comments
原文正文
Unix coreutils with XML/JSON output — built for AI agents, not humans.
Install · Quick start · All tools · MCP server · Claude Code · Token cost · Benchmarks · Contributing
AI agents run ls, grep, and cat and get back human-readable plaintext. Then they spend tokens parsing column positions, guessing field widths, and handling inconsistent formats. This is fragile and wasteful.
-rw-r--r-- 1 user staff 2048 Apr 6 10:00 main.go ← which column is size?
-rw-r--r-- 1 user staff 1024 Apr 6 10:00 utils.go ← what's the language?
drwxr-xr-x 5 user staff 160 Apr 6 10:00 internal ← is this a directory?
aict reimplements 33 Unix tools with structured output the agent can read directly — no parsing required.
$ aict ls src/
<ls timestamp="1746123456" total_entries="3">
<file name="main.go" path="src/main.go" absolute="/project/src/main.go"
size_bytes="2048" size_human="2.0K" language="go" mime="text/x-go"
binary="false" executable="false" modified="1746120000" modified_ago_s="3456"/>
<file name="utils.go" path="src/utils.go" absolute="/project/src/utils.go"
size_bytes="1024" size_human="1.0K" language="go" mime="text/x-go"
binary="false" executable="false" modified="1746120000" modified_ago_s="3456"/>
<directory name="internal" path="src/internal" modified="1746120000"/>
</ls>Every field is labeled. Paths are always absolute. Timestamps are Unix integers. Language and MIME type are detected automatically — zero parsing needed.
brew tap synseqack/aict
brew install aictThis installs aict plus shell completions for bash and zsh. The MCP server is built in: aict mcp.
go install github.com/synseqack/aict@latest
git clone https://github.com/synseqack/aict
cd aict
go build -o aict .
Verify install:
aict --helpshould list all available tools.
# Default: XML output (best for AI agents)
aict ls src/
aict grep "func" . -r
aict cat main.go
aict diff old.go new.go
# JSON output
aict ls src/ --json
# Plain text (same as the original Unix tools)
aict ls src/ --plain
# Enable XML globally for all aict calls
export AICT_XML=133 tools across 6 categories. Every tool supports --xml (default), --json, and --plain.
Additional: git (status, diff, log, ls-files, blame) · completions (bash/zsh/fish) · doctor (self-diagnostic)
All tools follow the same conventions:
aict mcp exposes all tools as callable MCP functions via stdio transport. AI assistants call them natively — no shell wrapping needed. The MCP server is a subcommand of the main binary.
Configure Claude Desktop (~/.config/claude/claude_desktop_config.json):