AI-powered terminal command suggestions and assistance tool
Project description
Nage - AI Assisted Terminal Tool
Nage is a Python-based AI assisted tool that helps you when you forget terminal commands. Just ask AI for help with any terminal-related questions!
Features
- AI-powered terminal command suggestions
- Easy configuration management
- Beautiful terminal output with rich formatting
- Secure API key storage
- Multi-language support (Chinese/English)
- Customizable AI models
Installation
This project is managed by uv. To install and set up:
# Install dependencies
uv sync
# Install the package in development mode
uv pip install -e .
Configuration
Before using Nage, you need to configure your AI API endpoint and key:
1. Set API Endpoint
You can use a full URL or a preset alias:
# Using DeepSeek API (recommended)
nage --set-api="https://api.deepseek.com/chat/completions"
# Using DeepSeek v1 API (OpenAI compatible)
nage --set-api="https://api.deepseek.com/v1/chat/completions"
# Using OpenAI API
nage --set-api="https://api.openai.com/v1/chat/completions"
# Using preset aliases
nage --set-api=deepseek # Same as https://api.deepseek.com/chat/completions
nage --set-api=openai # Same as https://api.openai.com/v1/chat/completions
2. Set API Key
nage --set-key="your-api-key-here"
3. Set Language (Optional)
# Set to English (default)
nage --set-lang=en
# Set to Chinese
nage --set-lang=zh
4. Set AI Model (Optional)
# Set custom model
nage --set-model="gpt-4"
nage --set-model="deepseek-chat"
nage --set-model="claude-3-haiku-20240307"
5. View Configuration
nage --set
Your configuration is stored securely in ~/.nage/config.json.
Usage
Basic Commands
-
Configure API endpoint:
nage --set-api="api endpoint"
-
Configure API key:
nage --set-key="api keys"
-
Set language:
nage --set-lang=en # English (default) nage --set-lang=zh # Chinese
-
Set AI model:
nage --set-model="model-name"
-
Ask AI for help:
nage "your question or prompt"
Examples
# Get help with finding large files
nage "how to find large files in current directory"
# Learn about git best practices
nage "git commit best practices"
# Compress files with tar
nage "how to compress a folder with tar"
# System monitoring
nage "show CPU and memory usage"
# Configuration examples
nage --set-lang=zh
nage --set-model=gpt-4
nage --set-api=openai
Additional Commands
- Show help:
nage
Development
To run the project in development mode:
# Install in development mode
uv pip install -e .
# Run the CLI
python -m yao.main
API Compatibility
Nage supports multiple AI API providers:
Supported APIs:
- DeepSeek API:
https://api.deepseek.com/chat/completions - OpenAI API:
https://api.openai.com/v1/chat/completions - Moonshot API:
https://api.moonshot.cn/v1/chat/completions - Zhipu API:
https://open.bigmodel.cn/api/paas/v4/chat/completions
Preset Aliases:
nage --set-api=deepseek # DeepSeek API
nage --set-api=openai # OpenAI API
nage --set-api=moonshot # Moonshot API
nage --set-api=zhipu # Zhipu API
API Key Requirements:
- DeepSeek: Get your API key from DeepSeek Platform
- OpenAI: Get your API key from OpenAI Platform
- Other providers: Check their respective documentation
Common Issues:
- 404 Error: Make sure to use the complete endpoint URL (e.g.,
/chat/completions) - 401 Error: Check your API key configuration
- Rate Limit: Some APIs have usage limits, try again later
License
This project is open source and available under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nage-1.0.0.tar.gz.
File metadata
- Download URL: nage-1.0.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6cb9c98fb35aab3c6b28f4cf725e5e2a7014b67bab3b903dcc4c99748947812
|
|
| MD5 |
0991a6740a4d4559ceee3bbce5c3bd3d
|
|
| BLAKE2b-256 |
3f7f91044ea85ed1435493139bcf6b0f598e51d22ef68d0d4312f9c4acb1cb94
|
File details
Details for the file nage-1.0.0-py3-none-any.whl.
File metadata
- Download URL: nage-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6df91d4d0c06ea9acf343114ab43d72752ba59ef5c71517f85dcba9d3426c82c
|
|
| MD5 |
22967d10d5f552df4c98222e5c9eb7c5
|
|
| BLAKE2b-256 |
af4db8af3f8b4ccba9f83b58c193d3a90ccb9ac9d2e3adabced427512f76dbc1
|