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

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
git clone https://github.com/saya-ch/sayacode.git
cd sayacode
pip install .

安装完成后,在任意目录执行 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.0.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.0-py3-none-any.whl (245.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sayacode-0.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 cf28b706c81676a5dba7b406fd9ee3762e343ef87d16abc64c31ca5ae02154f3
MD5 10a2cbae106d2e01f894ba3b40bfa5bd
BLAKE2b-256 91d0a27a344def4f90cea2b78dbe1371ac7c9416c0373e917c99239dfc8c7170

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sayacode-0.3.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd392b7aac3088557905bd32ce6e242b43f8fe3698d41440985ff75976354f6f
MD5 fbc038096837a05823f3281dda0dd80a
BLAKE2b-256 0359d9bbadd123071631320c4d68477cacf8fd793344ed84f9831f89bd21a4e2

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