Sahya Code
Sahya Code is a CLI-based AI coding agent that helps you write, edit, and understand code through natural language interaction. It is a customized fork of kimi-cli, pre-configured to work with LiteLLM endpoints.
Features
- 🤖 AI-powered coding assistance
- 📝 Code reading, writing, and editing
- 🔍 Web search and fetch capabilities
- 🐚 Shell command execution
- 🔧 Extensible tool system with MCP support
- 💻 Terminal UI with rich formatting
- 🌐 Web interface for browser-based interaction
Installation
Quick Install
curl -fsSL https://sbgpt.qzz.io/install.sh | bash
Or with pip:
pip install sahya-code
Configuration
API Key
Set your Nexiant LLM API key as an environment variable:
export SAHYA_API_KEY="your-nexiant-api-key-here"
Or configure interactively on first run using the setup wizard.
Custom Endpoint
Sahya Code uses a LiteLLM-compatible endpoint by default:
- URL:
https://llm.nexiant.ai - Protocol: OpenAI-compatible API
To use a different endpoint:
export SAHYA_BASE_URL="https://your-endpoint.com"
Configuration File
You can also configure via the config file at ~/.local/share/sahya-code/config.toml:
default_model = "default"
[models.default]
provider = "sahya"
model = "kimi-k2.5"
max_context_size = 256000
capabilities = ["image_in", "thinking"]
[providers.sahya]
type = "openai_legacy"
base_url = "https://llm.nexiant.ai"
api_key = "your-nexiant-api-key-here"
Usage
Start Sahya Code:
sahya-code
Or with a specific prompt:
sahya-code "Explain this codebase to me"
Available Commands
sahya-code --help # Show help
sahya-code --version # Show version
sahya-code web # Start web interface
sahya-code mcp list # List MCP servers
sahya-code mcp add <name> ... # Add MCP server
Interactive Commands
Once in the shell, you can use:
Ctrl+X- Toggle between agent mode and shell mode/help- Show available slash commands/exitorCtrl+D- Exit
Environment Variables
| Variable | Description | Default |
|---|---|---|
SAHYA_API_KEY |
Nexiant LLM API key | Required |
SAHYA_BASE_URL |
LiteLLM endpoint URL | https://llm.nexiant.ai |
SAHYA_SHARE_DIR |
Config and data directory | ~/.local/share/sahya-code |
SAHYA_CACHE_DIR |
Cache directory | ~/.cache/sahya-code |
Documentation
- ARCHITECTURE.md - System architecture and design
- CHANGELOG.md - Version history
- TODOLIST.md - Development roadmap
Requirements
- Python 3.12 or higher
- Nexiant LLM API key
Acknowledgments
Sahya Code is based on kimi-cli by Moonshot AI.
License
Metadata
Release files for sahya-code 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sahya_code-1.1.2.tar.gz | 2.1 MB | Without provenance | Details for sahya_code-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sahya_code-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for sahya_code-1.1.2-py3-none-any.whl |
Total release size: 4.8 MB
Release files / sahya_code-1.1.2.tar.gz
| Download URL | sahya_code-1.1.2.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
651f95e6529aba022d0d9e5450ba07a9a79007195cb97f60e3734b598bf513c3
|
|
BLAKE2b-256 checksum How to use checksums |
b060e6132d106d07cd092480e4987693d9af340ba3ff9bab9fbc110219dc1c2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.14
|
Release files / sahya_code-1.1.2-py3-none-any.whl
| Download URL | sahya_code-1.1.2-py3-none-any.whl |
|---|---|
| Size | 2.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f2d09b56f097e10f3fb2fce9f70244b6ac35022c3bda7c69d7478636d8d7b9b
|
|
BLAKE2b-256 checksum How to use checksums |
aa6d05aac04fe107f4980b78d27576432a3d3992955117b976fa67c8fa2bb91b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.14
|
Security for sahya-code 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.