{"id":48419520,"url":"https://github.com/sohutv/fastclaw","last_synced_at":"2026-04-07T09:00:42.589Z","repository":{"id":348488625,"uuid":"1198286790","full_name":"sohutv/fastclaw","owner":"sohutv","description":"Fastclaw is a local terminal AI agent built with Rust. It works through an OpenAI-compatible model interface and supports streaming output, reasoning display, conversation context, and tool calls (such as shell and reload-self).","archived":false,"fork":false,"pushed_at":"2026-04-03T10:42:07.000Z","size":1683,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T09:00:30.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sohutv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-01T09:29:22.000Z","updated_at":"2026-04-03T10:42:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"46631d17-1a27-44b1-947c-fc504db7b996","html_url":"https://github.com/sohutv/fastclaw","commit_stats":null,"previous_names":["sohutv/fastclaw"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sohutv/fastclaw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohutv%2Ffastclaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohutv%2Ffastclaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohutv%2Ffastclaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohutv%2Ffastclaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sohutv","download_url":"https://codeload.github.com/sohutv/fastclaw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sohutv%2Ffastclaw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31506574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-06T08:03:20.609Z","updated_at":"2026-04-07T09:00:42.582Z","avatar_url":"https://github.com/sohutv.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./asserts/fastclaw_logo_0_small.png\" width=\"128\"\u003e\n\n# Fastclaw\n\nEnglish | [中文](./README.zh-cn.md)\n\nFastclaw is a local AI agent built with Rust. It supports OpenAI-compatible model providers, multi-channel interaction (CLI and DingTalk), streaming output, conversation history, scheduled task execution, and tool calls.\n\n## Features\n\n- Async runtime based on `tokio` + `rig-core`\n- OpenAI-compatible model provider integration\n- Channels:\n  - CLI channel (`--channel Cli`)\n  - DingTalk channel (`--channel Dingtalk`, enabled by default feature)\n- Streaming reasoning and final answer output\n- Built-in tools:\n  - `shell`: execute shell commands in workspace\n  - `current-time`: return local time in RFC3339 format\n  - `task-list`, `task-create`, `task-detail-get`, `task-update`, `task-del`\n  - `websearch` (only when `[websearch]` is configured)\n- Session history persistence and history compaction support (`/compact`)\n- Background heartbeat scheduler for cron tasks\n- One-command onboarding for workdir, default config, and workspace templates\n\n## Requirements\n\n- Rust stable with `edition = 2024`\n- Cargo\n- Access to an OpenAI-compatible API service\n\n## Build\n\n```bash\ngit clone \u003cyour-repo-url\u003e\ncd fastclaw\ncargo build\n```\n\nIf you only need CLI and want to avoid DingTalk dependency:\n\n```bash\ncargo build --no-default-features --features \"model_provider_openai_compatible,channel_cli_channel,volcengine\"\n```\n\n## CLI Commands\n\n```bash\nfastclaw \u003cCOMMAND\u003e\n```\n\nAvailable subcommands:\n\n- `onboard init-config`: initialize workdir and default files\n- `start`: start agent runtime\n\nExamples:\n\n```bash\ncargo run -- --help\ncargo run -- onboard init-config --help\ncargo run -- start --help\n```\n\n## Quick Start\n\n### 1. Initialize Workdir\n\nDefault workdir is `~/.fastclaw`:\n\n```bash\ncargo run -- onboard init-config\n```\n\nUse a custom path:\n\n```bash\ncargo run -- onboard init-config --path /absolute/path/to/fastclaw-home\n```\n\nIf directory already exists, add `--rewrite`:\n\n```bash\ncargo run -- onboard init-config --path /absolute/path/to/fastclaw-home --rewrite\n```\n\n### 2. Edit `config.toml`\n\nA newly generated `config.toml` currently looks like:\n\n```toml\ndefault_model_provider = \"\"\ndefault_model = \"\"\ndefault_show_reasoning = true\n\n[agent_settings]\n\n[model_providers]\n\n[log_config]\nlevel = \"Info\"\n\n[log_config.logger]\nlogs_dir = \"./logs\"\n\n[heartbeat_config]\ninterval = 60\n```\n\nMinimal usable example:\n\n```toml\ndefault_model_provider = \"openai\"\ndefault_model = \"gpt-4.1-mini\"\ndefault_show_reasoning = true\n\n[model_providers.openai]\nprovider_type = \"OpenaiCompatible\"\napi_key = \"sk-xxx\"\napi_url = \"https://api.openai.com/v1\"\n\n[model_providers.openai.models.gpt-4.1-mini]\nvision = true\naudio = false\nvideo = false\ndocument = false\nwebsearch = false\nreasoning = true\ntool = true\nreranker = false\nembedding = false\nmax_tokens = 65536\n\n[heartbeat_config]\ninterval = 60\n\n[log_config]\nlevel = \"Info\"\n\n[log_config.logger]\nlogs_dir = \"./logs\"\n```\n\nOptional web search config (`volcengine` feature):\n\n```toml\n[websearch]\ntype = \"volcengine\"\napi_url = \"https://\u003cyour-volcengine-endpoint\u003e\"\napi_key = \"\u003cyour-token\u003e\"\n```\n\nOptional DingTalk config (when `channel_dingtalk_channel` is enabled):\n\n```toml\n[dingtalk_config.credential]\nclient_id = \"...\"\nclient_secret = \"...\"\n\n[dingtalk_config.allow_session_ids]\n\"staff_id_or_group_key\" = { Master = { val = \"owner\", settings = {} } }\n```\n\n### 3. Start Agent\n\n```bash\ncargo run -- start --channel Cli\n```\n\nWith custom workdir:\n\n```bash\ncargo run -- start --channel Cli --workdir /absolute/path/to/fastclaw-home\n```\n\n## CLI Interaction\n\nAfter startup, enter message at `\u003e\u003e`.\n\nConsole commands:\n\n- `/compact --ratio \u003c0.2~1.0\u003e`: compact current session history\n- `/showreasoning on|off`: currently parsed but **not implemented** (see Known Issues)\n\nPer-round usage footer:\n\n- `\u003c\u003cTokens:total↑input↓output\u003e\u003e`\n\n## Generated Layout\n\n`onboard init-config` creates:\n\n```text\n\u003cworkdir\u003e/\n  config.toml\n  db.sqlite\n  workspace/\n    AGENTS.md\n    BOOTSTRAP.md\n    HEARTBEAT.md\n    IDENTITY.md\n    MEMORY.md\n    SOUL.md\n    TOOLS.md\n    USER.md\n    cron/README.md\n    memory/README.md\n    sessions/README.md\n    skills/README.md\n    state/README.md\n```\n\n## Logging\n\n`[log_config]` supports:\n\n- `level`: `Error` / `Warn` / `Info` / `Debug`\n- `logger`:\n  - `Stdout`\n  - `File { logs_dir = \"./logs\" }` (relative path resolves to `\u003cdefault_workdir\u003e/logs`)\n\n## Development\n\n```bash\ncargo fmt\ncargo clippy --all-targets --all-features\ncargo test --all-features\n```\n\n## Known Issues\n\n- `/showreasoning on|off` triggers `unimplemented!()` in current code path.\n- In CLI channel, reasoning text is still printed even when `default_show_reasoning = false`; only heading/closing markers are gated.\n- `cargo test --all-features` requires `VOLCENGINE_WEBSEARCH_API_URL` and `VOLCENGINE_WEBSEARCH_API_KEY` for `volcengine` websearch test.\n\n## Notes\n\n- `start --workdir` must point to initialized workdir containing `config.toml`.\n- Startup fails if log directory is not writable.\n- Model creation fails if `default_model_provider`, `default_model`, or provider model settings are missing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsohutv%2Ffastclaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsohutv%2Ffastclaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsohutv%2Ffastclaw/lists"}