Skip to main content

CLI and client library for the Wealthbox CRM API

Project description

Wealthbox CLI

PyPI version Python 3.11+ License

A command-line interface for interacting with the Wealthbox CRM API.

This tool provides structured access to contacts, households, tasks, events, notes, users, categories, and more — directly from your terminal.

Official API documentation: https://dev.wealthbox.com

Disclaimer: This is an unofficial, community-built tool. It is not affiliated with, endorsed by, or supported by Wealthbox or its parent company. "Wealthbox" is a trademark of its respective owner.


Features

  • Full CRUD support for:
    • Contacts (Person, Household, Organization, Trust)
    • Households (member management)
    • Tasks
    • Events
    • Notes (create, read, update — delete not supported by API)
  • Structured flag-based add and update commands — no raw JSON required
  • Type-specific contact creation subcommands: contacts add person|household|org|trust
  • --more-fields escape hatch on contacts/tasks/projects/opportunities/workflows for uncommon JSON fields
  • Multiple output formats via --format: json (default), table, csv, tsv
  • Nested API fields (linked_to, email_addresses, tags, etc.) automatically flattened for tabular output
  • Category and metadata lookups (resource-scoped and workspace-level)
  • Client-side filters for fields the API doesn't support server-side (e.g. --assigned-to on contacts)
  • Modular CLI structure with extensible client + model architecture

Installation

From PyPI (recommended)

pip install wealthbox-cli

From source (development)

git clone https://github.com/massive-value/wealthbox-cli
cd wealthbox-cli
python -m venv .venv
source .venv/bin/activate  # macOS/Linux
# OR
.venv\Scripts\activate     # Windows
pip install -e ".[dev]"

Configuration

Copy .env.example to .env and fill in your token:

WEALTHBOX_TOKEN=your_api_token_here

Or set it as an environment variable:

macOS/Linux

export WEALTHBOX_TOKEN="your_api_token_here"

Windows (PowerShell)

setx WEALTHBOX_TOKEN "your_api_token_here"

Usage

wbox <resource> <command> [options]
wb <resource> <command> [options]

For the full command reference see docs/cli-reference.md.

Local wrapper

For this workspace, the easiest entrypoint is:

./run-wbox.sh me --format json
./run-wbox.sh users list --format json
./run-wbox.sh contacts list --per-page 1 --format json
./run-wbox.sh contacts add person --first-name Jane --last-name Doe --format json

The wrapper:

  • loads .env
  • uses the repo-local .venv
  • runs the installed wbox CLI

Project Structure

src/
  wealthbox_tools/
    cli/        # Typer commands — user-facing, delegates to client
    client/     # Async HTTP client built from mixins
    models/     # Pydantic v2 models for input validation
tests/          # pytest integration tests (respx mocks)

Client mixin pattern: WealthboxClient inherits from resource mixins (ContactsMixin, TasksMixin, EventsMixin, etc.) plus _WealthboxBase (core HTTP, rate limiting, error handling). To add a new resource, create a mixin and register it in client/__init__.py.

Rate limiting: Sliding-window (300 req / 5-min window); state persists across processes via ~/.wbox_rate_limit.json. 429 responses trigger automatic retry.


Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run a single test
pytest tests/path/to/test_file.py::test_name

Recommended local workflow

cd ~/.openclaw/workspace/integrations/wealthbox-cli

# Sync latest code
git pull

# Refresh editable install
.venv/bin/pip install -e .

# Run the read-only smoke test
./smoke_test.sh

Smoke test coverage:

  • wbox me
  • wbox users list
  • wbox contacts list --per-page 1

This is intentionally read-only and meant to catch:

  • token/config issues
  • CLI install issues
  • basic Wealthbox API access issues

See CONTRIBUTING.md for the full contributor guide.


Troubleshooting

401 Unauthorized — Check your API token.

Date format errors — Datetime fields expect ISO 8601 format: "YYYY-MM-DDTHH:MM:SS±HH:MM" or "YYYY-MM-DDTHH:MM:SSZ" (e.g. "2026-04-01T10:00:00-07:00"). Date-only fields (birth dates, etc.) use "YYYY-MM-DD".

Add/Update appears to succeed but nothing changed — Some category-constrained writes can silently no-op (return success while leaving fields unchanged). Verify by inspecting the returned JSON — add and update commands print the full object on success. Treat unchanged intended fields as a failed write. Before category-constrained writes, discover valid values first (e.g. wbox contacts categories contact-types).

contacts add examples no longer work if they use Person/Household/Organization/Trust as a positional argument — Use the new type-specific subcommands instead: wbox contacts add person|household|org|trust ....


Disclaimer

This is an unofficial, community-built tool. It is not affiliated with, endorsed by, or supported by Wealthbox or its parent company. "Wealthbox" is a trademark of its respective owner. Use of this tool is subject to the Wealthbox API Terms of Service.

This CLI wraps the Wealthbox API. Behavior depends on API version and your account permissions. Test destructive operations carefully.


License

Apache 2.0 — see LICENSE.

Project details


Download files

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

Source Distribution

wealthbox_cli-1.0.0.tar.gz (37.8 kB view details)

Uploaded Source

Built Distribution

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

wealthbox_cli-1.0.0-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file wealthbox_cli-1.0.0.tar.gz.

File metadata

  • Download URL: wealthbox_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wealthbox_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4996182d9e629e20e94ebc7930b8649a9d491c3d56bd3baa4288ff9e273209c3
MD5 96527ef94c0133566037ba4a14ff2ac7
BLAKE2b-256 8ecdaeb497210749e791ad01af6ed9d06393486a3853e2306fb753d6dda7cfed

See more details on using hashes here.

Provenance

The following attestation bundles were made for wealthbox_cli-1.0.0.tar.gz:

Publisher: ci.yml on massive-value/wealthbox-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 wealthbox_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: wealthbox_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wealthbox_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e72493e2db553ad2b54dd131c5da58b3e452b7ea106493eddbf8c589881ed5a5
MD5 d824b21814d048659d346e806eb6ee98
BLAKE2b-256 b668e6d8ecf7a4a125fde372a58e7b56d38a06e6ec7f9fe1437fed0fd06337c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for wealthbox_cli-1.0.0-py3-none-any.whl:

Publisher: ci.yml on massive-value/wealthbox-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