claude-to-whatsapp
Bot de WhatsApp con integración a Claude AI CLI.
Características
- Conexión a WhatsApp Web mediante Neonize
- Integración con Claude AI CLI
- Sistema de comandos (
BOTSET:) - Notificaciones periódicas de estado
- Persistencia de sesión de Claude
- Paquete Python instalable via pip
Instalación
Desde PyPI (futuro)
pip install claude-to-whatsapp
En modo desarrollo (editable)
cd claude-to-whatsapp
pip install -e .
Uso
Preparar el directorio de trabajo
El bot lee archivos de configuración del directorio actual donde se ejecuta:
tu-directorio/
├── system_prompt.txt # System prompt personalizado (opcional)
└── .claude/
├── agents/ # Definiciones de agentes (.md)
└── skills/ # Definiciones de skills
Ejecutar el bot
# Usando el entry point
claude-to-whatsapp
# O usando python -m
python -m claude_to_whatsapp
Primera ejecución
- Escanea el QR código que aparece en la terminal
- Envía un mensaje a ti mismo en WhatsApp
- El bot responderá usando Claude AI
Comandos del Bot
| Comando | Descripción |
|---|---|
BOTSET:reload |
Reinicia el bot |
BOTSET:logout |
Cierra la sesión de WhatsApp |
BOTSET:status |
Muestra el estado del bot |
BOTSET:help |
Muestra ayuda |
Configuración
System Prompt Personalizado
Crea un archivo system_prompt.txt en tu directorio de trabajo:
Responde siempre en español. Formatea tus respuestas para WhatsApp...
Agentes
Crea archivos .md en .claude/agents/ con frontmatter YAML:
---
name: python-explorer
description: Explorador de código Python
tools: Bash, Grep, Read
model: sonnet
---
# Instrucciones del agente...
Skills
Skills se definen en .claude/skills/*/ con archivos SKILL.md.
Directorios de Datos
| Directorio | Ubicación | Contenido |
|---|---|---|
| Datos del bot | ~/.claude-to-whatsapp/ |
whatsapp_session.db, bot_data.db, whatsapp.log |
| Recursos | Directorio actual | system_prompt.txt, .claude/agents/, .claude/skills/ |
Seguridad
El bot solo responde a mensajes enviados por ti mismo (self-messages). Esto garantiza que solo el dueño del número pueda interactuar con el bot.
Arquitectura
claude-to-whatsapp/
├── src/claude_to_whatsapp/
│ ├── cli.py # Entry point CLI
│ ├── config.py # Configuración
│ ├── core/ # Lógica del bot
│ ├── integration/ # WhatsApp + Claude
│ ├── events/ # Manejo de eventos
│ ├── persistence/ # Base de datos
│ └── notifications/ # Notificaciones periódicas
├── tests/ # Suite de pruebas
├── pyproject.toml # Configuración del paquete
└── README.md # Este archivo
Desarrolladores
Ejecutar tests
pip install -e ".[dev]"
pytest
Linting y formatting
black src/
ruff check src/
Licencia
MIT
Autor
alejoair
Metadata
Release files for claude-to-whatsapp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| claude_to_whatsapp-0.1.0.tar.gz | 17.0 kB | Without provenance | Details for claude_to_whatsapp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| claude_to_whatsapp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for claude_to_whatsapp-0.1.0-py3-none-any.whl |
Total release size: 37.6 kB
Release files / claude_to_whatsapp-0.1.0.tar.gz
| Download URL | claude_to_whatsapp-0.1.0.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0357d365c5c73ad98b47fa908b5dd6144d8c3881382c2d8daec53383887dd66d
|
|
BLAKE2b-256 checksum How to use checksums |
d8593ba29e919c8cec93b3776816ea1ac29da46264fdfb1fa2671a6b35dc492a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / claude_to_whatsapp-0.1.0-py3-none-any.whl
| Download URL | claude_to_whatsapp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80c3d5fb870b79109486acdaf88a91a7d229c4d0a61358eacc0dc6dbba482666
|
|
BLAKE2b-256 checksum How to use checksums |
a91e579e9bf07bbea3555ccb1944fd03bb94df74f19a8c79a884310cb2158bc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for claude-to-whatsapp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.