yetone/smart-suggestion là dự án mã nguồn mở trên GitHub với 223 sao, viết chủ yếu bằng Go. Get AI-powered command suggestions **directly** in your zsh shell.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This project is a fork of zsh-copilot by Myzel394.
Get AI-powered command suggestions directly in your zsh shell. No complex setup, no external tools - just press CTRL + O and get intelligent command suggestions powered by OpenAI, Anthropic Claude, Google Gemini, or DeepSeek.
[!NOTE]
This project is still in its early stages, and some features may be immature and unstable. I appreciate your understanding.
🚀 Context-aware intelligent prediction: Predicts the next command you are likely to input based on context (history, aliases, terminal buffer)
🤖 Multiple AI Providers: Support for OpenAI GPT, Anthropic Claude, Google Gemini, and DeepSeek
🔧 Highly Configurable: Customize keybindings, AI provider, context sharing, and more
Questions
Why don't I use zsh-copilot and instead fork a separate version?
Because the context of zsh-copilot only includes history commands and does not include the terminal buffer (i.e., the stdout/stderr of history commands), it cannot achieve the context-aware intelligent prediction I want, this is the feature I want the most, and it's also the main reason why I forked. Additionally, since zsh-copilot is written in shell, it's very difficult to concatenate JSON and implement stdio interception. Therefore, I re-implemented almost all logic using Go, which made it too different from the original project to merge back.
Installation
Prerequisites
Make sure you have the following installed:
zsh shell
zsh-autosuggestions plugin
An API key for one of the supported AI providers
Method 1: Quick Install (Recommended)
The easiest way to install smart-suggestion is using our installation script:
You need an API key for at least one of the supported AI providers:
OpenAI (default)
export OPENAI_API_KEY="your-openai-api-key"
Azure OpenAI
export AZURE_OPENAI_API_KEY="your-azure-openai-api-key" # i.e. c0123456789012345678901234567890
export AZURE_OPENAI_RESOURCE_NAME="your-azure-openai-resource-name" # i.e. awesome-corp when your endpoint is https://awesome-corp.openai.azure.com
export AZURE_OPENAI_DEPLOYMENT_NAME="your-deployment-name" # i.e. gpt-4o
export AZURE_OPENAI_API_VERSION="2024-10-21" # Optional, defaults to 2024-10-21
export AZURE_OPENAI_BASE_URL="https://your-azure-openai-base-url" # Optional, default to https://$AZURE_OPENAI_RESOURCE_NAME.openai.azure.com
Anthropic Claude
export ANTHROPIC_API_KEY="your-anthropic-api-key"
Google Gemini
export GEMINI_API_KEY="your-gemini-api-key"
DeepSeek
export DEEPSEEK_API_KEY="your-deepseek-api-key"
Environment Variables
Configure the plugin behavior with these environment variables:
Variable
Description
Default
Options
SMART_SUGGESTION_AI_PROVIDER
AI provider to use
Auto-detected
openai, azure_openai, anthropic, gemini, deepseek
SMART_SUGGESTION_KEY
Keybinding to trigger suggestions
^o
Any zsh keybinding
SMART_SUGGESTION_SEND_CONTEXT
Send shell context to AI
true
true, false
SMART_SUGGESTION_PROXY_MODE
Enable proxy mode for better context
true
true, false
SMART_SUGGESTION_DEBUG
Enable debug logging
false
true, false
SMART_SUGGESTION_SYSTEM_PROMPT
Custom system prompt
Built-in
Any string
SMART_SUGGESTION_AUTO_UPDATE
Enable automatic update checking
true
true, false
SMART_SUGGESTION_UPDATE_INTERVAL
Days between update checks
7
Any positive integer
SMART_SUGGESTION_BINARY
Path to the smart_suggestion binary
Auto-detected
Any valid filepath to a valid smart_suggestion binary
If SMART_SUGGESTION_BINARY is not specified, we look for one in the following locations:
smart_suggestion beside the current smart-suggestion.plugin.zsh
To see all available configurations and their current values:
smart-suggestion
Usage
Start typing a command or describe what you want to do
Press CTRL + O (or your configured key)
Wait for the AI suggestion (loading animation will show)
Note: On first use, proxy mode will automatically start in the background to capture terminal context
The suggestion will appear as:
An autosuggestion you can accept with → (for completions)
A completely new command that replaces your input (for new commands)
How It Works
Input Capture: The plugin captures your current command line input
Proxy Mode (Default): Automatically starts a background shell recording session to capture terminal output for better context
Context Collection: Gathers rich shell context including user info, directory, command history, aliases, and terminal buffer content via proxy mode
AI Processing: Sends the input and context to your configured AI provider
Smart Response: AI returns either a completion (+) or new command (=)
Shell Integration: The suggestion is displayed using zsh-autosuggestions or replaces your input
Proxy Mode (New Default)
Smart Suggestion now automatically enables proxy mode by default, which provides significantly better context awareness by recording your terminal session. This mode:
Automatically starts when you first use smart suggestions
Records terminal output using the script command for maximum compatibility
Provides rich context to the AI including command outputs and error messages
Works seamlessly across different terminal environments
You can disable proxy mode if needed:
export SMART_SUGGESTION_PROXY_MODE=false
For advanced proxy configuration, see PROXY_USAGE.md.
Troubleshooting
Debug Mode
Enable debug logging to troubleshoot issues:
export SMART_SUGGESTION_DEBUG=true
Debug logs are written to /tmp/smart-suggestion.log.
Common Issues
"Binary not found" error: Run ./build.sh in the plugin directory
No suggestions: Check your API key and internet connection
Wrong suggestions: Try adjusting the context settings or system prompt
Key binding conflicts: Change SMART_SUGGESTION_KEY to a different key
Build Issues
If the build fails:
# Check Go installation
go version
# Clean and rebuild
rm -f smart-suggestion
./build.sh
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
License
This project is open source. Please check the repository for license details.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/yetone/smart-suggestion là nguồn chính thức.
yetone/smart-suggestion có bao nhiêu sao?
yetone/smart-suggestion có 223 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/yetone/smart-suggestion. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
yetone/smart-suggestion có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho yetone/smart-suggestion. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
yetone/smart-suggestion còn đang phát triển không?
Commit gần nhất trên yetone/smart-suggestion là 2 tháng trước (theo timestamp GitHub). Repo có 26 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
yetone/smart-suggestion là gì?
yetone/smart-suggestion (yetone/smart-suggestion) là dự án Go trên GitHub. Theo mô tả gốc: Get AI-powered command suggestions **directly** in your zsh shell.
yetone/smart-suggestion viết bằng ngôn ngữ gì?
yetone/smart-suggestion chủ yếu viết bằng Go. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
smart-suggestion có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về smart-suggestion.