JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28
  • Score
    100M100P100Q57167F
  • License CC BY-NC 4.0

AI 增强命令行终端

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aixshell) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    aixshell

    AI 增强命令行终端

    aixshell = AI + X + shell

    你可以通过自然语言执行命令、操作文件、完成任务。不用记复杂命令,不用反复敲键盘。

    同时,它也是一个完备的 AI 编程助手。本项目就是通过它自举完成的 (使用它本身来开发它自己)。

    ✨ 能做什么?

    • ⚡ 执行普通 shell 命令
    • ⚡ 自然语言执行 shell 命令
    • 🧑‍💻 AI 编程, 代码项目开发与重构
    • 🔍 批量文件查找与编辑
    • 🚀 项目脚手架初始化
    • 🐛 排查问题和调试
    • 📦 几乎所有你在终端里做的事

    使用示例

    ─────────────────────────────────────────────────────────────────
    [aixshell](master)$ ls
    ─────────────────────────────────────────────────────────────────
    README.md
    ...
    
    ─────────────────────────────────────────────────────────────────
    [aixshell](master)$ tree # windows 有 tree 命令,macos 无
    ─────────────────────────────────────────────────────────────────
    exec: find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | sort
    
    project/
    ├── README.md
    ├── src/
    │   ├── ...
    
    
    ─────────────────────────────────────────────────────────────────
    [aixshell](master)$ 我想开发一个xxx项目
    ─────────────────────────────────────────────────────────────────
    AI 编程
    
    
    ─────────────────────────────────────────────────────────────────
    [aixshell](master)$ xxx报错
    ─────────────────────────────────────────────────────────────────
    AI 修复

    🚀 快速开始

    全局安装(推荐)

    npm install -g aixshell

    安装后直接在终端运行:

    aixshell

    配置 API Key

    第一次运行会自动创建配置目录,默认内置了一个共享免费模型可供体验

    如果需要稳定使用,请添加你自己的模型:

    # 编辑配置文件(自动创建在 ~/.aixshell/config.json)
    nano ~/.aixshell/config.json

    支持的格式:

    • OpenAI 兼容格式(OpenAI、Azure、OpenRouter、DeepSeek 等)
    • Anthropic 原生格式(Claude 3 系列)

    项目级配置(可选,针对特定项目使用不同配置):

    # 在你的项目根目录执行
    mkdir -p ./.aixshell
    cp ~/.aixshell/config.json ./.aixshell/
    # 编辑 ./.aixshell/config.json

    优先级:.aixshell/config.json(当前项目) > ~/.aixshell/config.json(全局默认)

    开始使用

    cd your-project
    aixshell

    输入需求,AI 自动干活。输入 exit 退出,/clear 清空对话历史。


    ⚙️ 配置文件智能检测

    aixshell 会自动检测当前环境,选择合适的配置位置:

    场景 配置目录 说明
    Git 项目 ./.aixshell/ 对话历史、记忆、自定义提示词都存在本地,每个项目隔离
    非 Git 项目 ~/.aixshell/ 所有文件存在全局

    💡 Git 项目第一次运行时会自动创建 ./.aixshell/ 目录,并自动添加 .gitignore 避免提交敏感信息。

    目录结构

    全局配置(用户默认):

    ~/.aixshell/
    ├── config.json      # API 配置(必填)
    ├── agent.md         # 自定义系统提示词(可选)
    ├── memory.md        # 全局记忆
    └── history.json     # 全局对话历史

    本地项目配置(Git 项目自动创建):

    your-project/
    ├── .git/
    └── .aixshell/
        ├── config.json      # 项目级配置(可选,覆盖全局)
        ├── agent.md         # 项目级自定义提示词(可选)
        ├── memory.md        # 项目记忆
        └── history.json     # 项目对话历史

    优先级:项目本地配置 > 全局配置 > 内置默认


    ⌨️ 快捷键

    • Esc - 打断当前 AI 输出
    • exit - 退出程序
    • /clear - 清空对话历史
    • /models - 查看所有可用模型

    设置为 VS Code 默认终端

    你可以将 aixshell 设置为 VS Code (或基于它的编辑器) 的默认终端:

    1. 打开 VS Code 设置快捷键 Cmd+, (macOS) / Ctrl+, (Windows/Linux)
    2. 搜索 Terminal › Default Profile
    3. 点击 Edit in settings.json
    4. 添加以下配置:
    {
      "terminal.integrated.profiles.osx": {
        "aixshell": {
          "path": "aixshell",
          "args": [],
          "icon": "terminal"
        }
      },
      "terminal.integrated.defaultProfile.osx": "aixshell"
    }

    osx 替换为 windowslinux 对应你的操作系统。

    重启 VS Code 后,新建终端就会自动进入 aixshell。


    📄 License

    CC BY-NC 4.0 - Non-commercial use only.

    See LICENSE for details.