wealthbox-cli 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. wealthbox_cli-1.0.0.dist-info/METADATA +230 -0
  2. wealthbox_cli-1.0.0.dist-info/RECORD +54 -0
  3. wealthbox_cli-1.0.0.dist-info/WHEEL +4 -0
  4. wealthbox_cli-1.0.0.dist-info/entry_points.txt +3 -0
  5. wealthbox_cli-1.0.0.dist-info/licenses/LICENSE +201 -0
  6. wealthbox_tools/__init__.py +51 -0
  7. wealthbox_tools/cli/__init__.py +3 -0
  8. wealthbox_tools/cli/_config.py +43 -0
  9. wealthbox_tools/cli/_util.py +315 -0
  10. wealthbox_tools/cli/activity.py +42 -0
  11. wealthbox_tools/cli/categories.py +41 -0
  12. wealthbox_tools/cli/comments.py +51 -0
  13. wealthbox_tools/cli/config.py +47 -0
  14. wealthbox_tools/cli/contacts.py +412 -0
  15. wealthbox_tools/cli/events.py +168 -0
  16. wealthbox_tools/cli/households.py +41 -0
  17. wealthbox_tools/cli/main.py +55 -0
  18. wealthbox_tools/cli/me.py +25 -0
  19. wealthbox_tools/cli/notes.py +97 -0
  20. wealthbox_tools/cli/opportunities.py +198 -0
  21. wealthbox_tools/cli/projects.py +102 -0
  22. wealthbox_tools/cli/tasks.py +180 -0
  23. wealthbox_tools/cli/users.py +24 -0
  24. wealthbox_tools/cli/workflows.py +172 -0
  25. wealthbox_tools/client/__init__.py +45 -0
  26. wealthbox_tools/client/activity.py +13 -0
  27. wealthbox_tools/client/base.py +216 -0
  28. wealthbox_tools/client/categories.py +14 -0
  29. wealthbox_tools/client/comments.py +14 -0
  30. wealthbox_tools/client/contacts.py +44 -0
  31. wealthbox_tools/client/events.py +31 -0
  32. wealthbox_tools/client/households.py +30 -0
  33. wealthbox_tools/client/me.py +11 -0
  34. wealthbox_tools/client/notes.py +28 -0
  35. wealthbox_tools/client/opportunities.py +31 -0
  36. wealthbox_tools/client/projects.py +28 -0
  37. wealthbox_tools/client/tasks.py +31 -0
  38. wealthbox_tools/client/users.py +14 -0
  39. wealthbox_tools/client/workflows.py +44 -0
  40. wealthbox_tools/models/__init__.py +134 -0
  41. wealthbox_tools/models/activity.py +13 -0
  42. wealthbox_tools/models/comments.py +13 -0
  43. wealthbox_tools/models/common.py +123 -0
  44. wealthbox_tools/models/contacts.py +131 -0
  45. wealthbox_tools/models/custom_fields.py +19 -0
  46. wealthbox_tools/models/enums.py +209 -0
  47. wealthbox_tools/models/events.py +63 -0
  48. wealthbox_tools/models/households.py +17 -0
  49. wealthbox_tools/models/notes.py +28 -0
  50. wealthbox_tools/models/opportunities.py +48 -0
  51. wealthbox_tools/models/projects.py +27 -0
  52. wealthbox_tools/models/tasks.py +76 -0
  53. wealthbox_tools/models/workflows.py +50 -0
  54. wealthbox_tools/py.typed +0 -0
@@ -0,0 +1,230 @@
1
+ Metadata-Version: 2.4
2
+ Name: wealthbox-cli
3
+ Version: 1.0.0
4
+ Summary: CLI and client library for the Wealthbox CRM API
5
+ Project-URL: Homepage, https://github.com/massive-value/wealthbox-cli
6
+ Project-URL: Issues, https://github.com/massive-value/wealthbox-cli/issues
7
+ Project-URL: Repository, https://github.com/massive-value/wealthbox-cli
8
+ Author: Kadin Bullock
9
+ License: Apache-2.0
10
+ License-File: LICENSE
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Requires-Python: >=3.11
19
+ Requires-Dist: httpx<1.0,>=0.27
20
+ Requires-Dist: pydantic<3.0,>=2.0
21
+ Requires-Dist: python-dotenv<2.0,>=1.0
22
+ Requires-Dist: tabulate<1.0,>=0.9
23
+ Requires-Dist: typer<1.0,>=0.12
24
+ Provides-Extra: dev
25
+ Requires-Dist: mypy>=1.10; extra == 'dev'
26
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
27
+ Requires-Dist: pytest>=8.0; extra == 'dev'
28
+ Requires-Dist: respx>=0.21; extra == 'dev'
29
+ Requires-Dist: ruff>=0.4; extra == 'dev'
30
+ Description-Content-Type: text/markdown
31
+
32
+ # Wealthbox CLI
33
+
34
+ [![PyPI version](https://img.shields.io/pypi/v/wealthbox-cli)](https://pypi.org/project/wealthbox-cli/)
35
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)
36
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
37
+
38
+ A command-line interface for interacting with the Wealthbox CRM API.
39
+
40
+ This tool provides structured access to contacts, households, tasks,
41
+ events, notes, users, categories, and more — directly from your
42
+ terminal.
43
+
44
+ Official API documentation: https://dev.wealthbox.com
45
+
46
+ > **Disclaimer:** This is an unofficial, community-built tool. It is not affiliated with,
47
+ > endorsed by, or supported by Wealthbox or its parent company. "Wealthbox" is a trademark
48
+ > of its respective owner.
49
+
50
+ ------------------------------------------------------------------------
51
+
52
+ ## Features
53
+
54
+ - Full CRUD support for:
55
+ - Contacts (Person, Household, Organization, Trust)
56
+ - Households (member management)
57
+ - Tasks
58
+ - Events
59
+ - Notes (create, read, update — delete not supported by API)
60
+ - Structured flag-based `add` and `update` commands — no raw JSON required
61
+ - Type-specific contact creation subcommands: `contacts add person|household|org|trust`
62
+ - `--more-fields` escape hatch on contacts/tasks/projects/opportunities/workflows for uncommon JSON fields
63
+ - Multiple output formats via `--format`: `json` (default), `table`, `csv`, `tsv`
64
+ - Nested API fields (linked_to, email_addresses, tags, etc.) automatically flattened for tabular output
65
+ - Category and metadata lookups (resource-scoped and workspace-level)
66
+ - Client-side filters for fields the API doesn't support server-side (e.g. `--assigned-to` on contacts)
67
+ - Modular CLI structure with extensible client + model architecture
68
+
69
+ ------------------------------------------------------------------------
70
+
71
+ ## Installation
72
+
73
+ ### From PyPI (recommended)
74
+
75
+ ``` bash
76
+ pip install wealthbox-cli
77
+ ```
78
+
79
+ ### From source (development)
80
+
81
+ ``` bash
82
+ git clone https://github.com/massive-value/wealthbox-cli
83
+ cd wealthbox-cli
84
+ python -m venv .venv
85
+ source .venv/bin/activate # macOS/Linux
86
+ # OR
87
+ .venv\Scripts\activate # Windows
88
+ pip install -e ".[dev]"
89
+ ```
90
+
91
+ ------------------------------------------------------------------------
92
+
93
+ ## Configuration
94
+
95
+ Copy `.env.example` to `.env` and fill in your token:
96
+
97
+ ```
98
+ WEALTHBOX_TOKEN=your_api_token_here
99
+ ```
100
+
101
+ Or set it as an environment variable:
102
+
103
+ **macOS/Linux**
104
+
105
+ ``` bash
106
+ export WEALTHBOX_TOKEN="your_api_token_here"
107
+ ```
108
+
109
+ **Windows (PowerShell)**
110
+
111
+ ``` powershell
112
+ setx WEALTHBOX_TOKEN "your_api_token_here"
113
+ ```
114
+
115
+ ------------------------------------------------------------------------
116
+
117
+ ## Usage
118
+
119
+ ``` bash
120
+ wbox <resource> <command> [options]
121
+ wb <resource> <command> [options]
122
+ ```
123
+
124
+ For the full command reference see [docs/cli-reference.md](docs/cli-reference.md).
125
+
126
+ ### Local wrapper
127
+
128
+ For this workspace, the easiest entrypoint is:
129
+
130
+ ```bash
131
+ ./run-wbox.sh me --format json
132
+ ./run-wbox.sh users list --format json
133
+ ./run-wbox.sh contacts list --per-page 1 --format json
134
+ ./run-wbox.sh contacts add person --first-name Jane --last-name Doe --format json
135
+ ```
136
+
137
+ The wrapper:
138
+ - loads `.env`
139
+ - uses the repo-local `.venv`
140
+ - runs the installed `wbox` CLI
141
+
142
+ ------------------------------------------------------------------------
143
+
144
+ ## Project Structure
145
+
146
+ src/
147
+ wealthbox_tools/
148
+ cli/ # Typer commands — user-facing, delegates to client
149
+ client/ # Async HTTP client built from mixins
150
+ models/ # Pydantic v2 models for input validation
151
+ tests/ # pytest integration tests (respx mocks)
152
+
153
+ **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`.
154
+
155
+ **Rate limiting:** Sliding-window (300 req / 5-min window); state persists across processes via `~/.wbox_rate_limit.json`. 429 responses trigger automatic retry.
156
+
157
+ ------------------------------------------------------------------------
158
+
159
+ ## Development
160
+
161
+ ``` bash
162
+ # Install with dev dependencies
163
+ pip install -e ".[dev]"
164
+
165
+ # Run tests
166
+ pytest
167
+
168
+ # Run a single test
169
+ pytest tests/path/to/test_file.py::test_name
170
+ ```
171
+
172
+ ### Recommended local workflow
173
+
174
+ ```bash
175
+ cd ~/.openclaw/workspace/integrations/wealthbox-cli
176
+
177
+ # Sync latest code
178
+ git pull
179
+
180
+ # Refresh editable install
181
+ .venv/bin/pip install -e .
182
+
183
+ # Run the read-only smoke test
184
+ ./smoke_test.sh
185
+ ```
186
+
187
+ Smoke test coverage:
188
+ - `wbox me`
189
+ - `wbox users list`
190
+ - `wbox contacts list --per-page 1`
191
+
192
+ This is intentionally read-only and meant to catch:
193
+ - token/config issues
194
+ - CLI install issues
195
+ - basic Wealthbox API access issues
196
+
197
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor guide.
198
+
199
+ ------------------------------------------------------------------------
200
+
201
+ ## Troubleshooting
202
+
203
+ **401 Unauthorized** — Check your API token.
204
+
205
+ **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"`.
206
+
207
+ **Add/Update appears to succeed but nothing changed** —
208
+ Some category-constrained writes can silently no-op (return success while leaving fields unchanged).
209
+ Verify by inspecting the returned JSON — `add` and `update` commands print the full object on success. Treat unchanged intended fields as a failed write.
210
+ Before category-constrained writes, discover valid values first (e.g. `wbox contacts categories contact-types`).
211
+
212
+ **`contacts add` examples no longer work if they use `Person`/`Household`/`Organization`/`Trust` as a positional argument** —
213
+ Use the new type-specific subcommands instead: `wbox contacts add person|household|org|trust ...`.
214
+
215
+ ------------------------------------------------------------------------
216
+
217
+ ## Disclaimer
218
+
219
+ This is an **unofficial, community-built** tool. It is not affiliated with, endorsed by,
220
+ or supported by Wealthbox or its parent company. "Wealthbox" is a trademark of its
221
+ respective owner. Use of this tool is subject to the [Wealthbox API Terms of Service](https://dev.wealthbox.com).
222
+
223
+ This CLI wraps the Wealthbox API. Behavior depends on API version and your account
224
+ permissions. Test destructive operations carefully.
225
+
226
+ ------------------------------------------------------------------------
227
+
228
+ ## License
229
+
230
+ Apache 2.0 — see [LICENSE](LICENSE).
@@ -0,0 +1,54 @@
1
+ wealthbox_tools/__init__.py,sha256=mePkKlh5iPPjfaDDLzDbLjinjylt1U_2bmDnR0-0JaM,1072
2
+ wealthbox_tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ wealthbox_tools/cli/__init__.py,sha256=lCKGNNZ1cVdQmUVP17PUD_DIN0B6Cnr0T_BRi1t5ovI,41
4
+ wealthbox_tools/cli/_config.py,sha256=Jrd3DYQQ_nPRuRSqOfzh3kpMEKjCoD68y8PkozoFHrI,1200
5
+ wealthbox_tools/cli/_util.py,sha256=CfTR1LzOtjd7wwZ0B-8915Vya2NTlP_oXvc3IvHgpXk,11843
6
+ wealthbox_tools/cli/activity.py,sha256=KIwXuQCmjvPujB6ISN98SN3iNFeSidEuatqJEoO2CTo,1596
7
+ wealthbox_tools/cli/categories.py,sha256=Y3Tw4ikrNF8n87eIoXvjYhg3tt3essZ3_HrNhlM-7Q8,1943
8
+ wealthbox_tools/cli/comments.py,sha256=lcX1xY0s1NDk9WEnCw2Kb5umgmcuzya4oOj74gqtR_M,2082
9
+ wealthbox_tools/cli/config.py,sha256=po-Toz0ZVi7y-ALLdpR8z6xQj_n5rxy60bpaSTZsTms,1336
10
+ wealthbox_tools/cli/contacts.py,sha256=3zMvnsCY2WXyddstLz8JOlZTvLGXs7_m0TBmNHkeUiI,18954
11
+ wealthbox_tools/cli/events.py,sha256=QvCKmbBZdsM8UQsKZTt8BpIqzbFf8rgPqsqh43RKGYc,7205
12
+ wealthbox_tools/cli/households.py,sha256=AbdvU-b-t1IvH1rwGmBbl-thXIaZmZWVNIBwgJzSeVY,1621
13
+ wealthbox_tools/cli/main.py,sha256=ShZPA-dAPdFiEvQsh4zKELBwYYlwR9WavnJi5LBVrUM,1852
14
+ wealthbox_tools/cli/me.py,sha256=3jKq_A5yh27fKRmZiW6DO9UM5lP7EJMBWnqlaAcT1aE,756
15
+ wealthbox_tools/cli/notes.py,sha256=Q0RI6cgbLa9EFJrpGgSpLxdw2OJ0km_870tkKzjHRI0,4367
16
+ wealthbox_tools/cli/opportunities.py,sha256=fjBKOyfS62xIn0H6-TE7-lg6vElFtWBKWo3HZDe9oYU,8720
17
+ wealthbox_tools/cli/projects.py,sha256=emcEaanNzL4Wu5tOZu7RQwj7BkSZh7ZeiRj8Na90BqU,4215
18
+ wealthbox_tools/cli/tasks.py,sha256=YFugpUZI3tLCL_rc6zk5BuXFgWkPu91vNf3ixL4yveI,7845
19
+ wealthbox_tools/cli/users.py,sha256=C3bpGTlFhqN1GhTtrWfkG_nzU5RpiC-Dv1QYHyM6eNc,748
20
+ wealthbox_tools/cli/workflows.py,sha256=mR22N-bcCwbTfdsfJwyOnch8tlBbLFfMhaoomNSQc5o,7404
21
+ wealthbox_tools/client/__init__.py,sha256=s-t9mn6fQgEdIOCFivjLbJJQXUOM8N4eIVMpG4CCLMk,1083
22
+ wealthbox_tools/client/activity.py,sha256=3Y5DfcII1yd5xKAhVQIg4g_-xikwE_FbM-eHogyjEDM,455
23
+ wealthbox_tools/client/base.py,sha256=ZUcHt3syZzPtXoip-5dQQ77r4nBY9B9xHPh4BwpIgFk,7383
24
+ wealthbox_tools/client/categories.py,sha256=_0kTe3JY9oiOH57q_WIeGU9tGNnNdHBTpVvHBvk2Ji0,515
25
+ wealthbox_tools/client/comments.py,sha256=LVHL3B2ua5noMXHUW_RiHbQhqt6mUpKiqoJlDD453FY,455
26
+ wealthbox_tools/client/contacts.py,sha256=VGjQvHtUNxyJL0lO-4YKP282AXT3_iVXp2j_7ruTC60,2097
27
+ wealthbox_tools/client/events.py,sha256=fgDjDFqeRP6Od61QrIV0LMwOJhc3jOko8-woeisSzRE,1388
28
+ wealthbox_tools/client/households.py,sha256=RZsP5abIZl1XNeyiAzjlFcjYa5pmbU6P_9s0sOqozfc,1034
29
+ wealthbox_tools/client/me.py,sha256=GBwGQx7EqKEtHlkR_giia6FZxBQgU_blv-cqIR3qTGI,250
30
+ wealthbox_tools/client/notes.py,sha256=AW46uCJKZZGEKtsb3NnU80TFRPTODnww5ec_OM9L4Ys,1260
31
+ wealthbox_tools/client/opportunities.py,sha256=7lsm4HQnzNWVEWc0ArCBA1xH-SeAApaNaJPRLUx9FfM,1504
32
+ wealthbox_tools/client/projects.py,sha256=6U26ikEZsifvJPwZD5mSFkP3DFW7UxoulIWAbLI4Dsg,1243
33
+ wealthbox_tools/client/tasks.py,sha256=cPiJjsZJNeFZ7oJr_WaCEV9VcKfNn1kwf-V2lDOySxI,1364
34
+ wealthbox_tools/client/users.py,sha256=A1X8JI8lml1SEBXx8JEw70Em-ZYO0fV6RHT0qNv6Q0w,451
35
+ wealthbox_tools/client/workflows.py,sha256=d5VjTPDf0k9DJAtesd2hABLkKkMEW2uHQJA-tc-Y7Rk,1954
36
+ wealthbox_tools/models/__init__.py,sha256=LlXg-werXhMgN512Gxe6dEQGmjwHGlQHa5947RApXPw,3053
37
+ wealthbox_tools/models/activity.py,sha256=hiQBAPTzqbSv_7DF8Jv4Qv6bdjJ4BOfdqxe4S0eanKw,345
38
+ wealthbox_tools/models/comments.py,sha256=wMWfJVjsYJfsnMMUHGYWIzN0b5k6G8PVXMybyP9Wdfc,386
39
+ wealthbox_tools/models/common.py,sha256=2ckCSFXlVMjiMDYPr1nVvqa6T4LyV-8F6ldqPKR_Z2Q,4369
40
+ wealthbox_tools/models/contacts.py,sha256=sFjPBqvFpFGdbwVjOjy9oN8fLxEjet6-NuWF7XqoMOo,4063
41
+ wealthbox_tools/models/custom_fields.py,sha256=tZ6cOTIK8uks4NmpQPiVKJKW2XlMZamSdDG7F0X2uH8,460
42
+ wealthbox_tools/models/enums.py,sha256=4wmiSJAa55VxLG-oqbJShOkQijT-CAF20a7j_azR_Yo,4216
43
+ wealthbox_tools/models/events.py,sha256=LhV63RhwacHN9dEBOEbIFjEvr9-aQyVqzVoTdVEl-jc,1946
44
+ wealthbox_tools/models/households.py,sha256=AQZb7rwWUuqhr62F-8lEWKBs6MJLB9P_jJycqs8iMWs,550
45
+ wealthbox_tools/models/notes.py,sha256=St4eeNNrG5G7zHXSTvzyNOjnQlGg8upWFhuI9Q_tc8M,902
46
+ wealthbox_tools/models/opportunities.py,sha256=-u4JA5UkPKB9cq1cCuP9C75ERD2jOeOHYbNbMH4Jtq4,1689
47
+ wealthbox_tools/models/projects.py,sha256=hWqqF8fQYN8-fZh51yq9OsMKuTGjo2T_kM5rWnsOGuo,803
48
+ wealthbox_tools/models/tasks.py,sha256=_xqrkebZ54ae6ITo4VVp2DUGSodqsQH3o2ga3x7Qd4w,2977
49
+ wealthbox_tools/models/workflows.py,sha256=2rl2LaeoMAhXn6S6ZQnFuSUijZaCbmk6iv3fPc0m_NQ,1641
50
+ wealthbox_cli-1.0.0.dist-info/METADATA,sha256=jYlAp_5agFRpO_6acP17VbEcnAuN1gbufDQY8yCOhlk,7709
51
+ wealthbox_cli-1.0.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
52
+ wealthbox_cli-1.0.0.dist-info/entry_points.txt,sha256=a0Q13jIoPlzjH63Nah2nAhoT4psmPG07TI1ZK2drFTM,88
53
+ wealthbox_cli-1.0.0.dist-info/licenses/LICENSE,sha256=orEIbxcPwtdphta4W_sR0QeLDaYdwBzN6qDQs-hFLa8,11343
54
+ wealthbox_cli-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ wb = wealthbox_tools.cli.main:app
3
+ wbox = wealthbox_tools.cli.main:app
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Kadin Bullock
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,51 @@
1
+ """Wealthbox CRM tools — async HTTP client, Pydantic validation models, and CLI."""
2
+
3
+ from wealthbox_tools.client import WealthboxAPIError, WealthboxClient
4
+ from wealthbox_tools.models import (
5
+ ActivityListQuery,
6
+ CategoryListQuery,
7
+ ContactCreateInput,
8
+ ContactListQuery,
9
+ ContactUpdateInput,
10
+ EventCreateInput,
11
+ EventListQuery,
12
+ EventUpdateInput,
13
+ # Enums
14
+ Gender,
15
+ HouseholdMemberInput,
16
+ MaritalStatus,
17
+ NoteCreateInput,
18
+ NoteListQuery,
19
+ NoteUpdateInput,
20
+ RecordType,
21
+ TaskCreateInput,
22
+ TaskListQuery,
23
+ TaskUpdateInput,
24
+ )
25
+
26
+ __all__ = [
27
+
28
+ # Enums
29
+ "Gender",
30
+ "MaritalStatus",
31
+ "RecordType",
32
+
33
+
34
+ "WealthboxClient",
35
+ "WealthboxAPIError",
36
+ "ActivityListQuery",
37
+ "ContactCreateInput",
38
+ "ContactListQuery",
39
+ "ContactUpdateInput",
40
+ "CategoryListQuery",
41
+ "EventCreateInput",
42
+ "EventListQuery",
43
+ "EventUpdateInput",
44
+ "HouseholdMemberInput",
45
+ "NoteCreateInput",
46
+ "NoteListQuery",
47
+ "NoteUpdateInput",
48
+ "TaskCreateInput",
49
+ "TaskListQuery",
50
+ "TaskUpdateInput",
51
+ ]
@@ -0,0 +1,3 @@
1
+ from .main import app
2
+
3
+ __all__ = ["app"]
@@ -0,0 +1,43 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ import os
5
+ import pathlib
6
+ import platform
7
+ from typing import Any
8
+
9
+
10
+ def _config_dir() -> pathlib.Path:
11
+ """Return the platform-appropriate config directory for wbox."""
12
+ if platform.system() == "Windows":
13
+ base = pathlib.Path(os.environ.get("APPDATA", "~"))
14
+ else:
15
+ base = pathlib.Path(os.environ.get("XDG_CONFIG_HOME", "~/.config"))
16
+ return base.expanduser() / "wbox"
17
+
18
+
19
+ def _config_path() -> pathlib.Path:
20
+ return _config_dir() / "config.json"
21
+
22
+
23
+ def load_config() -> dict[str, Any]:
24
+ """Load config from disk. Returns empty dict if file doesn't exist."""
25
+ path = _config_path()
26
+ if not path.exists():
27
+ return {}
28
+ try:
29
+ return json.loads(path.read_text())
30
+ except (json.JSONDecodeError, OSError):
31
+ return {}
32
+
33
+
34
+ def save_config(config: dict[str, Any]) -> None:
35
+ """Save config to disk. Creates directory if needed."""
36
+ path = _config_path()
37
+ path.parent.mkdir(parents=True, exist_ok=True)
38
+ path.write_text(json.dumps(config, indent=2) + "\n")
39
+
40
+
41
+ def get_stored_token() -> str | None:
42
+ """Get token from config file, or None if not set."""
43
+ return load_config().get("token")