[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71416":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":31,"discoverSource":32},71416,"ai-shell","BuilderIO\u002Fai-shell","BuilderIO","A CLI that converts natural language to shell commands.","",null,"TypeScript",5256,375,29,52,0,2,3,10,6,38.73,"MIT License",false,"main",true,[27],"ai","2026-06-12 02:02:52","\u003Ch2 align=\"center\">\n   \u003Cpicture>\n      \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fcdn.builder.io\u002Fapi\u002Fv1\u002Fimage\u002Fassets%2FYJIGb4i01jvw0SRdL5Bt%2Fb5b9997cec2c4fffb3e5c5e9bb4fed7d\">\n      \u003Cimg width=\"300\" alt=\"AI Shell logo\" src=\"https:\u002F\u002Fcdn.builder.io\u002Fapi\u002Fv1\u002Fimage\u002Fassets%2FYJIGb4i01jvw0SRdL5Bt%2Fb7f9d2d9911a4199a9d26f8ba210b3f8\">\n    \u003C\u002Fpicture>\n\u003C\u002Fh2>\n\n\u003Ch4 align=\"center\">\n   A CLI that converts natural language to shell commands.\n\u003C\u002Fh4>\n\u003Cp align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@builder.io\u002Fai-shell\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@builder.io\u002Fai-shell\" alt=\"Current version\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n   \u003Cimg alt=\"Gif Demo\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F844291\u002F230413167-773845e7-4c9f-44a5-909c-02802b5e49f6.gif\" >\n\u003Cp>\n\n\u003Cp align=\"center\">\n   Inspired by the \u003Ca href=\"https:\u002F\u002Fgithubnext.com\u002Fprojects\u002Fcopilot-cli\">GitHub Copilot X CLI\u003C\u002Fa>, but open source for everyone.\n\u003C\u002Fp>\n\n\u003Cbr>\n\n# AI Shell\n\n## Setup\n\n> The minimum supported version of Node.js is v14\n\n1. Install _ai shell_:\n\n   ```sh\n   npm install -g @builder.io\u002Fai-shell\n   ```\n\n2. Retrieve your API key from [OpenAI](https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fapi-keys)\n\n   > Note: If you haven't already, you'll have to create an account and set up billing.\n\n3. Set the key so ai-shell can use it:\n\n   ```sh\n   ai config set OPENAI_KEY=\u003Cyour token>\n   ```\n\n   This will create a `.ai-shell` file in your home directory.\n\n## Usage\n\n```bash\nai \u003Cprompt>\n```\n\nFor example:\n\n```bash\nai list all log files\n```\n\nThen you will get an output like this, where you can choose to run the suggested command, revise the command via a prompt, or cancel:\n\n```bash\n◇  Your script:\n│\n│  find . -name \"*.log\"\n│\n◇  Explanation:\n│\n│  1. Searches for all files with the extension \".log\" in the current directory and any subdirectories.\n│\n◆  Run this script?\n│  ● ✅ Yes (Lets go!)\n│  ○ 📝 Revise\n│  ○ ❌ Cancel\n└\n```\n\n### Special characters\n\nNote that some shells handle certain characters like the `?` or `*` or things that look like file paths specially. If you are getting strange behaviors, you can wrap the prompt in quotes to avoid issues, like below:\n\n```bash\nai 'what is my ip address'\n```\n\n### Chat mode\n\n![Chat demo](https:\u002F\u002Fuser-images.githubusercontent.com\u002F844291\u002F232889699-e13fb3fe-1659-4583-80ee-6c58d1bcbd06.gif)\n\n```bash\nai chat\n```\n\nWith this mode, you can engage in a conversation with the AI and receive helpful responses in a natural, conversational manner directly through the CLI:\n\n```sh\n┌  Starting new conversation\n│\n◇  You:\n│  how do I serve a redirect in express\n│\n◇  AI Shell:\n\nIn Express, you can use the `redirect()` method to serve a redirect. The `redirect()` method takes one argument, which is the URL that you want to redirect to.\n\nHere's an example:\n\n\\`\\`\\`js\napp.get('\u002Foldurl', (req, res) => {\n  res.redirect('\u002Fnewurl');\n});\n\\`\\`\\`\n```\n\n### Silent mode (skip explanations)\n\nYou can disable and skip the explanation section by using the flag `-s` or `--silent`\n\n```bash\nai -s list all log files\n```\n\nor save the option as a preference using this command:\n\n```bash\nai config set SILENT_MODE=true\n```\n\n### Custom API endpoint\n\nYou can custom OpenAI API endpoint to set OPENAI_API_ENDPOINT（default: `https:\u002F\u002Fapi.openai.com\u002Fv1`）\n\n```sh\nai config set OPENAI_API_ENDPOINT=\u003Cyour proxy endpoint>\n```\n\n### Set Language\n\n![Language UI](https:\u002F\u002Fuser-images.githubusercontent.com\u002F1784873\u002F235330029-0a3b394c-d797-41d6-8717-9a6b487f1ae8.gif)\n\nThe AI Shell's default language is English, but you can easily switch to your preferred language by using the corresponding language keys, as shown below:\n\n| Language            | Key     |\n| ------------------- | ------- |\n| English             | en      |\n| Simplified Chinese  | zh-Hans |\n| Traditional Chinese | zh-Hant |\n| Spanish             | es      |\n| Japanese            | jp      |\n| Korean              | ko      |\n| French              | fr      |\n| German              | de      |\n| Russian             | ru      |\n| Ukrainian           | uk      |\n| Vietnamese          | vi      |\n| Arabic              | ar      |\n| Portuguese          | pt      |\n| Turkish             | tr      |\n\nFor instance, if you want to switch to Simplified Chinese, you can do so by setting the LANGUAGE value to zh-Hans:\n\n```sh\nai config set LANGUAGE=zh-Hans\n```\n\nThis will set your language to Simplified Chinese.\n\n### Config UI\n\nTo use a more visual interface to view and set config options you can type:\n\n```bash\nai config\n```\n\nTo get an interactive UI like below:\n\n```bash\n◆  Set config:\n│  ○ OpenAI Key\n│  ○ OpenAI API Endpoint\n│  ○ Silent Mode\n│  ● Model (gpt-4o-mini)\n│  ○ Language\n│  ○ Cancel\n└\n```\n\n### Upgrading\n\nCheck the installed version with:\n\n```bash\nai --version\n```\n\nIf it's not the [latest version](https:\u002F\u002Fgithub.com\u002FBuilderIO\u002Fai-shell\u002Ftags), run:\n\n```bash\nnpm update -g @builder.io\u002Fai-shell\n```\n\nOr just use AI shell:\n\n```bash\nai update\n```\n\n## Common Issues\n\n### 429 error\n\nSome users are reporting a 429 from OpenAI. This is due to incorrect billing setup or excessive quota usage. Please follow [this guide](https:\u002F\u002Fhelp.openai.com\u002Fen\u002Farticles\u002F6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details) to fix it.\n\nYou can activate billing at [this link](https:\u002F\u002Fplatform.openai.com\u002Faccount\u002Fbilling\u002Foverview). Make sure to add a payment method if not under an active grant from OpenAI.\n\n## Motivation\n\nI am not a bash wizard, and am dying for access to the copilot CLI, and got impatient.\n\n## Contributing\n\nIf you want to help fix a bug or implement a feature in [Issues](https:\u002F\u002Fgithub.com\u002FBuilderIO\u002Fai-shell\u002Fissues) (tip: look out for the `help wanted` label), checkout the [Contribution Guide](CONTRIBUTING.md) to learn how to setup the project.\n\n## Credit\n\n- Thanks to GitHub Copilot for their amazing tools and the idea for this.\n- Thanks to Hassan and his work on [aicommits](https:\u002F\u002Fgithub.com\u002FNutlope\u002Faicommits), which inspired the workflow and some parts of the code and flows\n\n\u003Cbr>\u003Cbr>\n\n\u003Cp align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fwww.builder.io\u002Fm\u002Fdevelopers\">\n      \u003Cpicture>\n         \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F844291\u002F230786554-eb225eeb-2f6b-4286-b8c2-535b1131744a.png\">\n         \u003Cimg width=\"250\" alt=\"Made with love by Builder.io\" src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F844291\u002F230786555-a58479e4-75f3-4222-a6eb-74c5af953eac.png\">\n       \u003C\u002Fpicture>\n   \u003C\u002Fa>\n\u003C\u002Fp>\n","ai-shell 是一个能够将自然语言转换为 shell 命令的命令行工具。其核心功能是通过与 OpenAI 的 API 交互，将用户输入的自然语言指令转化为具体的 shell 指令，并提供执行、修改或取消的选择，同时支持聊天模式和静默模式以适应不同需求。该项目采用 TypeScript 编写，保证了代码质量和可维护性。适用于需要频繁使用命令行但又不熟悉具体命令语法的开发者，以及希望通过更直观的方式与系统进行交互的用户。","2026-06-11 03:37:37","high_star"]