the-office-cli 1.0.0__tar.gz

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 (45) hide show
  1. the_office_cli-1.0.0/LICENSE +21 -0
  2. the_office_cli-1.0.0/PKG-INFO +405 -0
  3. the_office_cli-1.0.0/README.md +389 -0
  4. the_office_cli-1.0.0/pyproject.toml +26 -0
  5. the_office_cli-1.0.0/setup.cfg +4 -0
  6. the_office_cli-1.0.0/src/the_office_cli/__init__.py +0 -0
  7. the_office_cli-1.0.0/src/the_office_cli/a2a.py +93 -0
  8. the_office_cli-1.0.0/src/the_office_cli/cli/__init__.py +0 -0
  9. the_office_cli-1.0.0/src/the_office_cli/cli/decorators.py +179 -0
  10. the_office_cli-1.0.0/src/the_office_cli/cli/flags.py +54 -0
  11. the_office_cli-1.0.0/src/the_office_cli/cli/main.py +211 -0
  12. the_office_cli-1.0.0/src/the_office_cli/commands/__init__.py +0 -0
  13. the_office_cli-1.0.0/src/the_office_cli/commands/account.py +137 -0
  14. the_office_cli-1.0.0/src/the_office_cli/commands/auth.py +234 -0
  15. the_office_cli-1.0.0/src/the_office_cli/commands/campaign.py +476 -0
  16. the_office_cli-1.0.0/src/the_office_cli/commands/dashboard.py +146 -0
  17. the_office_cli-1.0.0/src/the_office_cli/commands/info.py +67 -0
  18. the_office_cli-1.0.0/src/the_office_cli/commands/lead.py +392 -0
  19. the_office_cli-1.0.0/src/the_office_cli/commands/linkedin.py +1334 -0
  20. the_office_cli-1.0.0/src/the_office_cli/commands/outreach.py +65 -0
  21. the_office_cli-1.0.0/src/the_office_cli/commands/report.py +47 -0
  22. the_office_cli-1.0.0/src/the_office_cli/commands/settings.py +75 -0
  23. the_office_cli-1.0.0/src/the_office_cli/commands/task.py +192 -0
  24. the_office_cli-1.0.0/src/the_office_cli/commands/user.py +315 -0
  25. the_office_cli-1.0.0/src/the_office_cli/config.py +42 -0
  26. the_office_cli-1.0.0/src/the_office_cli/main.py +21 -0
  27. the_office_cli-1.0.0/src/the_office_cli/network/__init__.py +0 -0
  28. the_office_cli-1.0.0/src/the_office_cli/network/errors.py +82 -0
  29. the_office_cli-1.0.0/src/the_office_cli/network/session.py +77 -0
  30. the_office_cli-1.0.0/src/the_office_cli/utils/__init__.py +0 -0
  31. the_office_cli-1.0.0/src/the_office_cli/utils/output.py +38 -0
  32. the_office_cli-1.0.0/src/the_office_cli/utils/registry.py +35 -0
  33. the_office_cli-1.0.0/src/the_office_cli/utils/schema.py +67 -0
  34. the_office_cli-1.0.0/src/the_office_cli.egg-info/PKG-INFO +405 -0
  35. the_office_cli-1.0.0/src/the_office_cli.egg-info/SOURCES.txt +43 -0
  36. the_office_cli-1.0.0/src/the_office_cli.egg-info/dependency_links.txt +1 -0
  37. the_office_cli-1.0.0/src/the_office_cli.egg-info/entry_points.txt +2 -0
  38. the_office_cli-1.0.0/src/the_office_cli.egg-info/requires.txt +2 -0
  39. the_office_cli-1.0.0/src/the_office_cli.egg-info/top_level.txt +1 -0
  40. the_office_cli-1.0.0/tests/test_commands.py +141 -0
  41. the_office_cli-1.0.0/tests/test_decorators.py +161 -0
  42. the_office_cli-1.0.0/tests/test_errors.py +118 -0
  43. the_office_cli-1.0.0/tests/test_output.py +65 -0
  44. the_office_cli-1.0.0/tests/test_schema.py +128 -0
  45. the_office_cli-1.0.0/tests/test_session.py +64 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The Office
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,405 @@
1
+ Metadata-Version: 2.4
2
+ Name: the-office-cli
3
+ Version: 1.0.0
4
+ Summary: World's Best Sales CLI
5
+ Author-email: The Office <hello@the-office.ai>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://www.the-office.ai
8
+ Project-URL: Repository, https://github.com/FestimTheA/the-office-cli
9
+ Project-URL: Issues, https://github.com/FestimTheA/the-office-cli/issues
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: click>=8.0
14
+ Requires-Dist: httpx>=0.27
15
+ Dynamic: license-file
16
+
17
+ # World's Best Sales CLI
18
+
19
+ ```
20
+
21
+ ████████╗██╗ ██╗███████╗ ██████╗ ███████╗███████╗██╗ ██████╗███████╗
22
+ ╚══██╔══╝██║ ██║██╔════╝ ██╔═══██╗██╔════╝██╔════╝██║██╔════╝██╔════╝
23
+ ██║ ███████║█████╗ ██║ ██║█████╗ █████╗ ██║██║ █████╗
24
+ ██║ ██╔══██║██╔══╝ ██║ ██║██╔══╝ ██╔══╝ ██║██║ ██╔══╝
25
+ ██║ ██║ ██║███████╗ ╚██████╔╝██║ ██║ ██║╚██████╗███████╗
26
+ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
27
+
28
+ ██████╗██╗ ██╗
29
+ ██╔════╝██║ ██║
30
+ ██║ ██║ ██║
31
+ ██║ ██║ ██║
32
+ ╚██████╗███████╗██║
33
+ ╚═════╝╚══════╝╚═╝
34
+
35
+ ```
36
+
37
+ *[paces at the front of the conference room]*
38
+
39
+ Listen up. I got us a new tool. It's called The Office CLI.
40
+
41
+ 60 sales commands. You can combine them however you want. You can create any sales play.
42
+
43
+ Runs in your terminal, Claude Code, Claude Cowork, or Codex. Connects to LinkedIn and HubSpot.
44
+
45
+ The point is: this is how we beat Staples.
46
+
47
+ *[looks directly at camera]*
48
+
49
+ Alright — let me show you how to get it.
50
+
51
+ ## Install
52
+
53
+ **For users:**
54
+
55
+ ```bash
56
+ pip install the-office-cli
57
+ ```
58
+
59
+ **For contributors** (develop on the latest source):
60
+
61
+ ```bash
62
+ git clone https://github.com/your-org/the-office-cli.git && cd the-office-cli
63
+ python3 -m venv venv && source venv/bin/activate
64
+ pip install -e .
65
+ ```
66
+
67
+ ## Use it where you work
68
+
69
+ **Claude Code** — run Claude Code, then:
70
+
71
+ ```
72
+ pip install the-office-cli
73
+ ```
74
+
75
+ **Codex** — run Codex, then:
76
+
77
+ ```
78
+ pip install the-office-cli
79
+ ```
80
+
81
+ **Claude Cowork**
82
+
83
+ ```
84
+ Claude Cowork → Settings → Connectors → Add custom connector → The Office
85
+ ```
86
+
87
+ ## Quick start
88
+
89
+ This is some examples how you can use it:
90
+
91
+ ### Understand
92
+
93
+ ```bash
94
+ the-office tour # menu of every command + description
95
+ the-office <command> --schema # full JSON contract + example
96
+ the-office <command> --dry-run # preview
97
+ ```
98
+
99
+ ### Create an account
100
+
101
+ ```bash
102
+ the-office create-account \
103
+ --company-name "Dunder Mifflin" \
104
+ --website dundermifflin.com \
105
+ --email michael@dundermifflin.com \
106
+ --password thatsWhatSheSaid2026
107
+ ```
108
+
109
+ ### Log in
110
+
111
+ ```bash
112
+ the-office login \
113
+ --email michael@dundermifflin.com \
114
+ --password thatsWhatSheSaid2026
115
+ ```
116
+
117
+ ### Connect LinkedIn
118
+
119
+ ```bash
120
+ the-office linkedin connect account
121
+ ```
122
+
123
+ ### Search for accounts
124
+
125
+ ```bash
126
+ echo '{
127
+ "keywords": "print shop",
128
+ "industry": "Printing Services",
129
+ "headcount": "51-200",
130
+ "location": "Scranton, PA",
131
+ "limit": 25
132
+ }' | the-office linkedin search classic accounts
133
+ ```
134
+
135
+ ### Search for leads
136
+
137
+ ```bash
138
+ echo '{
139
+ "job_position": ["Founder", "Co-Founder", "CEO", "CSO", "VP of Sales", "Director of Sales"],
140
+ "current_company": ["Lackawanna Printing", "Electric City Press", "Scranton Print Works", "Keystone Graphics", "Pocono Press", "NEPA Printing Co", "Steamtown Print Shop", "Valley Print & Copy", "Wyoming Avenue Printers", "Dickson City Press"],
141
+ "location": "Scranton, PA",
142
+ "limit": 175
143
+ }' | the-office linkedin search classic leads
144
+ ```
145
+
146
+ ### Create campaign
147
+
148
+ ```bash
149
+ echo '{
150
+ "name": "Lackawanna County Blitz",
151
+ "note": "Hi {first_name}, Michael Scott from Dunder Mifflin — same-day paper delivery with a dedicated rep. Open to exploring?",
152
+ "follow_up_note": "{first_name}, our clients save 15-20% vs big box suppliers.",
153
+ "follow_up_delay": 3,
154
+ "daily_outreach_limit": 25,
155
+ "filters": {
156
+ "job_position": ["Founder", "Co-Founder", "CEO", "CSO", "VP of Sales", "Director of Sales"],
157
+ "current_company": ["Lackawanna Printing", "Electric City Press", "Scranton Print Works", "Keystone Graphics", "Pocono Press", "NEPA Printing Co", "Steamtown Print Shop", "Valley Print & Copy", "Wyoming Avenue Printers", "Dickson City Press"],
158
+ "location": "Scranton, PA"
159
+ },
160
+ "total_leads_to_source": 175
161
+ }' | the-office campaign create custom
162
+ ```
163
+
164
+ ### Send invite
165
+
166
+ ```bash
167
+ the-office linkedin send invitation \
168
+ --provider-id ACoAABxyz123 \
169
+ --message "Hi Jan, Michael Scott from Dunder Mifflin — same-day paper delivery with a dedicated rep. Open to exploring?"
170
+ ```
171
+
172
+ ## Combine commands
173
+
174
+ Combine any command with any other. JSON in, JSON out. Ask an agent. Build the sales plays no other sales tool could.
175
+
176
+ ### Find a job posting for an Office Manager and send an invite
177
+
178
+ ```bash
179
+ echo '{"keywords": "office manager scranton"}' \
180
+ | the-office linkedin search classic jobs \
181
+ | jq -r '.items[0].poster.provider_id' \
182
+ | xargs -I {} the-office linkedin send invitation \
183
+ --provider-id {} \
184
+ --message "Saw you'"'"'re hiring an Office Manager — Dunder Mifflin handles the paper, same-day delivery. Happy to get you set up before day one."
185
+ ```
186
+
187
+ ### Find someone asking about paper suppliers and send an invite
188
+
189
+ ```bash
190
+ echo '{"keywords": "best paper supplier scranton"}' \
191
+ | the-office linkedin search classic posts \
192
+ | jq -r '.items[0].author.provider_id' \
193
+ | xargs -I {} the-office linkedin send invitation \
194
+ --provider-id {} \
195
+ --message "Saw your post asking about paper suppliers — Dunder Mifflin delivers same-day in Lackawanna County. Happy to chat."
196
+ ```
197
+
198
+ ### Find top 5 campaigns by booked meeting rate
199
+
200
+ ```bash
201
+ for id in $(the-office campaign list | jq -r '.items[].id'); do
202
+ the-office dashboard conversations --campaign $id \
203
+ | jq --arg id "$id" '
204
+ ([.links[] | select(.target == "Outreached") | .value] | add // 0) as $out |
205
+ ([.links[] | select(.target == "Booked Meeting") | .value] | add // 0) as $booked |
206
+ {campaign_id: $id, outreached: $out, booked: $booked,
207
+ rate: (if $out > 0 then ($booked / $out * 100 | floor) else 0 end)}'
208
+ done | jq -s 'sort_by(-.rate) | .[0:5]'
209
+ ```
210
+
211
+ ### Find top 5 job positions by booked meeting rate
212
+
213
+ ```bash
214
+ # Pull lead IDs that reached "Booked Meeting" in the conversations Sankey
215
+ BOOKED=$(the-office dashboard conversations \
216
+ | jq -c '[.links[] | select(.source == "Booked Meeting") | .target | tonumber]')
217
+
218
+ # Group leads by position, count bookings, compute rate
219
+ the-office lead list \
220
+ | jq --argjson booked "$BOOKED" '.items
221
+ | group_by(.position)
222
+ | map({
223
+ position: .[0].position,
224
+ total: length,
225
+ booked: ([.[] | select(.id as $id | $booked | any(. == $id))] | length),
226
+ rate: (([.[] | select(.id as $id | $booked | any(. == $id))] | length) / length * 100 | floor)
227
+ })
228
+ | sort_by(-.rate)
229
+ | .[0:5]'
230
+ ```
231
+
232
+ ## Commands
233
+
234
+ 60 commands across 12 groups:
235
+
236
+ ### `info` — 1 command
237
+
238
+ - `tour`
239
+
240
+ ### `auth` — 5 commands
241
+
242
+ - `login`
243
+ - `logout`
244
+ - `whoami`
245
+ - `create-account`
246
+ - `fire-drill`
247
+
248
+ ### `campaign` — 8 commands
249
+
250
+ - `list`
251
+ - `get`
252
+ - `update`
253
+ - `delete`
254
+ - `status`
255
+ - `create custom`
256
+ - `create ai`
257
+ - `create signals`
258
+
259
+ ### `lead` — 6 commands
260
+
261
+ - `list`
262
+ - `get`
263
+ - `create`
264
+ - `update`
265
+ - `delete`
266
+ - `import`
267
+
268
+ ### `linkedin` — 20 commands
269
+
270
+ - `me`
271
+ - `connect account`
272
+ - `reconnect account`
273
+ - `check account`
274
+ - `retrieve profile`
275
+ - `retrieve company`
276
+ - `send invitation`
277
+ - `send message`
278
+ - `start chat`
279
+ - `list relations`
280
+ - `list chats`
281
+ - `list messages`
282
+ - `list user messages`
283
+ - `search parameters`
284
+ - `search classic leads`
285
+ - `search classic accounts`
286
+ - `search classic posts`
287
+ - `search classic jobs`
288
+ - `search sales navigator leads`
289
+ - `search sales navigator accounts`
290
+
291
+ ### `account` — 3 commands
292
+
293
+ - `list`
294
+ - `get`
295
+ - `delete`
296
+
297
+ ### `dashboard` — 2 commands
298
+
299
+ - `funnel`
300
+ - `conversations`
301
+
302
+ ### `report` — 1 command
303
+
304
+ - `generate`
305
+
306
+ ### `outreach` — 1 command
307
+
308
+ - `list`
309
+
310
+ ### `user` — 5 commands
311
+
312
+ - `list`
313
+ - `get`
314
+ - `create`
315
+ - `update`
316
+ - `delete`
317
+
318
+ ### `settings` — 2 commands
319
+
320
+ - `get`
321
+ - `update`
322
+
323
+ ### `task` — 6 commands
324
+
325
+ - `find leads`
326
+ - `send invites`
327
+ - `followup`
328
+ - `sync accepted`
329
+ - `sync conversations`
330
+ - `status`
331
+
332
+ ## Layout
333
+
334
+ ```
335
+ the-office-cli/
336
+ ├── pyproject.toml
337
+ ├── README.md
338
+ ├── CLAUDE.md
339
+ ├── src/the_office_cli/
340
+ │ ├── main.py
341
+ │ ├── config.py
342
+ │ ├── cli/
343
+ │ │ ├── main.py
344
+ │ │ ├── decorators.py
345
+ │ │ └── flags.py
346
+ │ ├── commands/
347
+ │ │ ├── auth.py
348
+ │ │ ├── campaign.py
349
+ │ │ ├── lead.py
350
+ │ │ ├── linkedin.py
351
+ │ │ ├── account.py
352
+ │ │ ├── dashboard.py
353
+ │ │ ├── report.py
354
+ │ │ ├── outreach.py
355
+ │ │ ├── user.py
356
+ │ │ ├── settings.py
357
+ │ │ ├── task.py
358
+ │ │ └── info.py
359
+ │ ├── network/
360
+ │ │ ├── session.py
361
+ │ │ └── errors.py
362
+ │ └── utils/
363
+ │ ├── output.py
364
+ │ ├── schema.py
365
+ │ └── registry.py
366
+ └── tests/
367
+ ```
368
+
369
+ ## Tech stack
370
+
371
+ - **Status:** stable (v1.0.0)
372
+ - **Language:** Python 3.11+
373
+ - **CLI:** Click 8+
374
+ - **HTTP:** httpx 0.27+
375
+ - **Auth:** JWT in `~/.the-office/session.json`
376
+ - **Config:** `~/.the-office/config.json`
377
+ - **Build:** setuptools, entry `the-office`
378
+ - **Tests:** pytest
379
+
380
+ ## Contributing
381
+
382
+ PRs welcome. Here's the dev flow:
383
+
384
+ ```bash
385
+ git clone https://github.com/your-org/the-office-cli.git && cd the-office-cli
386
+ python3 -m venv venv && source venv/bin/activate
387
+ pip install -e .
388
+ pytest
389
+ ```
390
+
391
+ ## License
392
+
393
+ ### MIT
394
+
395
+ [LICENSE](LICENSE)
396
+
397
+ ## Contact
398
+
399
+ ### Email:
400
+
401
+ [hello@the-office.ai](mailto:hello@the-office.ai)
402
+
403
+ ### Website:
404
+
405
+ [the-office.ai](https://www.the-office.ai)