clawdeck 0.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. clawdeck-0.5.3/PKG-INFO +980 -0
  2. clawdeck-0.5.3/README.md +943 -0
  3. clawdeck-0.5.3/clawdeck/__init__.py +37 -0
  4. clawdeck-0.5.3/clawdeck/agent.py +5296 -0
  5. clawdeck-0.5.3/clawdeck/browser_auth.py +885 -0
  6. clawdeck-0.5.3/clawdeck/browser_controller.py +846 -0
  7. clawdeck-0.5.3/clawdeck/browser_task_executor.py +413 -0
  8. clawdeck-0.5.3/clawdeck/browser_use.py +465 -0
  9. clawdeck-0.5.3/clawdeck/buddy.py +234 -0
  10. clawdeck-0.5.3/clawdeck/cli.py +1285 -0
  11. clawdeck-0.5.3/clawdeck/compaction.py +193 -0
  12. clawdeck-0.5.3/clawdeck/config.py +459 -0
  13. clawdeck-0.5.3/clawdeck/credential_manager.py +289 -0
  14. clawdeck-0.5.3/clawdeck/cron_agent.py +210 -0
  15. clawdeck-0.5.3/clawdeck/document_readers.py +3947 -0
  16. clawdeck-0.5.3/clawdeck/dream.py +319 -0
  17. clawdeck-0.5.3/clawdeck/hooks.py +204 -0
  18. clawdeck-0.5.3/clawdeck/lsp_client.py +286 -0
  19. clawdeck-0.5.3/clawdeck/memory.py +284 -0
  20. clawdeck-0.5.3/clawdeck/planner.py +221 -0
  21. clawdeck-0.5.3/clawdeck/plugin_system.py +280 -0
  22. clawdeck-0.5.3/clawdeck/rewind.py +176 -0
  23. clawdeck-0.5.3/clawdeck/session_manager.py +270 -0
  24. clawdeck-0.5.3/clawdeck/skills.py +169 -0
  25. clawdeck-0.5.3/clawdeck/subagent.py +222 -0
  26. clawdeck-0.5.3/clawdeck/token_budget.py +157 -0
  27. clawdeck-0.5.3/clawdeck/tools/__init__.py +5 -0
  28. clawdeck-0.5.3/clawdeck/tools/browser/__init__.py +27 -0
  29. clawdeck-0.5.3/clawdeck/tools/browser/automation_orchestrator.py +350 -0
  30. clawdeck-0.5.3/clawdeck/tools/browser/browser_automation_tools.py +308 -0
  31. clawdeck-0.5.3/clawdeck/tools/browser/browser_manager.py +265 -0
  32. clawdeck-0.5.3/clawdeck/tools/browser/code_templates.py +740 -0
  33. clawdeck-0.5.3/clawdeck/tools/browser/dom_analyzer.py +494 -0
  34. clawdeck-0.5.3/clawdeck/tools/browser/enhanced_automation_orchestrator.py +1019 -0
  35. clawdeck-0.5.3/clawdeck/tools/browser/enhanced_code_generator.py +755 -0
  36. clawdeck-0.5.3/clawdeck/tools/browser/error_classification.py +570 -0
  37. clawdeck-0.5.3/clawdeck/tools/browser/intelligent_error_recovery.py +752 -0
  38. clawdeck-0.5.3/clawdeck/tools/browser/interactive_error_handler.py +446 -0
  39. clawdeck-0.5.3/clawdeck/tools/browser/safe_execution.py +400 -0
  40. clawdeck-0.5.3/clawdeck/tools/browser/secure_python_sandbox.py +574 -0
  41. clawdeck-0.5.3/clawdeck/tools/browser/stagehand_generator.py +414 -0
  42. clawdeck-0.5.3/clawdeck/tools/browser/stagehand_integration.py +386 -0
  43. clawdeck-0.5.3/clawdeck/tools/browser/unified_automation_interface.py +438 -0
  44. clawdeck-0.5.3/clawdeck/tools/browser/unified_error_handling.py +515 -0
  45. clawdeck-0.5.3/clawdeck/tools/browser/vision_fallback_integration.py +463 -0
  46. clawdeck-0.5.3/clawdeck/utils.py +426 -0
  47. clawdeck-0.5.3/clawdeck/vim_mode.py +85 -0
  48. clawdeck-0.5.3/clawdeck/vision_engine.py +412 -0
  49. clawdeck-0.5.3/clawdeck/voice.py +158 -0
  50. clawdeck-0.5.3/pyproject.toml +47 -0
@@ -0,0 +1,980 @@
1
+ Metadata-Version: 2.4
2
+ Name: clawdeck
3
+ Version: 0.5.3
4
+ Summary: Clawdeck - An intelligent AI coding assistant CLI tool powered by Anthropic Claude
5
+ Author: Yiqiao Yin
6
+ Author-email: yiqiao.yin@wyn-associates.com
7
+ Requires-Python: >=3.10,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Requires-Dist: Pillow (>=10.0.0)
15
+ Requires-Dist: anthropic[bedrock] (>=0.39.0)
16
+ Requires-Dist: click (>=8.1.0)
17
+ Requires-Dist: crawl4ai (>=0.7.6)
18
+ Requires-Dist: cryptography (>=42.0.0)
19
+ Requires-Dist: google-genai (>=1.0.0)
20
+ Requires-Dist: huggingface-hub (>=0.20.0)
21
+ Requires-Dist: numpy (>=1.24.0)
22
+ Requires-Dist: pdf2image (>=1.16.0)
23
+ Requires-Dist: playwright (>=1.40.0)
24
+ Requires-Dist: prompt-toolkit (>=3.0.0)
25
+ Requires-Dist: pydantic-ai (>=1.13.0)
26
+ Requires-Dist: pymupdf-layout (>=0.1.0)
27
+ Requires-Dist: pymupdf4llm (>=0.1.0)
28
+ Requires-Dist: pytesseract (>=0.3.10)
29
+ Requires-Dist: python-dotenv (>=1.2.1,<2.0.0)
30
+ Requires-Dist: pyyaml (>=6.0.0)
31
+ Requires-Dist: rich (>=13.0.0)
32
+ Requires-Dist: sentence-transformers (>=2.2.0)
33
+ Requires-Dist: stagehand-py (>=0.1.0)
34
+ Requires-Dist: torch (>=2.0.0)
35
+ Description-Content-Type: text/markdown
36
+
37
+ # Clawdeck CLI
38
+
39
+ An intelligent AI coding assistant CLI tool powered by Anthropic Claude.
40
+
41
+ [![PyPI version](https://badge.fury.io/py/clawdeck.svg)](https://pypi.org/project/clawdeck/)
42
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
43
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
44
+
45
+ 📚 **Documentation:** https://yiqiao-yin.github.io/clawdeck/
46
+
47
+ 🔗 **GitHub Repository:** https://github.com/yiqiao-yin/clawdeck
48
+
49
+ ## 📑 Table of Contents
50
+
51
+ - [Overview](#-overview)
52
+ - [System Architecture](#-system-architecture)
53
+ - [Installation](#-installation)
54
+ - [Quick Start](#-quick-start)
55
+ - [Features](#-features)
56
+ - [Core Capabilities](#core-capabilities)
57
+ - [Intelligent Features](#intelligent-features-v02x)
58
+ - [Context Management](#context-management-v028)
59
+ - [Model Selection & Optimization](#model-selection--optimization-v030)
60
+ - [Configuration & Personalization](#configuration--personalization-v031)
61
+ - [Streaming Responses](#streaming-responses-v032)
62
+ - [HuggingFace Integration](#huggingface-integration-v033---v0313)
63
+ - [Automatic Test Generation](#automatic-test-generation-v0318)
64
+ - [GitHub Integration](#github-integration-v0322)
65
+ - [Web Search](#web-search-v0321-enhanced-v0323)
66
+ - [Browser Use / Direct Website Fetching](#browser-use--direct-website-fetching-v0324)
67
+ - [Vision Mode for Document Images](#vision-mode-for-document-images-v0330)
68
+ - [Autonomous Vision-Based Browsing](#autonomous-vision-based-browsing-v0352---v0356-)
69
+ - [Usage Examples](#-usage-examples)
70
+ - [Commands](#-commands)
71
+ - [Documentation](#-documentation)
72
+ - [Development & Testing](#-development--testing)
73
+ - [Environment Variables](#-environment-variables)
74
+ - [Requirements](#-requirements)
75
+ - [Web Terminal](#web-terminal)
76
+ - [Contributing](#-contributing)
77
+ - [License](#-license)
78
+ - [Author](#-author)
79
+ - [Acknowledgments](#-acknowledgments)
80
+ - [Links](#-links)
81
+
82
+ ## 🎯 Overview
83
+
84
+ Clawdeck CLI is an AI-powered coding assistant that helps you build projects, generate code, and improve your codebase through natural language conversations. Built with pydantic-ai and Anthropic Claude, it provides intelligent file operations, command execution, and context-aware assistance.
85
+
86
+ ## 🏗️ System Architecture
87
+
88
+ For a detailed architecture overview including all components, layers, and data flows, see **[SYSTEM.md](docs/SYSTEM.md)**.
89
+
90
+ ## 📦 Installation
91
+
92
+ ### Basic Installation
93
+ ```bash
94
+ pip install clawdeck
95
+ ```
96
+
97
+ ### Optional: Enable Browser Use (Direct Website Fetching)
98
+
99
+ If you want to use the `fetch_website` feature to read specific URLs directly:
100
+
101
+ ```bash
102
+ # Install Playwright browser binaries (one-time setup, ~200MB)
103
+ playwright install chromium
104
+ ```
105
+
106
+ **Note:** Browser use is optional. Web search and all other features work without it. Only install if you need direct URL fetching (e.g., "Read https://github.com/user/repo").
107
+
108
+ ## 🚀 Quick Start
109
+
110
+ ### 1. Choose your AI provider and set up credentials:
111
+
112
+ Clawdeck CLI supports four AI providers. Choose one:
113
+
114
+ ---
115
+
116
+ #### **Option 1: Anthropic Claude (Direct API)**
117
+
118
+ **Using environment variables:**
119
+ ```bash
120
+ export CHOOSE_CLIENT=1
121
+ export ANTHROPIC_API_KEY=your_key_here
122
+ export ANTHROPIC_MODEL=claude-sonnet-4-20250514
123
+ ```
124
+
125
+ **Using .env file (recommended):**
126
+ ```bash
127
+ # Create .env file in your project directory
128
+ CHOOSE_CLIENT=1
129
+ ANTHROPIC_API_KEY=your_key_here
130
+ ANTHROPIC_MODEL=claude-sonnet-4-20250514
131
+ ```
132
+
133
+ **Get your API key:** [Anthropic Console](https://console.anthropic.com/)
134
+ **Available models:** See [Claude Model Overview](https://docs.claude.com/en/docs/about-claude/models/overview)
135
+
136
+ ---
137
+
138
+ #### **Option 2: AWS Bedrock (Claude via AWS)**
139
+
140
+ **Using environment variables:**
141
+ ```bash
142
+ export CHOOSE_CLIENT=2
143
+ export AWS_ACCESS_KEY_ID=your_access_key
144
+ export AWS_SECRET_ACCESS_KEY=your_secret_key
145
+ export AWS_SESSION_TOKEN=your_session_token
146
+ export AWS_REGION=us-west-2
147
+ export ANTHROPIC_MODEL=us.anthropic.claude-sonnet-4-20250514-v1:0
148
+ ```
149
+
150
+ **Using .env file (recommended):**
151
+ ```bash
152
+ # Create .env file in your project directory
153
+ CHOOSE_CLIENT=2
154
+ AWS_ACCESS_KEY_ID=your_access_key
155
+ AWS_SECRET_ACCESS_KEY=your_secret_key
156
+ AWS_SESSION_TOKEN=your_session_token
157
+ AWS_REGION=us-west-2
158
+ ANTHROPIC_MODEL=us.anthropic.claude-sonnet-4-20250514-v1:0
159
+ ```
160
+
161
+ **Requirements:** Valid AWS account with Bedrock access
162
+
163
+ ---
164
+
165
+ #### **Option 3: Google Gemini** 🆕
166
+
167
+ **Using environment variables:**
168
+ ```bash
169
+ export CHOOSE_CLIENT=3
170
+ export GEMINI_API_KEY=your_key_here
171
+ export GEMINI_MODEL=gemini-2.5-flash
172
+ ```
173
+
174
+ **Using .env file (recommended):**
175
+ ```bash
176
+ # Create .env file in your project directory
177
+ CHOOSE_CLIENT=3
178
+ GEMINI_API_KEY=your_key_here
179
+ GEMINI_MODEL=gemini-2.5-flash
180
+ ```
181
+
182
+ **Get your API key:** [Google AI Studio](https://aistudio.google.com/apikey)
183
+ **Available models:** `gemini-2.5-flash` (fast, cheap), `gemini-2.5-pro` (powerful)
184
+ **Cost:** ~40x cheaper than Claude! ($0.075/M vs $3.00/M input tokens)
185
+
186
+ **Features:**
187
+ - ✅ All tools supported (file ops, git, docs, browser, etc.)
188
+ - ✅ 2M token context window (vs 200K for Claude)
189
+ - ✅ Fast and cost-effective
190
+ - ⚠️ Web search temporarily disabled (will be added as custom tool)
191
+
192
+ ---
193
+
194
+ #### **Option 4: OpenAI** 🆕
195
+
196
+ **Using environment variables:**
197
+ ```bash
198
+ export CHOOSE_CLIENT=4
199
+ export OPENAI_API_KEY=your_key_here
200
+ export OPENAI_MODEL=gpt-4o
201
+ ```
202
+
203
+ **Using .env file (recommended):**
204
+ ```bash
205
+ # Create .env file in your project directory
206
+ CHOOSE_CLIENT=4
207
+ OPENAI_API_KEY=your_key_here
208
+ OPENAI_MODEL=gpt-4o
209
+ ```
210
+
211
+ **Get your API key:** [OpenAI Platform](https://platform.openai.com/api-keys)
212
+ **Available models:** `gpt-4o` (latest), `gpt-4` (stable), `gpt-3.5-turbo` (fast)
213
+ **Cost:** Competitive pricing with good performance
214
+
215
+ **Features:**
216
+ - ✅ All tools supported (file ops, git, docs, browser, etc.)
217
+ - ✅ 128K token context window
218
+ - ✅ Industry-leading performance
219
+ - ✅ Fast response times
220
+
221
+ ---
222
+
223
+ #### **Auto-Detection (No CHOOSE_CLIENT)**
224
+
225
+ If you don't set `CHOOSE_CLIENT`, the system will auto-detect based on available credentials:
226
+
227
+ **Priority order:**
228
+ 1. `ANTHROPIC_API_KEY` → Use Anthropic
229
+ 2. AWS credentials → Use Bedrock
230
+ 3. `GEMINI_API_KEY` → Use Google Gemini
231
+ 4. `OPENAI_API_KEY` → Use OpenAI
232
+
233
+ ```bash
234
+ # Just set your preferred API key
235
+ export GEMINI_API_KEY=your_key_here
236
+ # System will automatically use Gemini
237
+ ```
238
+
239
+ ### 2. Run the CLI:
240
+ ```bash
241
+ clawdeck
242
+ ```
243
+
244
+ ### 3. Start chatting:
245
+ ```
246
+ You: Build a Streamlit app for data visualization
247
+
248
+ Clawdeck: I'll create a Streamlit app for you...
249
+ [Generates complete code and saves to app.py]
250
+ ```
251
+
252
+ ## ✨ Features
253
+
254
+ ### Core Capabilities
255
+ - 🤖 **Interactive AI Assistant** - Natural language conversations with Claude
256
+ - 📝 **Code Generation** - Generate production-ready Python code from descriptions
257
+ - 🔍 **Project Analysis** - Understand and improve existing codebases
258
+ - 📁 **Smart File Operations** - Context-aware file creation and updates
259
+ - ⚡ **Command Execution** - Run Python scripts, UV commands, shell scripts, any CLI tool
260
+ - ⌨️ **Multi-line Input** - Press Enter to submit, Shift+Enter for newline
261
+ - 🔒 **Safety First** - Confirmation prompts before executing commands
262
+
263
+ ### Intelligent Features (v0.2.x)
264
+ - 🧠 **Intent Recognition** - Understands "update" vs "create new" from natural language
265
+ - 🔄 **Context-Aware Updates** - Reads files before modifying them
266
+ - 🔁 **Self-Correcting** - Smart retry mechanism with 3 attempts
267
+ - ⏱️ **Timeout Protection** - Prevents infinite loops (5 min default)
268
+ - 📊 **Comprehensive Output** - Captures stdout, stderr, and exit codes
269
+
270
+ ### Context Management (v0.2.8)
271
+ - 💬 **Conversation History** - Maintains context across multiple interactions
272
+ - 📊 **Token Tracking** - Real-time monitoring of API usage and costs
273
+ - 💾 **Session Save/Load** - Preserve conversations for later continuation
274
+ - 🎯 **Slash Commands** - Quick access to history, stats, and session management
275
+
276
+ ### Model Selection & Optimization (v0.3.0)
277
+ - 🔄 **Dynamic Model Switching** - Switch between Haiku, Sonnet, and Opus mid-session
278
+ - 💰 **Cost Optimization** - Choose the right model for your task complexity
279
+ - 📊 **Model Information** - View current model, pricing, and capabilities
280
+ - ⚡ **Flexible Performance** - Balance between speed, capability, and cost
281
+
282
+ ### Configuration & Personalization (v0.3.1)
283
+ - ⚙️ **User Configuration** - Personal preferences via `~/.clawdeck/config.yaml`
284
+ - 📁 **Project Configuration** - Project-specific settings via `.clawdeck.yaml`
285
+ - 🎯 **Custom Instructions** - Add your coding standards to every conversation
286
+ - 🏗️ **Project Context** - Help AI understand your tech stack automatically
287
+
288
+ ### Streaming Responses (v0.3.2)
289
+ - ⚡ **Real-Time Output** - See responses as they're generated, token-by-token
290
+ - 🎯 **Immediate Feedback** - Start reading while AI is still generating
291
+ - 📺 **Progress Visibility** - Watch code and explanations appear in real-time
292
+ - 💨 **Faster Perceived Speed** - Feels 2-3x faster with instant feedback
293
+
294
+ ### HuggingFace Integration (v0.3.3 - v0.3.13)
295
+ - 🤗 **HuggingFace Authentication** - Auto-login with HF_TOKEN environment variable
296
+ - 📝 **README Generation** - Create professional README files for Spaces
297
+ - 🚀 **Space Creation** - Create Streamlit/Gradio Spaces directly from CLI
298
+ - 📤 **File Upload** - Push your code to HuggingFace Spaces automatically
299
+ - 🎯 **One-Command Deploy** - From code to live Space in seconds
300
+
301
+ ### Automatic Test Generation (v0.3.18)
302
+ - 🧪 **Test Generation** - Automatically generate pytest tests for Python files
303
+ - 📊 **Smart Analysis** - Analyzes functions and classes to create comprehensive tests
304
+ - ⚡ **Quick Setup** - Creates test files with proper structure and imports
305
+ - 🎯 **Code Coverage** - Generates tests for edge cases and error handling
306
+
307
+ ### GitHub Integration (v0.3.22)
308
+ - 🔐 **GitHub Authentication** - Auto-login with GH_TOKEN/GITHUB_TOKEN
309
+ - 💾 **Commit & Push** - Stage, commit, and push changes with one command
310
+ - 🔀 **Pull Requests** - Create PRs with generated descriptions
311
+ - 🌿 **Branch Management** - Create, checkout, and merge branches seamlessly
312
+ - 🔄 **Merge Operations** - Smart branch merging with conflict detection
313
+
314
+ ### Web Search (v0.3.21, Enhanced v0.3.23)
315
+ - 🔍 **Real-Time Search** - Access current information from the web
316
+ - 🌦️ **Weather Queries** - Get current weather for any location
317
+ - 🔗 **URL Reading** - Fetch and summarize web page content
318
+ - 📚 **Resource Finding** - Find GitHub repos, libraries, and tutorials
319
+ - 📊 **Current Data** - Latest package versions, documentation, and trends
320
+ - 💰 **Cost Effective** - Limited to 5 searches per session, $10 per 1K searches
321
+
322
+ ### Browser Use / Direct Website Fetching (v0.3.24+)
323
+ - 🌐 **Direct URL Fetching** - Fetch specific websites directly (not just search results)
324
+ - 📄 **Full DOM Extraction** - Get complete page content, not just search snippets
325
+ - 🧠 **LLM-Optimized** - Automatic conversion to clean, structured markdown
326
+ - ⚡ **Smart Caching** - 30-minute TTL cache for faster repeated access
327
+ - 📏 **Smart Truncation** - Preserves document structure while staying under token limits
328
+ - 🎯 **Configurable** - Adjust max tokens, cache settings, truncation strategy
329
+ - 💾 **Cache Management** - View stats, clear cache, manage storage
330
+ - 🖥️ **Browser Debugging** - Use `--show-browser` flag or `CLAWDECK_BROWSER_SHOW=1` to see automation in action
331
+ - 🔄 **Interactive Error Recovery** - LLM-assisted error analysis with intelligent recovery options when automation fails
332
+
333
+ ### Vision Mode for Document Images (v0.3.30)
334
+ - 🖼️ **Image Processing** - Intelligently describe images in Word and PDF documents
335
+ - 📊 **Chart Recognition** - Extract insights from charts, graphs, and data visualizations
336
+ - 📐 **Diagram Understanding** - Analyze flowcharts, architecture diagrams, and technical illustrations
337
+ - 🖥️ **Screenshot Analysis** - Understand UI mockups and interface screenshots
338
+ - 💰 **Cost Transparency** - Separate tracking of vision API costs vs. text processing
339
+ - 🎯 **Three Processing Modes** - skip (default), describe (alt text only), vision (full AI processing)
340
+ - ⚡ **Batch Processing** - Efficient handling of documents with multiple images
341
+
342
+ ### Autonomous Vision-Based Browsing (v0.3.52 - v0.3.56)
343
+ - 🤖 **Fully Autonomous** - Agent navigates websites and completes tasks without manual intervention
344
+ - 👁️ **Vision-Powered** - Uses Claude Vision API to "see" and understand web pages
345
+ - 🎯 **Multi-Step Tasks** - Handles complex workflows (search, filter, compare, extract)
346
+ - 🔗 **Tool Chaining** - Seamlessly integrates with WebSearchTool and login_to_website
347
+ - 🔒 **Authenticated Browsing** - Works with saved login sessions
348
+
349
+ ### Agentic Features (v0.4.0) 🆕
350
+ - 🧠 **[Persistent Memory](https://yiqiao-yin.github.io/clawdeck/docs/features/agentic-memory)** - Cross-session memory with YAML frontmatter files and keyword relevance selection
351
+ - 🤖 **[Sub-Agent Workers](https://yiqiao-yin.github.io/clawdeck/docs/features/planning-and-agents)** - Spawn parallel pydantic-ai agents for concurrent research and verification
352
+ - 📋 **[Plan Mode](https://yiqiao-yin.github.io/clawdeck/docs/features/planning-and-agents)** - AI proactively enters plan mode for complex tasks, presents step-by-step plans for approval
353
+ - 🔄 **[Token Budget Auto-Continue](https://yiqiao-yin.github.io/clawdeck/docs/features/hooks-and-budget)** - Automatically continues responses cut off by max_tokens
354
+ - ⚡ **[Extensible Skills](https://yiqiao-yin.github.io/clawdeck/docs/features/agentic-memory)** - User-defined slash commands via YAML files in `~/.clawdeck/skills/`
355
+ - 🔧 **[Hook System](https://yiqiao-yin.github.io/clawdeck/docs/features/hooks-and-budget)** - Pre/post response hooks with built-in safety checks (runs automatically)
356
+
357
+ ### Advanced Agentic Features (v0.5.0) 🆕
358
+ - 💤 **[Dream System](https://yiqiao-yin.github.io/clawdeck/docs/features/dream-and-compaction)** - Background memory consolidation reviews recent sessions automatically
359
+ - 📦 **[Context Compaction](https://yiqiao-yin.github.io/clawdeck/docs/features/dream-and-compaction)** - Auto-drops old messages when conversation exceeds 50 messages
360
+ - ⌨️ **[Vim Mode](https://yiqiao-yin.github.io/clawdeck/docs/features/vim-voice-buddy)** - Vi-style editing in the terminal (toggle with `/vim`)
361
+ - 🎙️ **[Voice Input](https://yiqiao-yin.github.io/clawdeck/docs/features/vim-voice-buddy)** - Speech-to-text via Google (free) or OpenAI Whisper
362
+ - 🐱 **[Buddy Companion](https://yiqiao-yin.github.io/clawdeck/docs/features/vim-voice-buddy)** - Virtual pet with species, rarity, personality, and event reactions
363
+ - ⏰ **[Cron Agents](https://yiqiao-yin.github.io/clawdeck/docs/features/cron-plugins-lsp)** - Schedule recurring background tasks (e.g., monitor CI every 5 minutes)
364
+ - 🔌 **[Plugin System](https://yiqiao-yin.github.io/clawdeck/docs/features/cron-plugins-lsp)** - Install/create plugins in `~/.clawdeck/plugins/` with YAML manifests
365
+ - 🔍 **[LSP Diagnostics](https://yiqiao-yin.github.io/clawdeck/docs/features/cron-plugins-lsp)** - Run pyright/ruff diagnostics with `/diagnostics`
366
+ - ⏪ **[Rewind](https://yiqiao-yin.github.io/clawdeck/docs/features/cron-plugins-lsp)** - Undo mistakes by reverting to previous conversation states
367
+
368
+ ## 🎮 Usage Examples
369
+
370
+ ### Starting a New Project
371
+ ```
372
+ You: Create a FastAPI app with authentication
373
+
374
+ Clawdeck:
375
+ - Generates main.py with FastAPI setup
376
+ - Creates auth middleware
377
+ - Adds example routes
378
+ - Provides setup instructions
379
+ ```
380
+
381
+ ### Updating Existing Code
382
+ ```
383
+ You: Add logging to my script.py
384
+
385
+ Clawdeck:
386
+ - Reads current script.py
387
+ - Adds logging configuration
388
+ - Updates functions with log statements
389
+ - Preserves existing functionality
390
+ ```
391
+
392
+ ### Executing Commands
393
+ ```
394
+ You: Run the analysis script
395
+
396
+ Clawdeck: [Generates the command to run]
397
+
398
+ ======================================================================
399
+ ⚠️ COMMAND EXECUTION CONFIRMATION
400
+ ======================================================================
401
+ Command: python analysis.py
402
+ Directory: /current/working/directory
403
+ Permissions: Full user permissions
404
+ ======================================================================
405
+
406
+ >>> WAITING FOR YOUR RESPONSE <<<
407
+
408
+ Execute this command? (y/N): y
409
+
410
+ ✅ Command executed successfully
411
+ [Shows output]
412
+ ```
413
+
414
+ **Note:** When you see the confirmation prompt, the "thinking" spinner may still appear in the background. This is normal - just type `y` and press Enter to proceed, or `N` to cancel.
415
+
416
+ ### Web Search & Resource Finding
417
+ ```
418
+ You: Find a popular GitHub repo for machine learning
419
+
420
+ Clawdeck: [Searches the web]
421
+
422
+ Here are some popular GitHub repositories for machine learning:
423
+
424
+ 1. **tensorflow/tensorflow** ⭐ 185k stars
425
+ https://github.com/tensorflow/tensorflow
426
+ - End-to-end machine learning platform
427
+ - Used by Google and industry leaders
428
+
429
+ 2. **pytorch/pytorch** ⭐ 82k stars
430
+ https://github.com/pytorch/pytorch
431
+ - Deep learning framework by Meta
432
+ - Popular in research and production
433
+
434
+ 3. **scikit-learn/scikit-learn** ⭐ 59k stars
435
+ https://github.com/scikit-learn/scikit-learn
436
+ - Classic ML algorithms for Python
437
+ - Great for beginners and experts
438
+
439
+ [Sources: GitHub search results, updated recently]
440
+ ```
441
+
442
+ ```
443
+ You: What's the weather in San Francisco?
444
+
445
+ Clawdeck: [Searches for current weather]
446
+
447
+ Current weather in San Francisco:
448
+ 🌤️ 62°F (17°C), Partly cloudy
449
+ 💨 Wind: 12 mph
450
+ 💧 Humidity: 65%
451
+ 🌅 Sunrise: 7:15 AM | Sunset: 5:02 PM
452
+
453
+ Source: [Weather service URL]
454
+ ```
455
+
456
+ ### Direct Website Fetching
457
+ ```
458
+ You: Read https://github.com/yiqiao-yin/deepspeed-course
459
+
460
+ Clawdeck: [Fetches the specific URL directly]
461
+
462
+ 📄 **Fetched:** https://github.com/yiqiao-yin/deepspeed-course
463
+
464
+ # DeepSpeed Course Repository
465
+
466
+ ## Overview
467
+ This repository contains comprehensive course materials for DeepSpeed training...
468
+
469
+ ## Course Contents
470
+ 1. **Distributed Training** - Multi-GPU training strategies
471
+ 2. **Memory Optimization** - ZeRO optimization techniques
472
+ 3. **Pipeline Parallelism** - Efficient model parallelism
473
+ 4. **Performance Tuning** - Best practices and optimizations
474
+
475
+ [Full page content extracted and converted to markdown]
476
+ ```
477
+
478
+ **When to use what:**
479
+ - **fetch_website**: When you have a specific URL → `Read https://example.com`
480
+ - **Web Search**: When you want to find something → `Find ML repos`
481
+
482
+ ```
483
+ You: Show cache stats
484
+
485
+ Clawdeck: 📊 **Website Cache Statistics**
486
+
487
+ **Location:** `~/.clawdeck/cache/fetched_sites`
488
+
489
+ **Total Entries:** 3
490
+ **Total Size:** 2.4 MB
491
+ **Expired Entries:** 0
492
+
493
+ **Cached URLs:**
494
+ - ✓ 5m old: https://github.com/yiqiao-yin/deepspeed-course
495
+ - ✓ 12m old: https://python.org/downloads
496
+ - ✓ 25m old: https://docs.anthropic.com
497
+ ```
498
+
499
+ ### Document Reading with Vision Mode
500
+ ```
501
+ You: Read quarterly_report.docx with vision mode
502
+
503
+ Clawdeck: [Extracts and processes document with image descriptions]
504
+
505
+ # Quarterly Report Summary
506
+
507
+ ## Executive Overview
508
+ Revenue increased by 23% year-over-year, driven by strong performance in...
509
+
510
+ 📊 **[Image 1]:** Bar chart showing quarterly revenue growth from Q1 to Q4.
511
+ Q4 shows the highest revenue at approximately $2.5M, representing a 23%
512
+ increase from Q3. All quarters show positive growth compared to the previous year.
513
+
514
+ ## Market Analysis
515
+ Our market share expanded across all regions...
516
+
517
+ 📐 **[Image 2]:** System architecture diagram depicting three layers:
518
+ frontend (React), API layer (FastAPI), and database (PostgreSQL).
519
+ Shows data flow from user requests through authentication middleware
520
+ to the backend services.
521
+
522
+ 💰 **Vision API Cost:** $0.06 (2 images processed)
523
+ 📊 **Token Usage:** 1,175 input tokens, 125 output tokens
524
+
525
+ [Use /tokens to see detailed cost breakdown]
526
+ ```
527
+
528
+ **Image Handling Modes:**
529
+ - `skip` (default) - Ignore images entirely, no API calls
530
+ - `describe` - Extract alt text and captions only (no API calls)
531
+ - `vision` - Full Claude Vision API processing (costs ~$0.01-0.05 per image)
532
+
533
+ ## 🎯 Commands
534
+
535
+ ### Chat Commands
536
+
537
+ | Command | Description |
538
+ |---------|-------------|
539
+ | `<message>` | Chat with the AI assistant |
540
+ | `Enter` | Submit your message |
541
+ | `Ctrl+Enter` | Add a new line (multi-line input) |
542
+ | `exit` or `quit` | End the session |
543
+
544
+ ### Slash Commands
545
+
546
+ | Command | Description | Version |
547
+ |---------|-------------|---------|
548
+ | `/clear` | Clear conversation history and reset counters | v0.2.8 |
549
+ | `/history` | Display conversation history | v0.2.8 |
550
+ | `/save <file>` | Save session to JSON | v0.2.8 |
551
+ | `/load <file>` | Load session from JSON | v0.2.8 |
552
+ | `/tokens` | Show token usage and costs | v0.2.8 |
553
+ | `/model [name]` | Show/switch model (haiku/sonnet/opus) | v0.3.0 |
554
+ | `/config` | Show current configuration | v0.3.1 |
555
+ | `/help` | Display help | v0.2.8 |
556
+ | `/memory [list\|save\|search\|delete]` | Manage persistent memories | v0.4.0 |
557
+ | `/plan [approve\|reject\|skip\|status]` | Manage execution plans | v0.4.0 |
558
+ | `/skills` | List custom skills | v0.4.0 |
559
+ | `/hooks` | Show registered hooks and stats | v0.4.0 |
560
+ | `/workers` | Show sub-agent task status | v0.4.0 |
561
+ | `/budget` | Show token budget stats | v0.4.0 |
562
+ | `/dream` | Show dream consolidation status | v0.5.0 |
563
+ | `/compact` | Show context compaction stats | v0.5.0 |
564
+ | `/vim` | Toggle vim editing mode | v0.5.0 |
565
+ | `/voice` | Toggle voice input | v0.5.0 |
566
+ | `/buddy` | Toggle virtual companion | v0.5.0 |
567
+ | `/cron [add\|delete\|pause\|resume]` | Manage scheduled jobs | v0.5.0 |
568
+ | `/plugins [create\|install\|uninstall\|reload]` | Manage plugins | v0.5.0 |
569
+ | `/diagnostics` | Run pyright/ruff diagnostics | v0.5.0 |
570
+ | `/rewind [undo\|<id>]` | Revert conversation state | v0.5.0 |
571
+
572
+ **Example Usage:**
573
+ ```
574
+ You: Write a data analysis script
575
+ Clawdeck: [Creates analysis.py]
576
+
577
+ You: /tokens
578
+ [Shows token usage: 1,500 input tokens, 800 output tokens, $0.02 cost]
579
+
580
+ You: /model
581
+ [Shows current model: Sonnet 4, pricing: $3.00/$15.00 per M tokens]
582
+
583
+ You: /model haiku
584
+ ✓ Switched to Haiku (claude-3-5-haiku-20241022)
585
+
586
+ You: /save my_analysis_session.json
587
+ ✓ Session saved to: my_analysis_session.json
588
+
589
+ You: /clear
590
+ ✓ Conversation history cleared. Token counters reset.
591
+
592
+ You: /load my_analysis_session.json
593
+ ✓ Session loaded from: my_analysis_session.json
594
+ ```
595
+
596
+ ## 📚 Documentation
597
+
598
+ **Full documentation:** https://yiqiao-yin.github.io/clawdeck/docs/
599
+
600
+ Key pages:
601
+ - **[Features Overview](https://yiqiao-yin.github.io/clawdeck/docs/features/overview)** - All features with comparisons
602
+ - **[Memory & Skills](https://yiqiao-yin.github.io/clawdeck/docs/features/agentic-memory)** - Persistent memory and custom commands
603
+ - **[Planning & Sub-Agents](https://yiqiao-yin.github.io/clawdeck/docs/features/planning-and-agents)** - Plan mode and parallel workers
604
+ - **[Hooks & Token Budget](https://yiqiao-yin.github.io/clawdeck/docs/features/hooks-and-budget)** - Pipeline hooks and auto-continue
605
+ - **[Dream & Compaction](https://yiqiao-yin.github.io/clawdeck/docs/features/dream-and-compaction)** - Background memory consolidation
606
+ - **[Vim, Voice & Buddy](https://yiqiao-yin.github.io/clawdeck/docs/features/vim-voice-buddy)** - Input modes and companion
607
+ - **[Cron, Plugins & LSP](https://yiqiao-yin.github.io/clawdeck/docs/features/cron-plugins-lsp)** - Scheduled agents, plugins, diagnostics, rewind
608
+ - **[System Architecture](https://yiqiao-yin.github.io/clawdeck/docs/architecture/system)** - Architecture overview with diagrams
609
+ - **[Commands Reference](https://yiqiao-yin.github.io/clawdeck/docs/usage/commands)** - All slash commands
610
+
611
+ ## 🛠️ Development & Testing
612
+
613
+ ### Prerequisites
614
+
615
+ - Python >= 3.10
616
+ - Poetry (package manager)
617
+ - Anthropic API key
618
+
619
+ ### Setting Up Development Environment
620
+
621
+ 1. **Clone the repository:**
622
+ ```bash
623
+ git clone https://github.com/yiqiao-yin/clawdeck.git
624
+ cd clawdeck
625
+ ```
626
+
627
+ 2. **Install Poetry** (if not already installed):
628
+ ```bash
629
+ curl -sSL https://install.python-poetry.org | python3 -
630
+ ```
631
+
632
+ 3. **Install dependencies:**
633
+ ```bash
634
+ poetry install
635
+ ```
636
+
637
+ This will:
638
+ - Create a virtual environment
639
+ - Install all production dependencies from `pyproject.toml`
640
+ - Install development dependencies (pytest, pytest-asyncio, pytest-mock)
641
+ - Install the package in editable mode
642
+
643
+ ### Running Tests
644
+
645
+ **Run all tests with verbose output:**
646
+ ```bash
647
+ # Skip command confirmation prompts in tests
648
+ CLAWDECK_SKIP_CONFIRM=1 poetry run pytest tests/ -v
649
+ ```
650
+
651
+ **Run tests with short traceback:**
652
+ ```bash
653
+ CLAWDECK_SKIP_CONFIRM=1 poetry run pytest tests/ -v --tb=short
654
+ ```
655
+
656
+ **Run specific test file:**
657
+ ```bash
658
+ poetry run pytest tests/test_agent.py -v
659
+ ```
660
+
661
+ **Run specific test class:**
662
+ ```bash
663
+ poetry run pytest tests/test_utils.py::TestExecuteCommandSafe -v
664
+ ```
665
+
666
+ **Run with coverage report:**
667
+ ```bash
668
+ poetry run pytest tests/ --cov=clawdeck --cov-report=html
669
+ ```
670
+
671
+ ### Test Structure
672
+
673
+ ```
674
+ tests/
675
+ ├── __init__.py
676
+ ├── test_agent.py # Agent and tool tests (93 tests)
677
+ ├── test_cli.py # CLI and slash command tests (33 tests)
678
+ ├── test_config.py # Configuration tests (25 tests)
679
+ ├── test_utils.py # Utility function tests (29 tests)
680
+ ├── test_memory.py # Memory system tests (14 tests)
681
+ ├── test_subagent.py # Sub-agent worker tests (14 tests)
682
+ ├── test_planner.py # Plan mode tests (26 tests)
683
+ ├── test_token_budget.py # Token budget tests (12 tests)
684
+ ├── test_skills.py # Skills system tests (13 tests)
685
+ ├── test_hooks.py # Hook system tests (20 tests)
686
+ ├── test_dream.py # Dream consolidation tests (11 tests)
687
+ └── test_v050_features.py # Compaction, vim, voice, buddy, cron,
688
+ # plugins, LSP, rewind tests (62 tests)
689
+ # Total: 333+ tests
690
+ ```
691
+
692
+ ### Expected Output
693
+
694
+ When all tests pass, you should see:
695
+ ```
696
+ ============================= test session starts ==============================
697
+ platform linux -- Python 3.10.12, pytest-8.4.2, pluggy-1.6.0
698
+ cachedir: .pytest_cache
699
+ rootdir: /home/workbench/clawdeck/clawdeck
700
+ configfile: pyproject.toml
701
+ plugins: asyncio-1.2.0, mock-3.15.1
702
+ collected 133 items
703
+
704
+ tests/test_agent.py::TestClawdeckAgent::test_agent_initialization PASSED [ 1%]
705
+ tests/test_agent.py::TestHistoryManagement::test_clear_history PASSED [ 18%]
706
+ tests/test_agent.py::TestStreaming::test_chat_stream_method_exists PASSED [ 40%]
707
+ tests/test_cli.py::TestSlashCommands::test_clear_command PASSED [ 42%]
708
+ tests/test_config.py::TestClawdeckConfig::test_default_values PASSED [ 60%]
709
+ ...
710
+ tests/test_utils.py::TestExecuteCommandSafe::test_execute_python_script PASSED [100%]
711
+
712
+ ============================== 133 passed in 2.64s
713
+ ```
714
+
715
+ ### Building and Publishing
716
+
717
+ **Build the package:**
718
+ ```bash
719
+ poetry build
720
+ ```
721
+
722
+ This creates:
723
+ - `dist/clawdeck-X.Y.Z.tar.gz` (source distribution)
724
+ - `dist/clawdeck-X.Y.Z-py3-none-any.whl` (wheel)
725
+
726
+ **Publish to PyPI:**
727
+ ```bash
728
+ poetry publish
729
+ ```
730
+
731
+ **Build and publish in one command:**
732
+ ```bash
733
+ poetry build && poetry publish
734
+ ```
735
+
736
+ ### Version Management
737
+
738
+ Update version in these files:
739
+ - `pyproject.toml` - `version = "X.Y.Z"`
740
+ - `clawdeck/__init__.py` - `__version__ = "X.Y.Z"`
741
+ - `USE_CASES.md` - Update changelog and version number
742
+
743
+ ### Development Workflow
744
+
745
+ 1. **Create a feature branch:**
746
+ ```bash
747
+ git checkout -b feature/your-feature-name
748
+ ```
749
+
750
+ 2. **Make changes and test:**
751
+ ```bash
752
+ # Make your changes
753
+ CLAWDECK_SKIP_CONFIRM=1 poetry run pytest tests/ -v
754
+ ```
755
+
756
+ 3. **Update version and documentation:**
757
+ ```bash
758
+ # Update version in pyproject.toml, __init__.py, USE_CASES.md
759
+ ```
760
+
761
+ 4. **Commit and push:**
762
+ ```bash
763
+ git add .
764
+ git commit -m "feat: your feature description"
765
+ git push origin feature/your-feature-name
766
+ ```
767
+
768
+ 5. **Build and publish:**
769
+ ```bash
770
+ poetry build && poetry publish
771
+ git push origin main
772
+ ```
773
+
774
+ ## 🧪 Environment Variables
775
+
776
+ ### Core Configuration
777
+
778
+ | Variable | Description | Default |
779
+ |----------|-------------|---------|
780
+ | `CHOOSE_CLIENT` | AI provider selection: `1`=Anthropic, `2`=Bedrock, `3`=Gemini, `0`=Auto-detect | `0` (auto) |
781
+ | `MAX_TOKEN` | Maximum tokens for model output (can also use `--max-token` CLI arg) | `4096` |
782
+ | `MAX_INTERNET_SEARCH_LIMIT` | Maximum web searches per session (can also use `--max-internet-search-limit` CLI arg) | `5` |
783
+ | `CLAWDECK_SKIP_CONFIRM` | Skip command execution confirmations | `0` (disabled) |
784
+ | `CLAWDECK_BROWSER_SHOW` | Show browser window during automation (can also use `--show-browser` CLI arg) | `0` (headless) |
785
+
786
+ ### Anthropic Claude (CHOOSE_CLIENT=1)
787
+
788
+ | Variable | Description | Default |
789
+ |----------|-------------|---------|
790
+ | `ANTHROPIC_API_KEY` | Anthropic API key | None (required) |
791
+ | `ANTHROPIC_MODEL` | Model to use (e.g., claude-sonnet-4-20250514) | Auto-selected |
792
+
793
+ ### Google Gemini (CHOOSE_CLIENT=3) 🆕
794
+
795
+ | Variable | Description | Default |
796
+ |----------|-------------|---------|
797
+ | `GEMINI_API_KEY` or `GOOGLE_API_KEY` | Google Gemini API key | None (required) |
798
+ | `GEMINI_MODEL` | Model to use (e.g., gemini-2.5-flash, gemini-2.5-pro) | `gemini-2.5-flash` |
799
+
800
+ ### AWS Bedrock (CHOOSE_CLIENT=2)
801
+
802
+ | Variable | Description | Default |
803
+ |----------|-------------|---------|
804
+ | `AWS_ACCESS_KEY_ID` | AWS access key ID | None (required) |
805
+ | `AWS_SECRET_ACCESS_KEY` | AWS secret access key | None (required) |
806
+ | `AWS_SESSION_TOKEN` | AWS session token (optional, for temporary credentials) | None |
807
+ | `AWS_REGION` | AWS region for Bedrock (e.g., us-west-2) | `us-east-1` |
808
+ | `ANTHROPIC_MODEL` | Model ARN (e.g., us.anthropic.claude-sonnet-4-20250514-v1:0) | Auto-selected |
809
+
810
+ ### Integration Tokens (Optional)
811
+
812
+ | Variable | Description | Default |
813
+ |----------|-------------|---------|
814
+ | `HF_TOKEN` or `HUGGINGFACE_TOKEN` | HuggingFace API token (for HF features) | None |
815
+ | `GH_TOKEN` or `GITHUB_TOKEN` | GitHub access token (for GitHub features) | None |
816
+
817
+ **Setup Example (Anthropic API):**
818
+ ```bash
819
+ # .env file
820
+ CHOOSE_CLIENT=1
821
+ ANTHROPIC_API_KEY=your_anthropic_key
822
+ MAX_TOKEN=4096
823
+ MAX_INTERNET_SEARCH_LIMIT=5
824
+ GH_TOKEN=ghp_your_github_token
825
+ HF_TOKEN=hf_your_huggingface_token
826
+ CLAWDECK_SKIP_CONFIRM=0
827
+ CLAWDECK_BROWSER_SHOW=0
828
+ ```
829
+
830
+ **Setup Example (Google Gemini):** 🆕
831
+ ```bash
832
+ # .env file
833
+ CHOOSE_CLIENT=3
834
+ GEMINI_API_KEY=your_gemini_key
835
+ GEMINI_MODEL=gemini-2.5-flash
836
+ MAX_TOKEN=4096
837
+ GH_TOKEN=ghp_your_github_token
838
+ HF_TOKEN=hf_your_huggingface_token
839
+ CLAWDECK_SKIP_CONFIRM=0
840
+ CLAWDECK_BROWSER_SHOW=0
841
+ ```
842
+
843
+ **Setup Example (AWS Bedrock):**
844
+ ```bash
845
+ # .env file
846
+ CHOOSE_CLIENT=2
847
+ AWS_ACCESS_KEY_ID=your_access_key
848
+ AWS_SECRET_ACCESS_KEY=your_secret_key
849
+ AWS_SESSION_TOKEN=your_session_token
850
+ AWS_REGION=us-west-2
851
+ ANTHROPIC_MODEL=us.anthropic.claude-sonnet-4-20250514-v1:0
852
+ MAX_TOKEN=4096
853
+ GH_TOKEN=ghp_your_github_token
854
+ HF_TOKEN=hf_your_huggingface_token
855
+ CLAWDECK_SKIP_CONFIRM=0
856
+ CLAWDECK_BROWSER_SHOW=0
857
+ ```
858
+
859
+ **Notes:**
860
+ - Set `CHOOSE_CLIENT=0` (or omit it) for auto-detection based on available API keys
861
+ - Set `CLAWDECK_SKIP_CONFIRM=1` to skip confirmation prompts (useful for testing or automation)
862
+ - Set `CLAWDECK_BROWSER_SHOW=1` to show browser window during automation (useful for debugging)
863
+ - Gemini is ~40x cheaper than Claude and has 2M context window!
864
+
865
+ ## 📋 Requirements
866
+
867
+ - Python >= 3.10, < 4.0
868
+ - Dependencies (automatically installed):
869
+ - `click>=8.1.0` - CLI framework
870
+ - `pydantic-ai>=1.13.0` - AI agent framework with web search support
871
+ - `anthropic>=0.39.0` - Anthropic API client
872
+ - `rich>=13.0.0` - Terminal formatting
873
+ - `python-dotenv>=1.2.1` - Environment variable management
874
+ - `prompt-toolkit>=3.0.0` - Advanced input handling
875
+ - `pyyaml>=6.0.0` - Configuration file support
876
+ - `huggingface-hub>=0.20.0` - HuggingFace integration
877
+ - `crawl4ai>=0.7.6` - LLM-optimized web crawler for browser use
878
+
879
+ **Note:** Browser use requires Playwright browser binaries (~200MB):
880
+ ```bash
881
+ playwright install chromium
882
+ ```
883
+
884
+ ## Web Terminal
885
+
886
+ Clawdeck is also available as a browser-based terminal at:
887
+
888
+ **https://clawdeckterminal-app.azurewebsites.net**
889
+
890
+ This is a real Linux terminal running in your browser with `clawdeck` pre-installed. No account or login required -- just open the URL and start using it.
891
+
892
+ ### Usage
893
+
894
+ 1. Open the terminal URL in your browser
895
+ 2. Export your API key:
896
+ ```bash
897
+ export ANTHROPIC_API_KEY=sk-ant-your-key-here
898
+ ```
899
+ 3. Launch the assistant:
900
+ ```bash
901
+ clawdeck
902
+ ```
903
+
904
+ All four AI providers are supported (Anthropic, AWS Bedrock, Google Gemini, OpenAI). Your API keys are never stored on the server -- they only exist in your browser terminal session and are discarded when you close the tab.
905
+
906
+ ### Self-Hosting
907
+
908
+ To deploy your own instance, you need Docker and Azure CLI:
909
+
910
+ ```bash
911
+ az login
912
+ bash deploy-azure.sh
913
+ ```
914
+
915
+ This creates four Azure resources (all prefixed `clawdeckterminal`):
916
+
917
+ | Resource | Name | Purpose |
918
+ |----------|------|---------|
919
+ | Resource Group | `clawdeckterminal-rg` | Container for all resources |
920
+ | Container Registry | `clawdeckterminalacr` | Stores the Docker image |
921
+ | App Service Plan | `clawdeckterminal-plan` (B1) | Compute for the web app |
922
+ | Web App | `clawdeckterminal-app` | Serves the terminal UI |
923
+
924
+ The container uses [ttyd](https://github.com/tsl0922/ttyd) to expose a bash shell over WebSocket, with `clawdeck` pre-installed. No secrets are baked into the image.
925
+
926
+ To tear down:
927
+ ```bash
928
+ az group delete --name clawdeckterminal-rg --yes
929
+ ```
930
+
931
+ ### Related Files
932
+
933
+ - `Dockerfile.web` -- Container image definition
934
+ - `deploy-azure.sh` -- Azure deployment script
935
+ - `terminal-motd.sh` -- Welcome message shown on terminal connect
936
+ - `docker-compose.web.yml` -- Local development with Docker Compose
937
+
938
+ ## 🤝 Contributing
939
+
940
+ Contributions are welcome! Please feel free to submit a Pull Request.
941
+
942
+ 1. Fork the repository
943
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
944
+ 3. Run tests (`CLAWDECK_SKIP_CONFIRM=1 poetry run pytest tests/ -v`)
945
+ 4. Commit your changes (`git commit -m 'feat: add amazing feature'`)
946
+ 5. Push to the branch (`git push origin feature/amazing-feature`)
947
+ 6. Open a Pull Request
948
+
949
+ ## 📄 License
950
+
951
+ This project is licensed under the MIT License - see the LICENSE file for details.
952
+
953
+ ## 👤 Author
954
+
955
+ **Yiqiao Yin**
956
+ - Email: yiqiao.yin@wyn-associates.com
957
+ - GitHub: [@yiqiao-yin](https://github.com/yiqiao-yin)
958
+
959
+ ## 🙏 Acknowledgments
960
+
961
+ - Built with [Anthropic Claude](https://www.anthropic.com/claude) - Advanced AI assistant
962
+ - Powered by [pydantic-ai](https://github.com/pydantic/pydantic-ai) - Python agent framework
963
+ - CLI framework by [Click](https://click.palletsprojects.com/)
964
+ - Terminal UI by [Rich](https://rich.readthedocs.io/)
965
+
966
+ ## 🔗 Links
967
+
968
+ - **PyPI:** https://pypi.org/project/clawdeck/
969
+ - **GitHub:** https://github.com/yiqiao-yin/clawdeck
970
+ - **Documentation:**
971
+ - [USE_CASES.md](docs/USE_CASES.md) - Usage examples and workflows
972
+ - [COST.md](docs/COST.md) - Pricing and token configuration
973
+ - [SYSTEM.md](docs/SYSTEM.md) - Architecture overview
974
+ - **Get API Key:** https://console.anthropic.com/
975
+
976
+ ---
977
+
978
+ **Current Version:** 0.5.3
979
+ **Last Updated:** April 2026
980
+