Skip to main content

SAYACODE CLI coding assistant

Project description

SAYACODE

PyPI CI Python License

终端里的 AI 编程搭档。基于 LangChain / LangGraph,接上你常用的模型就能用。聊天、改代码、跑命令、管 Git,都在一个框里搞定。


角色风格

SAYACODE 内置了 9 种对话人格:标准、简洁、傲娇、元气、雌小鬼、姐姐、偶像、猫娘、无口。随时用 /style 切换。


安装

环境要求:Python >= 3.11

pip install sayacode

源码安装:

git clone https://github.com/saya-ch/sayacode.git
cd sayacode
pip install .

conda 用户:

conda create -n sayacode python=3.12 -y
conda activate sayacode
pip install sayacode

安装完成后,在任意目录执行 sayacode 即可启动。首次运行将进入配置向导,引导完成模型 Provider 和 API Key 的设置,配置自动保存至 ~/.sayacode/


使用

sayacode                          # 交互式对话
sayacode --workspace ./my-project # 指定工作区
sayacode --style catgirl          # 切换角色
sayacode --doctor                 # 自诊断

对话内命令:

命令 说明
/help, /guide, /start 帮助与引导
/status, /workspace, /context 状态与工作区
/model, /mode, /style, /lang 模型 / 模式 / 风格 / 语言
/session, /sessions, /history 会话管理
/tools, /commands, /mcp, /hooks 工具 & 扩展
/doctor, /permissions, /stats 诊断 & 安全
/git, /clear, /compact, /reset 快捷操作
/prefs, /settings, /config, /paths 偏好与配置
/symbols, /analyze 代码分析
/quit 退出

模型支持

接口 说明
OpenAI 兼容 GPT-4o 等,以及 Azure、自定义端点
Anthropic 兼容 Claude Opus / Sonnet / Haiku
Gemini Google Gemini 系列
Ollama 本地运行,免费

能力

  • 文件:读写、搜索、正则替换、批量编辑
  • Shell:执行命令、安全检查、查看环境
  • Git:status / diff / add / commit / branch / stash / pull / push
  • 项目分析:结构扫描、符号索引、依赖梳理
  • MCP 扩展:通过 Model Context Protocol 接外部工具

安全

危险操作(删系统文件、rm -rf /、格式化等)在执行前被硬拦截。密钥和私钥文件默认禁止读取。所有工具调用落审计日志。


开发

pip install -e ".[dev]"
pytest tests/ -v

License

MIT © SAYACODE Contributors

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

sayacode-0.3.1.tar.gz (230.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sayacode-0.3.1-py3-none-any.whl (245.2 kB view details)

Uploaded Python 3

File details

Details for the file sayacode-0.3.1.tar.gz.

File metadata

  • Download URL: sayacode-0.3.1.tar.gz
  • Upload date:
  • Size: 230.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for sayacode-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c3f5b21307f87dc763f7977c4897cb6de20257d785c015677e55fde9d2e68fb0
MD5 38c9a428bb74d24e7275e39c6fe39481
BLAKE2b-256 8c393c603fff1828ac55066fe404a98b7feb3dff54a8ea6857e53ba619215d9e

See more details on using hashes here.

File details

Details for the file sayacode-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: sayacode-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 245.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for sayacode-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27e588f21de68944ac4f3e89513f852bf4b6a28873df17a756a7c2fac5a4c8ad
MD5 5dbe7fe3510d8407d4b5becd6328b991
BLAKE2b-256 79b82820b410f1a5ed570037cffe5fc80d732e063b8b5c4091dd1daed3844f48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page