@cakagus/codeclaw

中文文档
1.7.2发布于 2026/11/08ES Module近 30 天下载 4335
原始使用文档
文档目录9 节
  1. 🌟 Why CodeClaw?
  2. 🏗️ System Architecture
  3. 🚀 Commands
  4. 📦 Quick Start
  5. 1. Install via NPM
  6. 2. Configure Environment
  7. 3. Run with PM2
  8. 🛠️ Tech Stack
  9. ⚠️ Security Warning

🤖 CodeClaw Pro

The Ultimate Autonomous AI Agent & Telegram Bot for Coding and XAU/USD Trading

npm version License: MIT Node.js

Lightweight, fast, and runs smoothly even on a 1GB RAM VPS.


🌟 Why CodeClaw?

CodeClaw is not just another chatbot. It is an autonomous agent built for real-world execution, combining LLM reasoning with a robust, hallucination-free Node.js backend.

  • 🧠 20-Layer Cognitive Brain: A conscious pipeline that prevents AI hallucinations.
  • 📊 Real-Time Trading Analysis: Deep XAU/USD analysis using ICT/SMC, TwelveData OHLC, and EXA news.
  • 🛠️ True Tool Execution: Reads, writes, and debugs code directly on your VPS via native shell and Git integration.
  • 📚 Self-Learning: Autonomously researches the web and saves them as reusable skills.
  • ⚡ Zero-LLM Commands: System checks (/health, /lessons) are hardcoded for instant, 100% accurate responses.

🏗️ System Architecture

graph TD
    User([Telegram User]) -->|Chat / Command| Bot[CodeClaw Gateway]
    
    Bot -->|Action/Coding| ToolLoop[Action Route: 32+ Native Tools]
    Bot -->|System Check| ZeroLLM[Zero-LLM: /health, /lessons]
    Bot -->|Chat/Reasoning| Brain20[20-Layer Cognitive Pipeline]
    
    ToolLoop -->|Read/Write/Shell| VPS[(Local VPS & Git)]
    ToolLoop -->|Fetch| LLM[9router / OpenAI API]
    
    Brain20 -->|Reason| LLM
    Brain20 -->|Verify| Brain20
    
    Bot -->|Trading| Gold[TwelveData + EXA]
    Gold -->|Analysis| LLM
    
    LLM -->|Final Response| User

🚀 Commands

CategoryCommandsDescription
Trading/gold /goldplanReal-time XAU/USD analysis & actionable trade plans.
Skill & Memory/skills /skill /lessons /learn /mem /todoManage AI memory, list skills, and trigger autonomous research.
Research/research_methodsDeep dive into AI agents, trading, and dev tools.
System/health /status /doctor /start /helpInstant system monitoring and bot status.

📦 Quick Start

1. Install via NPM

npm install -g @cakagus/codeclaw

2. Configure Environment

Copy config.example.json to config.json and fill in your API keys:

  • Telegram Bot Token
  • 9router (or OpenAI-compatible) API Key
  • TwelveData API Key (for Trading)
  • EXA API Key (for Web Search)

3. Run with PM2

pm2 start bin/codeclaw.js --name codeclaw-tg --node-args="--max-old-space-size=512"
pm2 save

🛠️ Tech Stack

  • Runtime: Node.js (v22+)
  • Database: SQLite (Session & Memory) + Markdown (Skills)
  • LLM Engine: OpenAI-Compatible (9router, Gemini, Groq, etc.)
  • Data Providers: TwelveData (OHLC), EXA (Search API)

⚠️ Security Warning

NEVER commit your config.json to GitHub. It contains your private API keys. Ensure config.json is listed in your .gitignore.


Made with ❤️ for autonomous AI and trading.

版本与发布记录

@cakagus/codeclaw 共发布 20 个版本,首次发布于 2026/10/31;过去 12 个月发布了 20 个版本。

版本发布日期距今
1.7.2latest2026/11/081 天前
1.7.12026/11/035 天前
1.7.02026/11/035 天前
1.6.02026/11/036 天前
1.5.42026/11/026 天前
1.5.32026/11/026 天前

关于 @cakagus/codeclaw 的常见问题

如何安装 @cakagus/codeclaw?

在项目目录运行 npm install @cakagus/codeclaw,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 codeclaw,可以用 npx codeclaw 直接运行。

@cakagus/codeclaw 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cakagus__codeclaw 是否存在。

@cakagus/codeclaw 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@cakagus/codeclaw 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.5.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@cakagus/codeclaw 可以商用吗?

@cakagus/codeclaw 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@cakagus/codeclaw 的下载量有多少?

根据 npm 官方下载统计,@cakagus/codeclaw 在 2026/10/09 – 2026/11/07 这 30 天内被下载 4,335 次,日均约 145 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cakagus/codeclaw 还在维护吗?

最新版本 1.7.2 发布于 2026/11/08(1 天前);至今共发布 20 个版本,其中过去 12 个月发布了 20 个;首次发布于 2026/10/31。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。