ClawdBot on GitHub

Explore the open-source codebase, contribute to development, and join the community.

View on GitHub โ†’

๐Ÿ“ฆ 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

Reddit

r/ClawdBot - Community discussions and tips

Learning Resources

Official Documentation

Code Examples

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

Can I use ClawdBot code in my commercial project?
Yes! The MIT license allows commercial use. Just include the license file and attribution.
How do I add support for a new messaging platform?
Create a new channel adapter in src/channels/. Follow the existing patterns (see Telegram adapter as reference). Submit a PR!
Can I create and sell ClawdBot skills?
Absolutely! Skills are separate from the core codebase. You can create commercial skills/plugins.
How often is ClawdBot updated?
Active development with releases every 2-4 weeks. Check the Releases page for updates.
Where can I find the API documentation?
TypeScript definitions serve as API docs. Also check docs/api/ in the repository.
How do I become a maintainer?
Contribute consistently, help the community, and demonstrate expertise. Maintainers are invited based on contributions.

๐Ÿ“š Related Developer Resources