{"_id":"@aiany/hai","_rev":"6-eab8cf9329d9c2a4acff151b2286272b","name":"@aiany/hai","dist-tags":{"latest":"0.8.5"},"versions":{"0.8.0":{"name":"@aiany/hai","version":"0.8.0","keywords":["ai","cli","terminal","command-line","agent","openai","anthropic","claude","gemini","gpt","llm","chatgpt","copilot","assistant","shell","unix","pipe","automation"],"author":{"name":"aiany"},"license":"GPL-3.0","_id":"@aiany/hai@0.8.0","maintainers":[{"name":"fullex","email":"0xfullex@gmail.com"}],"homepage":"https://github.com/aianyai/hai","bugs":{"url":"https://github.com/aianyai/hai/issues"},"bin":{"hai":"dist/index.js"},"dist":{"shasum":"8c404398da3669dec6d12244a85b701c74a07e20","tarball":"https://registry.npmjs.org/@aiany/hai/-/hai-0.8.0.tgz","fileCount":6,"integrity":"sha512-P3Z/L+453kldp43Y5gKT21fzPNQPb9F3T9V7hxP0PwYgYOyGNKZArek1OYaqXn7nxx5QoMERtZUP0CU4DeMpZg==","signatures":[{"sig":"MEYCIQDXhH7trJS6nm04IUdJvsrO9IRJYQAkDyUkUrL0tvhYfwIhAOxANXewzf4mIjP9IfRzMU6cZfHV6vJntDgC5XfOKjVb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":133894},"type":"module","engines":{"node":">=18"},"gitHead":"ce74492423831ead80822a7a66dd0a81df1dceae","scripts":{"dev":"tsup --watch","lint":"eslint src","build":"tsup","format":"prettier --write src","lint:fix":"eslint src --fix","typecheck":"tsc --noEmit","prepublishOnly":"npm run lint && npm run build"},"_npmUser":{"name":"fullex","email":"0xfullex@gmail.com"},"repository":{"url":"git+https://github.com/aianyai/hai.git","type":"git"},"_npmVersion":"11.6.1","description":"AI in your terminal. Run commands or ask questions - just hai it. Supports OpenAI, Claude, Gemini, DeepSeek & more.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"ai":"^6.0.0","zod":"^4.3.5","chalk":"^5.4.0","commander":"^13.0.0","@ai-sdk/google":"^3.0.0","@ai-sdk/openai":"^3.0.0","@ai-sdk/anthropic":"^3.0.0","@ai-sdk/openai-compatible":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.39.2","prettier":"^3.7.4","@eslint/js":"^9.39.2","typescript":"^5.7.0","@types/node":"^22.0.0","typescript-eslint":"^8.52.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/hai_0.8.0_1768130038120_0.7284242005243633","host":"s3://npm-registry-packages-npm-production"}},"0.8.1":{"name":"@aiany/hai","version":"0.8.1","keywords":["ai","cli","terminal","command-line","agent","openai","anthropic","claude","gemini","gpt","llm","chatgpt","copilot","assistant","shell","unix","pipe","automation","term","powershell","cmd"],"author":{"name":"aiany"},"license":"GPL-3.0","_id":"@aiany/hai@0.8.1","maintainers":[{"name":"fullex","email":"0xfullex@gmail.com"}],"homepage":"https://github.com/aianyai/hai","bugs":{"url":"https://github.com/aianyai/hai/issues"},"bin":{"hai":"dist/index.js"},"dist":{"shasum":"931cdb2ff51bf59082667bc49e8d9e82d899cdcf","tarball":"https://registry.npmjs.org/@aiany/hai/-/hai-0.8.1.tgz","fileCount":6,"integrity":"sha512-qF/bIXLLyhUi5tFAXzGwR1AzxjP8cnZCyIJUDPKWtjnrFZ6IQF4kZckI1MGQXQfdxl1OdBByWL+FCBiMISHInA==","signatures":[{"sig":"MEQCIAXugncIwySiV1eK3WBCuiB8TmX0ApCYeTgo0lNLPAceAiBJ86QuWYViCdqDiC7gWbNjge+w6ckjTb37/jjwi+iZfg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiany%2fhai@0.8.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":134420},"type":"module","engines":{"node":">=18"},"gitHead":"8d2c880e2bf53a7064571d0fc0f79209280fb67b","scripts":{"dev":"tsup --watch","lint":"eslint src","build":"tsup","format":"prettier --write src","lint:fix":"eslint src --fix","typecheck":"tsc --noEmit","prepublishOnly":"npm run lint && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6442a792-65da-4f8f-9d6a-07406b270414"}},"repository":{"url":"git+https://github.com/aianyai/hai.git","type":"git"},"_npmVersion":"11.6.2","description":"AI in your terminal. Run commands or ask questions - just hai it. Supports OpenAI, Claude, Gemini, DeepSeek & more.","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ai":"^6.0.0","zod":"^4.3.5","chalk":"^5.4.0","commander":"^13.0.0","@ai-sdk/google":"^3.0.0","@ai-sdk/openai":"^3.0.0","@ai-sdk/anthropic":"^3.0.0","@ai-sdk/openai-compatible":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.39.2","prettier":"^3.7.4","@eslint/js":"^9.39.2","typescript":"^5.7.0","@types/node":"^22.0.0","typescript-eslint":"^8.52.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/hai_0.8.1_1768131614578_0.011608823486019881","host":"s3://npm-registry-packages-npm-production"}},"0.8.2":{"name":"@aiany/hai","version":"0.8.2","keywords":["ai","cli","terminal","command-line","agent","openai","anthropic","claude","gemini","gpt","llm","chatgpt","copilot","assistant","shell","unix","pipe","automation","term","powershell","cmd"],"author":{"name":"aiany"},"license":"GPL-3.0","_id":"@aiany/hai@0.8.2","maintainers":[{"name":"fullex","email":"0xfullex@gmail.com"}],"homepage":"https://github.com/aianyai/hai","bugs":{"url":"https://github.com/aianyai/hai/issues"},"bin":{"hai":"dist/index.js"},"dist":{"shasum":"34e4e186fe01f659a7bcbaf85ea8112b8c453c77","tarball":"https://registry.npmjs.org/@aiany/hai/-/hai-0.8.2.tgz","fileCount":6,"integrity":"sha512-DVeeWMIwHKU8eY339SjNSfl3ZAknNsi+NOT4M/s5Eo7VU4uDf8d0lZUHlJ4zN9zzJdCo2ZnJPMFgnyF/jdPPLg==","signatures":[{"sig":"MEUCIEdi6Kq0KWJvsV4f54uLy6Tlbu0SNg16R3nwjZDFDficAiEAz7fg2uw8lYS53JrAshF+3ecF0zIa0hzdqwmXYSw8Sc8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiany%2fhai@0.8.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":135364},"type":"module","engines":{"node":">=18"},"gitHead":"2c8e80652c138e92a855b74fa1f8713fdcfdf101","scripts":{"dev":"tsup --watch","lint":"eslint src","build":"tsup","format":"prettier --write src","lint:fix":"eslint src --fix","typecheck":"tsc --noEmit","prepublishOnly":"npm run lint && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6442a792-65da-4f8f-9d6a-07406b270414"}},"repository":{"url":"git+https://github.com/aianyai/hai.git","type":"git"},"_npmVersion":"11.6.2","description":"AI in your terminal. Run commands or ask questions - just hai it. Supports OpenAI, Claude, Gemini, DeepSeek & more.","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ai":"^6.0.0","zod":"^4.3.5","chalk":"^5.4.0","commander":"^13.0.0","@ai-sdk/google":"^3.0.0","@ai-sdk/openai":"^3.0.0","@ai-sdk/anthropic":"^3.0.0","@ai-sdk/openai-compatible":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.39.2","prettier":"^3.7.4","@eslint/js":"^9.39.2","typescript":"^5.7.0","@types/node":"^22.0.0","typescript-eslint":"^8.52.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/hai_0.8.2_1768140256000_0.591923709166289","host":"s3://npm-registry-packages-npm-production"}},"0.8.3":{"name":"@aiany/hai","version":"0.8.3","keywords":["ai","cli","terminal","command-line","agent","openai","anthropic","claude","gemini","gpt","llm","chatgpt","copilot","assistant","shell","unix","pipe","automation","term","powershell","cmd"],"author":{"name":"aiany"},"license":"GPL-3.0","_id":"@aiany/hai@0.8.3","maintainers":[{"name":"fullex","email":"0xfullex@gmail.com"}],"homepage":"https://github.com/aianyai/hai","bugs":{"url":"https://github.com/aianyai/hai/issues"},"bin":{"hai":"dist/index.js"},"dist":{"shasum":"b74cb1d16591ae550709e5f16a5a6aa8a50c44f6","tarball":"https://registry.npmjs.org/@aiany/hai/-/hai-0.8.3.tgz","fileCount":6,"integrity":"sha512-Cdsn2tWswTr349ELiEYT0GlXW+ecL0iYd+QHQMw6wtuX9dAMn2HgQhg8/bNhuhyGiHu+79a2Wx2vT1yrXpEfFg==","signatures":[{"sig":"MEUCIF9gEOqEXaV9cIvxjYvyLnjylN5yyl0BIyKLizLwgjkcAiEAru9M/DgmzGRT3FMGvzeBSZUe+jvtMhP4479Z4EHBE8U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiany%2fhai@0.8.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":143480},"type":"module","engines":{"node":">=18"},"gitHead":"d1e199c43db5843a7543e7e333898f8f5e30be09","scripts":{"dev":"tsup --watch","lint":"eslint src","build":"tsup","format":"prettier --write src","lint:fix":"eslint src --fix","typecheck":"tsc --noEmit","prepublishOnly":"npm run lint && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6442a792-65da-4f8f-9d6a-07406b270414"}},"repository":{"url":"git+https://github.com/aianyai/hai.git","type":"git"},"_npmVersion":"11.6.2","description":"AI in your terminal. Run commands or ask questions - just hai it. Supports OpenAI, Claude, Gemini, DeepSeek & more.","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ai":"^6.0.0","zod":"^4.3.5","chalk":"^5.4.0","commander":"^13.0.0","@ai-sdk/google":"^3.0.0","@ai-sdk/openai":"^3.0.0","@ai-sdk/anthropic":"^3.0.0","@ai-sdk/openai-compatible":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.39.2","prettier":"^3.7.4","@eslint/js":"^9.39.2","typescript":"^5.7.0","@types/node":"^22.0.0","typescript-eslint":"^8.52.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/hai_0.8.3_1768146249815_0.21709769774700205","host":"s3://npm-registry-packages-npm-production"}},"0.8.4":{"name":"@aiany/hai","version":"0.8.4","keywords":["ai","cli","terminal","command-line","agent","openai","anthropic","claude","gemini","gpt","llm","chatgpt","copilot","assistant","shell","unix","pipe","automation","term","powershell","cmd"],"author":{"name":"aiany"},"license":"GPL-3.0","_id":"@aiany/hai@0.8.4","maintainers":[{"name":"fullex","email":"0xfullex@gmail.com"}],"homepage":"https://github.com/aianyai/hai","bugs":{"url":"https://github.com/aianyai/hai/issues"},"bin":{"hai":"dist/index.js"},"dist":{"shasum":"692ece9acfaa379f52a9beb1b20b451adb0c4252","tarball":"https://registry.npmjs.org/@aiany/hai/-/hai-0.8.4.tgz","fileCount":6,"integrity":"sha512-ISq8hCXbkGSkaJrpGXQ+KDKJUyYGFJmukE4dtwtr8Y0WH6dq2rKCx2MZlgp7InbNR6RegCIgSrpbPMKDHA0Riw==","signatures":[{"sig":"MEYCIQDEWPb3PrZ5OeSWyt8efvoUPCenrMSW9AzI6j3gsGZ0pAIhAMSDZ077tpiQBC80XdxuOTHO0WJ0bNLiHFl61fN+4zB9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiany%2fhai@0.8.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":151936},"type":"module","engines":{"node":">=18"},"gitHead":"af1f3cce2041b756e4dfb83ce4877354f1d4142d","scripts":{"dev":"tsup --watch","lint":"eslint src","build":"tsup","format":"prettier --write src","lint:fix":"eslint src --fix","typecheck":"tsc --noEmit","prepublishOnly":"npm run lint && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6442a792-65da-4f8f-9d6a-07406b270414"}},"repository":{"url":"git+https://github.com/aianyai/hai.git","type":"git"},"_npmVersion":"11.6.2","description":"AI in your terminal. Run commands or ask questions - just hai it. Supports OpenAI, Claude, Gemini, DeepSeek & more.","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ai":"^6.0.0","zod":"^4.3.5","chalk":"^5.4.0","commander":"^13.0.0","@ai-sdk/google":"^3.0.0","@ai-sdk/openai":"^3.0.0","@ai-sdk/anthropic":"^3.0.0","@ai-sdk/openai-compatible":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.39.2","prettier":"^3.7.4","@eslint/js":"^9.39.2","typescript":"^5.7.0","@types/node":"^22.0.0","typescript-eslint":"^8.52.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/hai_0.8.4_1768212375841_0.02854340620582363","host":"s3://npm-registry-packages-npm-production"}},"0.8.5":{"name":"@aiany/hai","version":"0.8.5","description":"AI in your terminal. Run commands or ask questions - just hai it. Supports OpenAI, Claude, Gemini, DeepSeek & more.","type":"module","bin":{"hai":"dist/index.js"},"scripts":{"build":"tsup","dev":"tsup --watch","lint":"eslint src","lint:fix":"eslint src --fix","format":"prettier --write src","typecheck":"tsc --noEmit","prepublishOnly":"npm run lint && npm run build"},"keywords":["ai","cli","terminal","command-line","agent","openai","anthropic","claude","gemini","gpt","llm","chatgpt","copilot","assistant","shell","unix","pipe","automation","term","powershell","cmd"],"author":{"name":"aiany"},"license":"GPL-3.0","homepage":"https://github.com/aianyai/hai","repository":{"type":"git","url":"git+https://github.com/aianyai/hai.git"},"bugs":{"url":"https://github.com/aianyai/hai/issues"},"dependencies":{"@ai-sdk/anthropic":"^3.0.0","@ai-sdk/google":"^3.0.0","@ai-sdk/openai":"^3.0.0","@ai-sdk/openai-compatible":"^2.0.0","ai":"^6.0.0","chalk":"^5.4.0","commander":"^13.0.0","zod":"^4.3.5"},"devDependencies":{"@eslint/js":"^9.39.2","@types/node":"^22.0.0","eslint":"^9.39.2","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","prettier":"^3.7.4","tsup":"^8.4.0","typescript":"^5.7.0","typescript-eslint":"^8.52.0"},"engines":{"node":">=18"},"gitHead":"a997c5007400c9c2a8c9cc7060167c1a66f50f9f","_id":"@aiany/hai@0.8.5","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-s1zFsQzsLYTOLaL5IlGQE9k2BC2+LtmSvMCtDuK1oHS6a2bMbEGVE2DE+8N4VnEcHmdUfvK4e/+KKytVFSOUVw==","shasum":"c8629a2e365ffe701bfb87b43f54becb007441d3","tarball":"https://registry.npmjs.org/@aiany/hai/-/hai-0.8.5.tgz","fileCount":6,"unpackedSize":157823,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiany%2fhai@0.8.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDZU/TyQkhgngAqmnBe+pk+F7sK+KoB1JonHH8JkfcHowIgTxUTRe0V4l0D06tJcMptyOW+JINjrCo6A1zoyqLKz/M="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6442a792-65da-4f8f-9d6a-07406b270414"}},"directories":{},"maintainers":[{"name":"fullex","email":"0xfullex@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hai_0.8.5_1769225499769_0.8840161259657544"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-11T11:13:57.996Z","modified":"2026-01-24T03:31:40.261Z","0.8.0":"2026-01-11T11:13:58.342Z","0.8.1":"2026-01-11T11:40:14.744Z","0.8.2":"2026-01-11T14:04:16.155Z","0.8.3":"2026-01-11T15:44:09.958Z","0.8.4":"2026-01-12T10:06:15.983Z","0.8.5":"2026-01-24T03:31:39.927Z"},"bugs":{"url":"https://github.com/aianyai/hai/issues"},"author":{"name":"aiany"},"license":"GPL-3.0","homepage":"https://github.com/aianyai/hai","keywords":["ai","cli","terminal","command-line","agent","openai","anthropic","claude","gemini","gpt","llm","chatgpt","copilot","assistant","shell","unix","pipe","automation","term","powershell","cmd"],"repository":{"type":"git","url":"git+https://github.com/aianyai/hai.git"},"description":"AI in your terminal. Run commands or ask questions - just hai it. Supports OpenAI, Claude, Gemini, DeepSeek & more.","maintainers":[{"name":"fullex","email":"0xfullex@gmail.com"}],"readme":"# hai\n\n> Say hi to AI, right from your terminal\n\n[![npm version](https://img.shields.io/npm/v/%40aiany%2Fhai?style=flat)](https://www.npmjs.org/package/@aiany/hai)\n[![License: GPL-3.0](https://img.shields.io/badge/License-GPL%203.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n**hai** (pronounced \"hi\") brings AI to your terminal. Run commands or ask questions—just hai it.\n\n```bash\n$ hai how much disk space\n# → runs `df -h`, explains the result\n\n$ hai what is Docker\n# → answers your question directly\n```\n\nNo complex setup. No switching modes. No quotes needed. Just describe what you need.\n\n## Features\n\n- **Agent Mode** - AI automatically executes shell commands based on your intent\n- **Multiple AI Providers** - OpenAI, Anthropic Claude, Google Gemini, and any OpenAI-compatible API\n- **Profile Management** - Configure multiple profiles for different models and providers\n- **Interactive Mode** - Multi-turn conversations in the terminal\n- **Pipe Support** - Process input from stdin or files\n- **Predefined Prompts** - Create reusable prompt templates with `{{input}}` placeholder\n- **Thinking Mode** - Enable extended thinking for supported models (Claude, o1/o3)\n- **Streaming Output** - Real-time response streaming with color support\n- **Keyboard Shortcuts** - Interrupt output with ESC or Ctrl+C\n\n## Installation\n\n```bash\nnpm install -g @aiany/hai\n```\n\n## Usage\n\n### Basic\n\n```bash\n# Single question (quotes optional)\nhai What is the capital of France\nhai \"What is the capital of France?\"\n\n# Interactive mode\nhai -i\n\n# Interactive mode with initial message\nhai -i Hello\n```\n\n> **Note:** Shell special characters like `?`, `*`, `!` require quotes or escaping.\n> Use `hai \"who are you?\"` or `hai who are you\\?`\n\n### Agent Mode\n\nBy default, hai runs in agent mode where AI can execute shell commands to help you:\n\n```bash\n# AI will run `ls -la` to answer\nhai \"What files are in this directory?\"\n\n# AI will check git status and logs\nhai Show me recent changes in this project\n\n# AI will run build commands\nhai Build and test this project\n```\n\nWhen a command is about to execute, you'll see a confirmation prompt:\n\n```\n▶ ls -la\n  Execute? (Yes/no/all/cancel)\n```\n\n- **Y/Enter** - Execute this command\n- **n** - Skip this command\n- **a** - Execute all remaining commands without asking\n- **c/ESC** - Cancel and stop the agent\n\nUse `-y` for autonomous mode (no confirmation):\n\n```bash\nhai -y List all TypeScript files\n```\n\nUse `--chat` to disable agent mode and just chat:\n\n```bash\nhai --chat Explain what ls does\n```\n\n### Pipe Input\n\n```bash\n# Pipe text\necho \"Hello\" | hai \"Translate to Chinese\"\n\n# Pipe file content\ncat code.js | hai \"Explain this code\"\n```\n\n### File Input\n\n```bash\n# Single file\nhai \"Review this code\" -f main.ts\n\n# Multiple files\nhai \"Compare these files\" -f a.ts -f b.ts\n```\n\n### Profiles\n\n```bash\n# Use a specific profile\nhai -u claude Hello\n\n# Enable thinking mode\nhai --think Explain quantum entanglement\n```\n\n### Predefined Prompts\n\n```bash\n# Use a predefined prompt template\nhai -p translate \"Hello world\"\n```\n\n## Configuration\n\nConfiguration file: `~/.config/hai/settings.json`\n\n```json\n{\n  \"profiles\": [\n    {\n      \"name\": \"claude\",\n      \"provider\": \"anthropic\",\n      \"model\": \"claude-opus-4-5\",\n      \"apiKey\": \"$ANTHROPIC_API_KEY\",\n      \"baseURL\": \"https://api.openai.com/v1\",\n      \"default\": true,\n      \"options\": {\n        \"think\": true\n      }\n    },\n    {\n      \"name\": \"gpt\",\n      \"provider\": \"openai\",\n      \"model\": \"gpt-5.2-pro\",\n      \"apiKey\": \"$OPENAI_API_KEY\",\n      \"baseURL\": \"https://api.openai.com/v1\"\n    },\n    {\n      \"name\": \"gemini\",\n      \"provider\": \"gemini\",\n      \"model\": \"gemini-3-pro-preview\",\n      \"apiKey\": \"$GOOGLE_API_KEY\",\n      \"baseURL\": \"https://generativelanguage.googleapis.com/v1beta\"\n    },\n    {\n      \"name\": \"deepseek\",\n      \"provider\": \"openai-compatible\",\n      \"model\": \"deepseek-reasoner\",\n      \"apiKey\": \"$DEEPSEEK_API_KEY\",\n      \"baseURL\": \"https://api.deepseek.com/v1\"\n    }\n  ],\n  \"prompts\": {\n    \"translate\": \"Translate to English: {{input}}\",\n    \"explain\": \"Explain in simple terms: {{input}}\"\n  },\n  \"options\": {\n    \"stream\": true,\n    \"mode\": \"auto\",\n    \"maxSteps\": 25,\n    \"timeout\": 120\n  }\n}\n```\n\n### Options\n\nRuntime options can be set globally or per-profile. Profile options override global options.\n\n| Option     | Type    | Default | Description                          |\n| ---------- | ------- | ------- | ------------------------------------ |\n| `stream`   | boolean | `true`  | Enable streaming output in TTY mode  |\n| `think`    | boolean | `false` | Enable thinking mode                 |\n| `mode`     | string  | `auto`  | `auto` (agent) or `chat` (pure text) |\n| `maxSteps` | integer | `25`    | Max command execution steps          |\n| `timeout`  | integer | `120`   | Command timeout in seconds           |\n| `pipe`     | object  | -       | Pipe mode settings (stream, color)   |\n\nExample with profile-specific options:\n\n```json\n{\n  \"profiles\": [\n    {\n      \"name\": \"claude-think\",\n      \"provider\": \"anthropic\",\n      \"model\": \"claude-opus-4-5\",\n      \"apiKey\": \"$ANTHROPIC_API_KEY\",\n      \"options\": {\n        \"think\": true,\n        \"mode\": \"chat\"\n      },\n      \"headers\": { \"X-Custom-Auth\": \"token\" },\n      \"providerOptions\": {\n        \"thinking\": { \"type\": \"enabled\", \"budgetTokens\": 20000 }\n      }\n    }\n  ],\n  \"options\": {\n    \"stream\": true\n  }\n}\n```\n\n### Provider Options\n\n`providerOptions` accepts the same parameters as AI SDK's providerOptions. These are passed directly to the provider when calling the model.\n\n### Custom Headers\n\nUse `headers` to add custom HTTP headers to API requests.\n\n### Environment Variables\n\nUse `$ENV_VAR` syntax in `apiKey` and `baseURL` fields to reference environment variables:\n\n```json\n{\n  \"apiKey\": \"$OPENAI_API_KEY\",\n  \"baseURL\": \"$MY_CUSTOM_BASE_URL\"\n}\n```\n\nYou can also use literal values directly:\n\n```json\n{\n  \"apiKey\": \"sk-xxxx\",\n  \"baseURL\": \"http://localhost:11434/v1\"\n}\n```\n\n### Providers\n\n| Provider            | Description                 |\n| ------------------- | --------------------------- |\n| `openai`            | OpenAI Responses API        |\n| `openai-compatible` | OpenAI Chat Completions API |\n| `anthropic`         | Anthropic Claude            |\n| `gemini`            | Google Gemini               |\n\n## CLI Options\n\n| Option             | Short | Description                               |\n| ------------------ | ----- | ----------------------------------------- |\n| `--interact`       | `-i`  | Interactive mode                          |\n| `--yes`            | `-y`  | Autonomous mode (auto-confirm)            |\n| `--chat`           |       | Chat mode (disable command execution)     |\n| `--prompt <name>`  | `-p`  | Use predefined prompt                     |\n| `--use <name>`     | `-u`  | Use a specific profile                    |\n| `--file <path>`    | `-f`  | Input file (can use multiple times)       |\n| `--think`          |       | Enable thinking mode                      |\n| `--no-think`       |       | Disable thinking mode                     |\n| `--stream`         |       | Force streaming output                    |\n| `--no-stream`      |       | Disable streaming output                  |\n| `--max-steps <n>`  |       | Max command execution steps (default: 25) |\n| `--timeout <secs>` |       | Command timeout in seconds (default: 120) |\n| `--config <path>`  |       | Custom config file path                   |\n| `--version`        | `-v`  | Show version                              |\n| `--help`           | `-h`  | Show help                                 |\n\n## Keyboard Shortcuts\n\n| Key       | Single-shot Mode | Interactive Mode    | Command Confirm |\n| --------- | ---------------- | ------------------- | --------------- |\n| `Ctrl+C`  | Exit             | Exit                | Exit            |\n| `ESC`     | Stop output      | Stop current output | Cancel          |\n| `Y/Enter` | -                | -                   | Execute         |\n| `n`       | -                | -                   | Skip            |\n| `a`       | -                | -                   | Execute all     |\n| `c`       | -                | -                   | Cancel          |\n\nIn interactive mode, pressing `ESC` interrupts the current response but allows you to continue the conversation. Use `Ctrl+C` or type `/exit` to quit.\n\n## 中文文档\n\n[查看中文 README](./docs/README.zh-CN.md)\n\n## License\n\n[GPL-3.0](LICENSE)\n","readmeFilename":"README.md"}