Skip to main content

ClawCoder - AI-Powered Coding Assistant

Project description

ClawCoder 🦀

AI-Powered Coding Assistant - 一个基于 LangGraph 的交互式命令行编程助手,由 Kimi K2.5 驱动。

特性

  • 🤖 AI 对话 - 直接与 Kimi K2.5 智能对话
  • 📁 文件操作 - 浏览、读取、编辑文件
  • 代码执行 - 运行 shell 命令
  • ✏️ AI 编辑 - 用 AI 辅助修改代码
  • 🔍 文件分析 - 分析文本、图片、音视频文件
  • 🛠️ 二进制反汇编 - 支持 x86/x64/ARM 架构
  • 💾 历史存储 - 对话保存为二进制格式

安装

pip install -r requirements.txt

使用

# 交互式 REPL 模式
python clawcoder_cli.py

# 指定工作目录
python clawcoder_cli.py /path/to/project

# 快速提问
python clawcoder_cli.py --ask "如何实现快速排序"

# 执行单条命令
python clawcoder_cli.py -e "/ls"

命令

命令 功能
/help 显示帮助
/ls 列出文件
/cd 切换目录
/cat 读取文件
/write 写入文件
/edit AI 辅助编辑
/run 运行命令
/shell 进入 shell
/analyze 分析文件
/disasm 反汇编二进制
/history 查看历史
/save 保存对话

支持的文件类型

类型 扩展名
文本 .md, .txt, .json, .jsonl
图片 .jpg, .jpeg, .png, .bmp
音频 .mp3, .wav
视频 .mp4, .flv
二进制 .bin

配置

设置环境变量 KIMI_API_KEY 或在代码中配置:

from clawcoder import create_coder

coder = create_coder(
    api_key="your-api-key",
    base_url="https://api.kimi.com/coding",
    model="k2p5"
)

架构

clawcoder/
├── agent/           # LangGraph 核心框架
│   ├── state.py     # 状态定义
│   └── graph.py     # 图构建
├── processors/      # 文件处理器
│   ├── file_handler.py
│   ├── image_handler.py
│   └── media_handler.py
├── skills/          # 技能模块
│   └── disassembler.py
├── storage/         # 存储模块
│   └── history_storage.py
├── clawcoder.py     # 核心类
└── clawcoder_cli.py # CLI 入口

作者

Jason Sang (桑杰逊)

License

MIT License - 详见 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

clawcoder-1.0.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

clawcoder-1.0.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file clawcoder-1.0.0.tar.gz.

File metadata

  • Download URL: clawcoder-1.0.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for clawcoder-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3fc8dbd76a5361faa510d123a476b8854eb0a752ad2ff0561b117882ab9c599c
MD5 4c08921973387807eb8b6ad52295adce
BLAKE2b-256 a219b1a729864a976743a2eab422c687261e668355fadd1d7360cd79c0bd1b30

See more details on using hashes here.

File details

Details for the file clawcoder-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: clawcoder-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for clawcoder-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61b8f08d881a0f28d2fda663d0da656e0ccbc8180c3a2c72d5f5df0e2e3e42ac
MD5 b95a8744f745057f8cd86e340544851f
BLAKE2b-256 7d0c4c216cd55d02dad213b1df0483b9d4055372f7f7463dc675b21fac04ca5d

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