๐ GitHub Guide Contents
๐ฆ Repository Overview
Repository Stats
Stars: 2,000+
Forks: 150+
Contributors: 30+
License
MIT License
Free to use, modify, and distribute
Tech Stack
Node.js, TypeScript
Puppeteer, Baileys, Telegraf
Official Repository
URL: github.com/steipete/ClawdBot
Creator: Peter Steinberger (Founder of PSPDFKit)
First Release: 2024
Latest Version: Check Releases
What's in the Repository?
- ๐ง Gateway Server: Core routing and message handling
- ๐ฑ Channel Adapters: Integrations for Telegram, WhatsApp, Discord, etc.
- ๐ค AI Providers: Connectors for Claude, GPT-4, Gemini, Ollama
- ๐ Browser Tools: Puppeteer-based automation
- ๐ง Memory System: Conversation storage and retrieval
- ๐ Skills Framework: Plugin architecture
- ๐ Documentation: Setup guides, API docs
- ๐งช Tests: Unit and integration tests
๐๏ธ Code Structure
ClawdBot/
โโโ src/
โ โโโ gateway/ # Core server logic
โ โ โโโ server.ts
โ โ โโโ router.ts
โ โ โโโ config.ts
โ โโโ channels/ # Messaging platform integrations
โ โ โโโ telegram/
โ โ โโโ whatsapp/
โ โ โโโ discord/
โ โ โโโ imessage/
โ โโโ providers/ # AI model providers
โ โ โโโ anthropic.ts
โ โ โโโ openai.ts
โ โ โโโ gemini.ts
โ โ โโโ ollama.ts
โ โโโ tools/ # Browser, file system, etc.
โ โ โโโ browser.ts
โ โ โโโ filesystem.ts
โ โ โโโ shell.ts
โ โโโ memory/ # Conversation storage
โ โ โโโ store.ts
โ โ โโโ retrieval.ts
โ โโโ skills/ # Plugin system
โ โโโ manager.ts
โโโ skills/ # Community skills
โโโ tests/ # Test suites
โโโ docs/ # Documentation
โโโ config/ # Default configs
โโโ package.json
โโโ README.md
Key Files to Understand
1. src/gateway/server.ts
The heart of ClawdBot. Handles incoming messages, routes to AI providers, and sends responses.
2. src/channels/telegram/index.ts
Example of a channel adapter. Shows how messaging platforms integrate with the Gateway.
3. src/providers/anthropic.ts
AI provider implementation. Demonstrates how to connect to Claude API.
4. src/tools/browser.ts
Browser automation using Puppeteer. Core of the web scraping capabilities.
5. src/memory/store.ts
Persistent memory system. Stores conversations as Markdown files.
๐ Getting Started with Development
1. Fork and Clone
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/ClawdBot.git
cd ClawdBot
2. Install Dependencies
npm install
3. Set Up Environment
# Copy example config
cp config/example.yaml config/local.yaml
# Add your API keys
nano config/local.yaml
4. Run in Development Mode
# Start with hot reload
npm run dev
# Run tests
npm test
# Lint code
npm run lint
5. Build for Production
npm run build
Development Tools
- TypeScript: Type-safe development
- ESLint: Code quality checks
- Prettier: Code formatting
- Jest: Testing framework
- Nodemon: Auto-restart on changes
๐ค How to Contribute
ClawdBot welcomes contributions! Here's how to get involved:
Ways to Contribute
1. Code Contributions
- ๐ Fix bugs
- โจ Add new features
- ๐ฑ Create new channel adapters
- ๐ Build skills/plugins
- โก Performance improvements
- ๐งช Write tests
2. Documentation
- ๐ Improve README
- ๐ Write tutorials
- ๐ Translate docs
- ๐ฅ Create video guides
3. Community Support
- ๐ฌ Answer questions on Discord
- ๐ Triage GitHub issues
- ๐ฅ Help newcomers
Contribution Guidelines
Code Style
# Follow existing patterns
# Use TypeScript for type safety
# Write descriptive commit messages
# Add tests for new features
# Update documentation
Commit Message Format
type(scope): brief description
Examples:
feat(telegram): add inline keyboard support
fix(browser): resolve timeout issues
docs(readme): update installation steps
test(memory): add unit tests for retrieval
Before Submitting
# Run tests
npm test
# Check linting
npm run lint
# Format code
npm run format
# Build successfully
npm run build
๐ Reporting Issues
Before Creating an Issue
- โ Search existing issues to avoid duplicates
- โ Check if it's already fixed in the latest version
- โ Read the troubleshooting guide
- โ Try to reproduce the issue
Issue Template
**Bug Description**
Clear description of what went wrong
**Steps to Reproduce**
1. Start ClawdBot with...
2. Send message...
3. Error occurs...
**Expected Behavior**
What should have happened
**Actual Behavior**
What actually happened
**Environment**
- OS: macOS 14.2
- Node.js: v22.0.0
- ClawdBot: v1.5.0
- AI Model: Claude 3.5 Sonnet
**Logs**
```
[Paste relevant logs here]
```
**Additional Context**
Any other relevant information
Issue Labels
| Label | Meaning |
|---|---|
bug |
Something isn't working |
enhancement |
New feature request |
documentation |
Docs improvements |
good first issue |
Good for newcomers |
help wanted |
Community help needed |
๐ Submitting Pull Requests
PR Workflow
1. Create a Branch
git checkout -b feature/my-new-feature
# or
git checkout -b fix/bug-description
2. Make Changes
# Write code
# Add tests
# Update docs
# Commit changes
git add .
git commit -m "feat(scope): add awesome feature"
3. Push to Your Fork
git push origin feature/my-new-feature
4. Open Pull Request
Go to GitHub and click "New Pull Request"
PR Template
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Tests pass locally
- [ ] Added new tests
- [ ] Manual testing completed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-reviewed code
- [ ] Commented complex code
- [ ] Updated documentation
- [ ] No new warnings
## Related Issues
Fixes #123
Related to #456
Review Process
- ๐ Maintainers review your code
- ๐ฌ Address feedback and make changes
- โ Once approved, PR is merged
- ๐ Your contribution is live!
Tips for Faster Approval
- โ Keep PRs focused and small
- โ Write clear descriptions
- โ Include tests
- โ Follow code style
- โ Be responsive to feedback
๐ฅ Community & Resources
Official Channels
GitHub Discussions
github.com/steipete/ClawdBot/discussions
- ๐ก Feature ideas
- โ Q&A
- ๐ข Announcements
- ๐ฌ General chat
Discord Server
Join the community Discord (link in GitHub README)
- #general - General discussion
- #support - Get help
- #development - Dev talk
- #showcase - Show your projects
r/ClawdBot - Community discussions and tips
Learning Resources
Official Documentation
- docs.clawd.bot - Complete docs
- GitHub Wiki - Community guides
Code Examples
- examples/ - Sample implementations
- GitHub Topics - Community projects
Video Tutorials
- YouTube: Search "ClawdBot tutorial"
- Creator's blog: steipete.me
Notable Contributors
See Contributors page for the full list of amazing people building ClawdBot!
โ Developer FAQ
src/channels/. Follow the
existing patterns (see Telegram adapter as reference). Submit a PR!docs/api/
in the repository.