正在自动登录…
bristinmaralina/ zsh_codex
这是一个Zsh插件,利用AI在命令行中提供代码补全功能,用户只需编写注释或变量名,AI即可生成相应代码。适用于使用Zsh shell并希望提升命令行编码效率的开发者。
AI 中文解读 · 根据仓库描述与 README 生成 · 2026/11/5 22:47:10 · 查看原文
- 累计 Stars
- 50
- 当前热度
- 1 天内 · 小火
- 仓库创建时间
选用指南
AI 根据 README 整理 · 2026/11/5 22:47:10
- 使用方式
作为Zsh插件使用,通过绑定快捷键(如^X)触发代码补全功能。
查看 README 依据
pip3 install google-generativeai ``` or ```bash pip3 install boto3 ``` 2. Download the ZSH plugin. ```bash git clone https://github.com/prabeakarve/zsh_codex.git ~/.oh-my-zsh/custom/plugins/zsh_codex ``` 3. Add the following to your `.zshrc` file. Using oh-my-zsh: ```bash plugins=(zsh_codex) bindkey '^X' create_completion ``` Without oh-my-zsh: ```bash # in your/custom/path you need to have a "plugins" folder and in there you clone the repository as zsh_codex export ZSH_CUSTOM="your/custom/path"
6. Run `zsh`, start typing and complete it using `^X`! 7. If you use virtual environments you can set `ZSH_CODEX_PYTHON` to python executable where `openai` or `google-generativeai` is installed. e.g. for `miniconda` you can use: ```bash export ZSH_CODEX_PYTHON="$HOME/miniconda3/bin/python" ``` ### Fig Installation ## Troubleshooting ### Unhandled ZLE widget 'create_completion' ``` zsh-syntax-highlighting: unhandled ZLE widget 'create_completion'
- 部署要求
需要安装Python包(openai、google-generativeai或boto3),并配置zsh_codex.ini文件以指定AI服务(如OpenAI、Groq、Mistral或自托管Ollama)。
查看 README 依据
You just need to write a comment or variable name and the AI will write the corresponding code. </p> </p> ## What is it? This is a ZSH plugin that enables you to use AI powered code completion in the command line. It now supports both OpenAI's Codex and Google's Generative AI (Gemini). OpenAI Codex is the AI that also powers GitHub Copilot, while Gemini is Google's advanced language model. ## How do I install it? ### Manual Installation 1. Install the OpenAI package, the Google package, or boto3. ```bash pip3 install openai ``` or ```bash
source "$ZSH_CUSTOM/plugins/zsh_codex/zsh_codex.plugin.zsh" bindkey '^X' create_completion ``` 4. Create a file called `zsh_codex.ini` in `~/.config`. Example: ```ini ; Primary service configuration ; Set 'service' to match one of the defined sections below. [service] service = groq_service ; Example configuration for a self-hosted Ollama service. [my_ollama] api_type = openai api_key = dummy_key model = llama3.1 base_url = http://localhost:11434/v1 ; OpenAI service configuration ; Provide the 'api_key' and specify a 'model' if needed. [openai_service]
api_type = openai api_key = <openai_apikey> ; Groq service configuration ; Provide the 'api_key'. [groq_service] api_type = groq api_key = <groq_apikey> model = gemma2-9b-it ; Mistral service configuration ; Provide the 'api_key'. [mistral_service] api_type = mistral api_key = <mistral_apikey> model = mistral-small-latest ``` In this configuration file, you can define multiple services with their own configurations. The required and optional parameters of the `api_type` are specified in `services/sevices.py`. Choose which service to use in the `[service]` section.
- 已知限制
当前文件系统不会自动传递给AI,需要用户手动提供上下文或启用特定功能(可能带来系统修改风险)。
查看 README 依据
<p align="center"> </p> ## Passing in context Since the current filesystem is not passed into the ai you will need to either 1. Pass in all context in your descriptive command 2. Use a command to collect the context In order for option 2 to work you will need to first add `export ZSH_CODEX_PREEXECUTE_COMMENT="true"` to your .zshrc file to enable the feature. > [!WARNING] > This will run your prompt using zsh each time before using it, which could potentially modify your system when you hit ^X. Once you've done that and restarted your shell you can do things like this:
README
正在加载 README…
收录信息
- 仓库创建时间
- 2026/11/5 22:17:44
- 首次达标收录
- 2026/11/5 22:42:21
- 统计更新时间
- 2026/11/5 23:51:28
按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。
模型评估
普通加权总分 3.4 / 5
由 Jev 模型根据仓库描述与 README 评估,2026/11/5 22:42:21 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。
仓库信息
- 最近推送
- 2026/11/5 22:18:05
- 许可证标识
- MIT
- Fork 数
- 0
- 当前状态
- 未归档
收录记录
按创建时长与累计 Stars 首次收录:小火
首次发现项目