{
  "markdown": "# AIR - AI-optimized Information Representation\n\nAIR is a toolkit for optimizing tool outputs for AI consumption. The name is inspired by \"accessibility retrofitting\" - just as we retrofit infrastructure for accessibility, we need to retrofit developer tools for AI ergonomics.\n\n## The Problem\n\nAI context windows are the scarcest resource. A 200K token window sounds large, but:\n- A single `npm install` output can consume 2000+ tokens\n- A test report can eat 5000+ tokens  \n- 50-96% of this is noise: progress bars, blank lines, redundant info\n\n**The real cost isn't tokens - it's attention dilution.** Even with unlimited tokens, noise in context degrades AI reasoning quality.\n\n## The Solution\n\nAIR intercepts tool outputs **at the source**, filtering noise before it enters the context window. Prevention, not cleanup.\n\n## Packages\n\n| Package | Description | npm |\n|---------|-------------|-----|\n| `@10iii/air-core` | Core compression library | [![npm](https://img.shields.io/npm/v/@10iii/air-core)](https://www.npmjs.com/package/@10iii/air-core) |\n| `@10iii/air` | CLI tool (`air` command) | [![npm](https://img.shields.io/npm/v/@10iii/air)](https://www.npmjs.com/package/@10iii/air) |\n| `@10iii/air-oc-plugin` | OpenCode plugin | [![npm](https://img.shields.io/npm/v/@10iii/air-oc-plugin)](https://www.npmjs.com/package/@10iii/air-oc-plugin) |\n| `@10iii/air-openclaw-plugin` | OpenClaw plugin | [![npm](https://img.shields.io/npm/v/@10iii/air-openclaw-plugin)](https://www.npmjs.com/package/@10iii/air-openclaw-plugin) |\n\n## Quick Start\n\n### CLI\n\n```bash\n# Install globally\nnpm install -g @10iii/air\n\n# Read a file with compression\nair read src/index.ts --skeleton\n\n# Run a command with output compression  \nair bash \"npm install\"\n\n# Search with de-duplication\nair grep \"TODO\" --include \"*.ts\"\n\n# Test output compression\nair test \"npm test\"\n```\n\n### As a Library\n\n```typescript\nimport { ReadCompressor, BashCompressor, GrepCompressor } from '@10iii/air-core';\n\n// Compress file content\nconst read = new ReadCompressor();\nconst result = read.compress(fileContent, { mode: 'skeleton' });\n\n// Compress command output\nconst bash = new BashCompressor();\nconst result = bash.compress(output, { command: 'npm install' });\n```\n\n### OpenCode Plugin\n\nAdd to your `opencode.json`:\n\n```json\n{\n  \"plugin\": [\"@10iii/air-oc-plugin\"]\n}\n```\n\n## Compressors\n\n### air-read\nFile content compression with intelligent truncation and structure awareness.\n\n- **skeleton**: Extract function/class signatures only\n- **focused**: Line range extraction with context\n- **truncate**: Smart truncation with size limits\n\n### air-bash\nCommand output compression with pattern recognition.\n\n- npm/pnpm/yarn install → progress removal, error extraction\n- git operations → diff summarization\n- Generic → intelligent truncation\n\n### air-grep\nSearch result compression with path de-duplication and context optimization.\n\n### air-test\nTest output parsing for pytest, jest, go test, and more.\n\n### air-web\nWeb page content extraction with readability and markdown conversion.\n\n### air-ls\nDirectory listing with tree structure and smart filtering.\n\n### air-diff\nDiff output compression with hunk summarization.\n\n### air-api\nAPI response compression (JSON field filtering).\n\n### air-search\nWeb search with multiple engine support (DuckDuckGo, Bing, Baidu, Sogou).\n\n## Token Savings Rate (TSR)\n\n| Compressor | Typical TSR |\n|------------|-------------|\n| air-test | 90%+ |\n| air-bash | 60-90% |\n| air-read | 50-80% |\n| air-grep | 40-60% |\n| air-web | 70-90% |\n\n## Design Principles\n\n1. **Prevention > Cleanup** - Filter at the source, not after\n2. **Rule-based > LLM-based** - Deterministic compression, no API calls\n3. **Progressive Disclosure** - Skeleton first, details on demand\n4. **Cross-platform** - Works with any AI tool\n5. **Zero API Key** - No external API dependencies\n\n## Requirements\n\n- Node.js >= 18\n\n## License\n\nMIT\n\n## Privacy\n\nAIR collects anonymous usage statistics to improve the product. This includes compressed content hashes (not the content itself), compression ratios, and basic metadata. No personal data is collected. You can modify this via `air config`.\n\n## Contributing\n\nContributions welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) and the [Architecture docs](./docs/ARCHITECTURE.md) first.\n",
  "bytes": 4297,
  "sha": "a0350d8d01de13d56fce4eb2b09be744b7a8756ca943f286a7cb7f948b13d39f",
  "repo_slug": "10iii/air",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_10iii_air_2c3f5487/readme"
}