Skip to main content

Semantic + graph search over your WhatsApp messages

Project description

wactx

Semantic + graph search over your WhatsApp messages. Built for founders with 100+ groups who need to find people, conversations, and connections fast.

What it does: Sync your WhatsApp via whatsmeow → embed with any OpenAI-compatible API → build a relationship graph → search across people, topics, and messages in one query.

Quickstart

Requires uv and Go 1.21+.

git clone https://github.com/your-org/whatsapp-ctx-cli
cd whatsapp-ctx-cli
uv sync
uv run wactx init             # walks you through provider setup, builds Go binary
uv run wactx sync             # scan QR code on first run
uv run wactx index            # embed messages
uv run wactx search "who knows about GTM consultants"

wactx init is interactive — it asks for your API provider, key, and builds the WhatsApp sync binary automatically. No make or manual config needed.

Search

wactx search "kubernetes expert" --depth fast        # ~2s, 1 query, no graph
wactx search "fundraising advice"                    # ~5s, balanced (default)
wactx search "AI research" --depth deep              # ~8s, 8 query variants, full graph

wactx search "cofounder" --variants 3 --top 20
wactx search "sales strategy" --no-graph
wactx search "hiring ML engineers" --json
wactx search "investors" --json | jq '.people[:5]'

Search returns two ranked lists:

  • People — scored by 0.6 × semantic_similarity + 0.4 × graph_proximity (DMs, shared groups, co-mentioned entities)
  • Messages — ranked by embedding cosine similarity across multiple query variants

When graph data is available, you also get a Graph Insights panel showing shared groups between result people, common entities, and your connection strength (🟢 strong / 🟡 weak / ⚪ indirect).

Sync & Media

wactx sync                    # incremental sync (default)
wactx sync --full             # full history sync
wactx sync --live             # stay connected, receive new messages

wactx download                # download all media
wactx download --types image --after 2026-01-01
wactx download --chat "group@g.us"

First run displays a QR code in the terminal — scan it with WhatsApp on your phone. Session persists across runs.

Entity Extraction & Graph

wactx enrich                  # extract persons, orgs, techs, URLs, events
wactx graph                   # build relationship graph
wactx search "who should I talk to about fundraising"

The graph connects:

  • People ↔ People via DMs and group co-membership
  • People ↔ Groups via message activity
  • People ↔ Entities via extracted mentions (orgs, techs, events)

Configuration

# ~/.config/wactx/config.toml

db_path = "~/.local/share/wactx/messages.duckdb"

[api]
base_url = "https://api.openai.com/v1"
key = ""
embedding_model = "text-embedding-3-large"
embedding_dims = 384
chat_model = "gpt-5-mini"
max_concurrent = 5

[sync]
wa_db_path = "whatsmeow.db"
media_dir = "media"
timeout = "5m"

[search]
default_depth = "balanced"
owner_name = "Your Name"

Works with any OpenAI-compatible endpoint:

# Cloudflare AI Gateway
wactx config api.base_url https://gateway.ai.cloudflare.com/v1/ACCOUNT/GATEWAY/compat

# Ollama (local, free)
wactx config api.base_url http://localhost:11434/v1
wactx config api.embedding_model nomic-embed-text

All Commands

Command Description
wactx init Create config and database
wactx config KEY VALUE Set a config value
wactx sync Sync messages from WhatsApp
wactx download Download media attachments
wactx index [--reset] Embed messages for semantic search
wactx enrich [--all] Extract entities from messages
wactx graph Build relationship graph
wactx search QUERY Semantic + graph search
wactx stats Show database statistics

Agent Integration

Copy the skill to your Claude Code skills directory:

cp -r skills/wactx ~/.claude/skills/

Claude will automatically use wactx search when you ask about contacts, conversations, or relationships.

Architecture

WhatsApp (phone)
    │
    ▼
wactx sync (bundled Go binary, whatsmeow) ──→ messages + contacts (DuckDB)
    │
    ▼
wactx index  ──→ embeddings via OpenAI-compatible API + HNSW index
    │
    ▼
wactx enrich ──→ extracted entities (persons, orgs, techs, events)
    │
    ▼
wactx graph  ──→ DuckPGQ property graph (vertices + edges)
    │
    ▼
wactx search ──→ multi-query semantic search + graph traversal + rich output

Stack: Python · Go · DuckDB · DuckPGQ · DuckDB VSS · whatsmeow · OpenAI-compatible API · Rich · Click

Development

Requires uv and Go 1.21+.

git clone https://github.com/your-org/whatsapp-ctx-cli
cd whatsapp-ctx-cli
uv sync --group dev                     # install deps + dev tools
uv run python build_go.py               # compile Go binary
uv run pytest                           # run tests

Cross-compile for all platforms:

uv run python build_go.py --all         # linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64

A Makefile is included as a convenience but uv is all you need.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

whatsapp_ctx_cli-0.1.0-py3-none-win_amd64.whl (64.8 MB view details)

Uploaded Python 3Windows x86-64

whatsapp_ctx_cli-0.1.0-py3-none-manylinux_2_17_x86_64.whl (65.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

whatsapp_ctx_cli-0.1.0-py3-none-manylinux_2_17_aarch64.whl (60.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

whatsapp_ctx_cli-0.1.0-py3-none-macosx_11_0_x86_64.whl (59.6 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

whatsapp_ctx_cli-0.1.0-py3-none-macosx_11_0_arm64.whl (54.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file whatsapp_ctx_cli-0.1.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for whatsapp_ctx_cli-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c770fa7d5acb5f91d679cd08cb2bf2ce48da6bf9b4e2395773050da848f326c6
MD5 24249d63a9f351a2036d9ae0aafa6abd
BLAKE2b-256 4aa79c0621604080a296e2abf0fd5aeaa2ab9284d8a6e9602fcb3a6dc2f6322c

See more details on using hashes here.

Provenance

The following attestation bundles were made for whatsapp_ctx_cli-0.1.0-py3-none-win_amd64.whl:

Publisher: build.yml on iofold/whatsapp-ctx-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whatsapp_ctx_cli-0.1.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for whatsapp_ctx_cli-0.1.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 96dfffe86abb482e21fdce223bebb7ba8b1d03bc448de110a45398eb70f63b3c
MD5 bee4de9926363a49bffc11ce5dd2cb46
BLAKE2b-256 3a62de77883d5f868a3b8775939034c632202f16f947e2504c7281275dc201ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for whatsapp_ctx_cli-0.1.0-py3-none-manylinux_2_17_x86_64.whl:

Publisher: build.yml on iofold/whatsapp-ctx-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whatsapp_ctx_cli-0.1.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for whatsapp_ctx_cli-0.1.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 d7f4dde52a131285737af529f07a9812bcc6208698c39904ab8a2a4fff74e4c6
MD5 006cda6012bb0ebada345a0a532d4cdb
BLAKE2b-256 1759893537b3798eb36e13335d12c136f20d7959265dd2b49d891212b5a7ac5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for whatsapp_ctx_cli-0.1.0-py3-none-manylinux_2_17_aarch64.whl:

Publisher: build.yml on iofold/whatsapp-ctx-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whatsapp_ctx_cli-0.1.0-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for whatsapp_ctx_cli-0.1.0-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 290e193aa0d8e1e21ca8c5895abaf5c3d350ac5ec98f2ee26624f98aadbe6603
MD5 058acdf29a010811eeec7d5f9c68d046
BLAKE2b-256 7684af40f05fe53aa893a2dfaa85918763fb0f1d3aef0d622cdf7656821b9bca

See more details on using hashes here.

Provenance

The following attestation bundles were made for whatsapp_ctx_cli-0.1.0-py3-none-macosx_11_0_x86_64.whl:

Publisher: build.yml on iofold/whatsapp-ctx-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whatsapp_ctx_cli-0.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for whatsapp_ctx_cli-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5b8c3e6d670715175b19603865525fa27f608b475ddb36565a34ef5f6f6f9ff
MD5 68b7a19c851f7f528beda2734ed570ed
BLAKE2b-256 2526251e236c9e848d09dfebcb8005d73015d034affa59b00e2634b79b992a92

See more details on using hashes here.

Provenance

The following attestation bundles were made for whatsapp_ctx_cli-0.1.0-py3-none-macosx_11_0_arm64.whl:

Publisher: build.yml on iofold/whatsapp-ctx-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page