agent-tool-close-crm-cli 0.1.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 (31) hide show
  1. agent_tool_close_crm_cli-0.1.0/LICENSE +21 -0
  2. agent_tool_close_crm_cli-0.1.0/PKG-INFO +210 -0
  3. agent_tool_close_crm_cli-0.1.0/README.md +176 -0
  4. agent_tool_close_crm_cli-0.1.0/pyproject.toml +71 -0
  5. agent_tool_close_crm_cli-0.1.0/setup.cfg +4 -0
  6. agent_tool_close_crm_cli-0.1.0/src/agent_tool_close_crm_cli.egg-info/PKG-INFO +210 -0
  7. agent_tool_close_crm_cli-0.1.0/src/agent_tool_close_crm_cli.egg-info/SOURCES.txt +29 -0
  8. agent_tool_close_crm_cli-0.1.0/src/agent_tool_close_crm_cli.egg-info/dependency_links.txt +1 -0
  9. agent_tool_close_crm_cli-0.1.0/src/agent_tool_close_crm_cli.egg-info/entry_points.txt +2 -0
  10. agent_tool_close_crm_cli-0.1.0/src/agent_tool_close_crm_cli.egg-info/requires.txt +12 -0
  11. agent_tool_close_crm_cli-0.1.0/src/agent_tool_close_crm_cli.egg-info/top_level.txt +1 -0
  12. agent_tool_close_crm_cli-0.1.0/src/closecli/__init__.py +3 -0
  13. agent_tool_close_crm_cli-0.1.0/src/closecli/__main__.py +5 -0
  14. agent_tool_close_crm_cli-0.1.0/src/closecli/appctx.py +173 -0
  15. agent_tool_close_crm_cli-0.1.0/src/closecli/cli.py +219 -0
  16. agent_tool_close_crm_cli-0.1.0/src/closecli/client.py +363 -0
  17. agent_tool_close_crm_cli-0.1.0/src/closecli/commands/__init__.py +1 -0
  18. agent_tool_close_crm_cli-0.1.0/src/closecli/commands/_shared.py +39 -0
  19. agent_tool_close_crm_cli-0.1.0/src/closecli/commands/auth.py +220 -0
  20. agent_tool_close_crm_cli-0.1.0/src/closecli/commands/context.py +102 -0
  21. agent_tool_close_crm_cli-0.1.0/src/closecli/commands/guide.py +307 -0
  22. agent_tool_close_crm_cli-0.1.0/src/closecli/commands/install.py +227 -0
  23. agent_tool_close_crm_cli-0.1.0/src/closecli/commands/raw.py +136 -0
  24. agent_tool_close_crm_cli-0.1.0/src/closecli/commands/settings.py +72 -0
  25. agent_tool_close_crm_cli-0.1.0/src/closecli/config.py +167 -0
  26. agent_tool_close_crm_cli-0.1.0/src/closecli/errors.py +32 -0
  27. agent_tool_close_crm_cli-0.1.0/src/closecli/spec.py +45 -0
  28. agent_tool_close_crm_cli-0.1.0/tests/test_cli_unit.py +47 -0
  29. agent_tool_close_crm_cli-0.1.0/tests/test_client_unit.py +119 -0
  30. agent_tool_close_crm_cli-0.1.0/tests/test_globals_unit.py +48 -0
  31. agent_tool_close_crm_cli-0.1.0/tests/test_guide_unit.py +46 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zierhut IT / Alexander Zierhut
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 OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,210 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-tool-close-crm-cli
3
+ Version: 0.1.0
4
+ Summary: Agent-ready command-line interface for Close CRM — set up leads, keep contacts and notes current, track tasks and opportunities, and search across all of it. Installs the `close` command.
5
+ Author: Zierhut IT, Alexander Zierhut
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/alexander-zierhut/agent-tool-close-crm-cli
8
+ Project-URL: Repository, https://github.com/alexander-zierhut/agent-tool-close-crm-cli
9
+ Project-URL: Issues, https://github.com/alexander-zierhut/agent-tool-close-crm-cli/issues
10
+ Project-URL: Changelog, https://github.com/alexander-zierhut/agent-tool-close-crm-cli/releases
11
+ Keywords: close,close-crm,crm,sales,leads,contacts,opportunities,pipeline,sales-pipeline,cli,command-line,close-api,ai-agent,llm,automation
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Customer Service
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Office/Business
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: agent-tool-shared-cli<0.2,>=0.1.3
24
+ Requires-Dist: typer>=0.12
25
+ Requires-Dist: httpx>=0.27
26
+ Requires-Dist: keyring>=25
27
+ Requires-Dist: rich>=13
28
+ Provides-Extra: test
29
+ Requires-Dist: pytest>=8; extra == "test"
30
+ Requires-Dist: pytest-timeout>=2.3; extra == "test"
31
+ Provides-Extra: build
32
+ Requires-Dist: pyinstaller>=6; extra == "build"
33
+ Dynamic: license-file
34
+
35
+ # close — the agent-ready Close CRM CLI
36
+
37
+ > Set up leads, keep contacts and notes current, track tasks and opportunities,
38
+ > and search across all of it — a [Close](https://www.close.com) CRM client an
39
+ > LLM can drive with no prior knowledge of it.
40
+
41
+ [![PyPI](https://img.shields.io/pypi/v/agent-tool-close-crm-cli)](https://pypi.org/project/agent-tool-close-crm-cli/)
42
+ [![CI](https://github.com/alexander-zierhut/agent-tool-close-crm-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/alexander-zierhut/agent-tool-close-crm-cli/actions/workflows/ci.yml)
43
+ ![Python](https://img.shields.io/pypi/pyversions/agent-tool-close-crm-cli)
44
+ ![License: MIT](https://img.shields.io/badge/license-MIT-green)
45
+ ![Agent ready](https://img.shields.io/badge/agent-ready-blue)
46
+
47
+ **Install:** `pipx install agent-tool-close-crm-cli` — then run `close guide`.
48
+
49
+ `close` wraps the [Close CRM REST API](https://developer.close.com/) in a command
50
+ line built for **AI agents**: JSON on stdout by default, errors as JSON on stderr
51
+ with a meaningful exit code, a built-in `guide` that needs no network, and
52
+ `--dry-run` on every write. Point an agent at a website and let it stand a lead
53
+ up end to end — company, contacts, notes, a first task and an opportunity — then
54
+ keep it current, search across everything, and see what happened last.
55
+
56
+ ## The command surface
57
+
58
+ ```text
59
+ Usage: close [OPTIONS] COMMAND [ARGS]...
60
+
61
+ Agent-friendly CLI for Close CRM: set up leads, keep contacts current, log notes
62
+ and calls, create and reschedule tasks and opportunities, and search across all of
63
+ it.
64
+
65
+ Output is JSON on stdout by default (errors are JSON on stderr with a non-zero
66
+ exit code); add `-o table` or trim with `--fields id,name`.
67
+
68
+ New here / no context? Run `close guide` for the full playbook.
69
+
70
+ ╭─ Options ────────────────────────────────────────────────────────────────────────╮
71
+ │ --output -o <json|table|markdown|csv> Output format: json │
72
+ │ (default), table, │
73
+ │ markdown, csv. Also │
74
+ │ --format/-f, anywhere on │
75
+ │ the line. │
76
+ │ --fields,--columns <str> Comma-separated fields to │
77
+ │ return, e.g. │
78
+ │ 'id,display_name'. Works │
79
+ │ anywhere on the line. │
80
+ │ --profile -p <str> Configuration profile. │
81
+ │ One profile per Close API │
82
+ │ key (e.g. a second org). │
83
+ │ --dry-run Mutating commands: print │
84
+ │ the request that would be │
85
+ │ sent and exit. │
86
+ │ --stream Stream results as NDJSON. │
87
+ │ --no-context Ignore the saved session │
88
+ │ context for this command. │
89
+ │ --no-color Disable coloured output. │
90
+ │ --version -V Show version and exit. │
91
+ │ --help Show this message and │
92
+ │ exit. │
93
+ ╰──────────────────────────────────────────────────────────────────────────────────╯
94
+ ╭─ Commands ───────────────────────────────────────────────────────────────────────╮
95
+ │ guide Built-in operating guide — how to use this CLI without external docs. │
96
+ │ auth Log in with an API key, log out, inspect credentials. │
97
+ │ raw Escape hatch: call any Close API endpoint directly. │
98
+ │ settings View & change CLI settings. │
99
+ │ context Sticky session defaults (e.g. a lead), applied to later commands. │
100
+ │ install Integrate with other tools (e.g. `install claude`). │
101
+ ╰──────────────────────────────────────────────────────────────────────────────────╯
102
+
103
+ Learn more: `close guide` · `close guide <topic>` · `close <group> --help`
104
+ ```
105
+
106
+ > **Status — v0.1.0.** This first release ships the full chassis, the built-in
107
+ > `guide`, authentication, and the `raw` escape hatch — so an agent can already
108
+ > drive **every** Close endpoint (leads, contacts, notes, calls, tasks,
109
+ > opportunities, statuses, search) through `close raw`, with the family's JSON
110
+ > contract and `--dry-run` safety. Typed, name-resolving domain commands
111
+ > (`close lead`, `close contact`, `close task`, `close opportunity`,
112
+ > `close search`, …) are landing release by release on top of it. Run
113
+ > `close guide` for the current map.
114
+
115
+ ## Quickstart
116
+
117
+ ```bash
118
+ pipx install agent-tool-close-crm-cli
119
+ close auth login # paste an API key from app.close.com/settings/api/
120
+ # ...or run headless, no config file:
121
+ export CLOSE_API_KEY=api_xxxxxxxx
122
+
123
+ close guide # the built-in manual — no network needed
124
+ close raw get me/ # who am I, which org
125
+ close raw post lead/ --data '{"name": "Acme Inc", "url": "https://acme.com"}'
126
+ close raw get lead/ -P query="Acme" # find it again
127
+ close --dry-run raw put lead/<id>/ --data '{"status_id": "<status>"}' # preview a write
128
+ ```
129
+
130
+ ## Why "agent-ready"
131
+
132
+ An agent-ready CLI is one an LLM with **no prior knowledge** of the tool can
133
+ discover, drive correctly, and know whether it worked — without a human in the
134
+ loop. Concretely:
135
+
136
+ - **stdout is JSON, always.** `close … | jq` never breaks; human status goes to stderr.
137
+ - **Errors are a machine channel too.** `{"error": "...", "status": 404}` on stderr,
138
+ and a 422 carries `fieldErrors` — the exact fields Close rejected, as dotted
139
+ paths (`contacts.0.emails.0.email`) — so a rejected write is fixable on the next call.
140
+ - **Exit codes are the error taxonomy** (see below): branch on the class without parsing prose.
141
+ - **It teaches itself.** `close guide` is a zero-config, zero-network, offline
142
+ manual compiled into the binary; `close install claude` registers it as a Claude Code skill.
143
+ - **Preview before you write.** `--dry-run` prints the exact request and sends nothing.
144
+
145
+ ## The Close data model
146
+
147
+ | Object | Id prefix | What |
148
+ |---|---|---|
149
+ | **Lead** | `lead_` | A company/account — the central object; everything hangs off it. Has a status. |
150
+ | **Contact** | `cont_` | A person at a lead — names, emails, phones. |
151
+ | **Activity** | `acti_` | The lead's timeline: notes, calls, emails, SMS, status changes. "What happened last." |
152
+ | **Task** | `task_` | A to-do with a due date. "Open tasks" = incomplete ones due. |
153
+ | **Opportunity** | `oppo_` | A potential deal: value, confidence, a pipeline status (active/won/lost), a close date. |
154
+ | **Status** | `stat_` | Lead & opportunity statuses — **per-org and custom**; resolve them, never hard-code. |
155
+
156
+ Lists return `{"data": [...], "has_more": ..., "total_results": N}`; page with
157
+ `_skip`/`_limit` (max 100). Updates are **PUT** (partial — send only what changed).
158
+
159
+ ## Output contract & exit codes
160
+
161
+ Default output is JSON on stdout; add `-o table` for humans, `-o csv` to export,
162
+ `--fields id,display_name` to trim, `--stream` for NDJSON. Errors are JSON on
163
+ stderr with a non-zero exit code:
164
+
165
+ | Code | Meaning | | Code | Meaning |
166
+ |---|---|---|---|---|
167
+ | 0 | success (incl. a `--dry-run`) | | 5 | not found |
168
+ | 1 | generic error | | 6 | conflict |
169
+ | 3 | config (no API key) | | 7 | validation — see `fieldErrors` |
170
+ | 4 | auth (bad/insufficient key) | | 130 | interrupted |
171
+
172
+ Codes 0–7 mean the same thing across every tool in the family.
173
+
174
+ ## Authentication
175
+
176
+ A Close **API key** (starts with `api_`), minted at
177
+ [app.close.com/settings/api/](https://app.close.com/settings/api/). The key *is*
178
+ the org selector — there is no server URL to configure.
179
+
180
+ ```bash
181
+ close auth login # prompts, verifies against /me/, stores in your OS keyring
182
+ export CLOSE_API_KEY=api_xxxxxxxx # or headless, no config file
183
+ close auth status # names WHICH key/backend is actually in use
184
+ ```
185
+
186
+ Precedence is **env > OS keyring > 0600 file**; a second Close org is a second
187
+ profile (`close auth login --profile client-x`).
188
+
189
+ ## Part of the family
190
+
191
+ `close` is built on **[agent-tool-shared-cli](https://github.com/alexander-zierhut/agent-tool-shared-cli)**,
192
+ the shared chassis that fixes the output format, the exit-code taxonomy and the
193
+ credential handling — so an agent that has learned one tool in the family already
194
+ knows the next.
195
+
196
+ | Tool | Install | For |
197
+ | --- | --- | --- |
198
+ | [**close**](https://github.com/alexander-zierhut/agent-tool-close-crm-cli) | `pipx install agent-tool-close-crm-cli` | Close CRM — leads, contacts, notes, tasks, opportunities, search |
199
+ | [**drone-cli**](https://github.com/alexander-zierhut/agent-tool-drone-cli) | `pipx install agent-tool-drone-cli` | Drone CI — builds, failing-step logs, promotions |
200
+ | [**grafana**](https://github.com/alexander-zierhut/agent-tool-grafana-cli) | `pipx install agent-tool-grafana-cli` | Grafana — log discovery, health scan, alert routing |
201
+ | [**openproject**](https://github.com/alexander-zierhut/agent-tool-openproject-cli) | `pipx install agent-tool-openproject-cli` | OpenProject — work packages, time, invoicing |
202
+ | [**lexware-office**](https://github.com/alexander-zierhut/agent-tool-lexware-office-cli) | `pipx install agent-tool-lexware-office-cli` | Lexware Office — invoices, contacts, AR-aging |
203
+
204
+ **Keywords:** Close CRM CLI, Close.com API, sales CRM command line, leads,
205
+ contacts, sales opportunities, sales pipeline, tasks, CRM automation, AI agent
206
+ tool, LLM tooling, Claude.
207
+
208
+ ## License
209
+
210
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,176 @@
1
+ # close — the agent-ready Close CRM CLI
2
+
3
+ > Set up leads, keep contacts and notes current, track tasks and opportunities,
4
+ > and search across all of it — a [Close](https://www.close.com) CRM client an
5
+ > LLM can drive with no prior knowledge of it.
6
+
7
+ [![PyPI](https://img.shields.io/pypi/v/agent-tool-close-crm-cli)](https://pypi.org/project/agent-tool-close-crm-cli/)
8
+ [![CI](https://github.com/alexander-zierhut/agent-tool-close-crm-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/alexander-zierhut/agent-tool-close-crm-cli/actions/workflows/ci.yml)
9
+ ![Python](https://img.shields.io/pypi/pyversions/agent-tool-close-crm-cli)
10
+ ![License: MIT](https://img.shields.io/badge/license-MIT-green)
11
+ ![Agent ready](https://img.shields.io/badge/agent-ready-blue)
12
+
13
+ **Install:** `pipx install agent-tool-close-crm-cli` — then run `close guide`.
14
+
15
+ `close` wraps the [Close CRM REST API](https://developer.close.com/) in a command
16
+ line built for **AI agents**: JSON on stdout by default, errors as JSON on stderr
17
+ with a meaningful exit code, a built-in `guide` that needs no network, and
18
+ `--dry-run` on every write. Point an agent at a website and let it stand a lead
19
+ up end to end — company, contacts, notes, a first task and an opportunity — then
20
+ keep it current, search across everything, and see what happened last.
21
+
22
+ ## The command surface
23
+
24
+ ```text
25
+ Usage: close [OPTIONS] COMMAND [ARGS]...
26
+
27
+ Agent-friendly CLI for Close CRM: set up leads, keep contacts current, log notes
28
+ and calls, create and reschedule tasks and opportunities, and search across all of
29
+ it.
30
+
31
+ Output is JSON on stdout by default (errors are JSON on stderr with a non-zero
32
+ exit code); add `-o table` or trim with `--fields id,name`.
33
+
34
+ New here / no context? Run `close guide` for the full playbook.
35
+
36
+ ╭─ Options ────────────────────────────────────────────────────────────────────────╮
37
+ │ --output -o <json|table|markdown|csv> Output format: json │
38
+ │ (default), table, │
39
+ │ markdown, csv. Also │
40
+ │ --format/-f, anywhere on │
41
+ │ the line. │
42
+ │ --fields,--columns <str> Comma-separated fields to │
43
+ │ return, e.g. │
44
+ │ 'id,display_name'. Works │
45
+ │ anywhere on the line. │
46
+ │ --profile -p <str> Configuration profile. │
47
+ │ One profile per Close API │
48
+ │ key (e.g. a second org). │
49
+ │ --dry-run Mutating commands: print │
50
+ │ the request that would be │
51
+ │ sent and exit. │
52
+ │ --stream Stream results as NDJSON. │
53
+ │ --no-context Ignore the saved session │
54
+ │ context for this command. │
55
+ │ --no-color Disable coloured output. │
56
+ │ --version -V Show version and exit. │
57
+ │ --help Show this message and │
58
+ │ exit. │
59
+ ╰──────────────────────────────────────────────────────────────────────────────────╯
60
+ ╭─ Commands ───────────────────────────────────────────────────────────────────────╮
61
+ │ guide Built-in operating guide — how to use this CLI without external docs. │
62
+ │ auth Log in with an API key, log out, inspect credentials. │
63
+ │ raw Escape hatch: call any Close API endpoint directly. │
64
+ │ settings View & change CLI settings. │
65
+ │ context Sticky session defaults (e.g. a lead), applied to later commands. │
66
+ │ install Integrate with other tools (e.g. `install claude`). │
67
+ ╰──────────────────────────────────────────────────────────────────────────────────╯
68
+
69
+ Learn more: `close guide` · `close guide <topic>` · `close <group> --help`
70
+ ```
71
+
72
+ > **Status — v0.1.0.** This first release ships the full chassis, the built-in
73
+ > `guide`, authentication, and the `raw` escape hatch — so an agent can already
74
+ > drive **every** Close endpoint (leads, contacts, notes, calls, tasks,
75
+ > opportunities, statuses, search) through `close raw`, with the family's JSON
76
+ > contract and `--dry-run` safety. Typed, name-resolving domain commands
77
+ > (`close lead`, `close contact`, `close task`, `close opportunity`,
78
+ > `close search`, …) are landing release by release on top of it. Run
79
+ > `close guide` for the current map.
80
+
81
+ ## Quickstart
82
+
83
+ ```bash
84
+ pipx install agent-tool-close-crm-cli
85
+ close auth login # paste an API key from app.close.com/settings/api/
86
+ # ...or run headless, no config file:
87
+ export CLOSE_API_KEY=api_xxxxxxxx
88
+
89
+ close guide # the built-in manual — no network needed
90
+ close raw get me/ # who am I, which org
91
+ close raw post lead/ --data '{"name": "Acme Inc", "url": "https://acme.com"}'
92
+ close raw get lead/ -P query="Acme" # find it again
93
+ close --dry-run raw put lead/<id>/ --data '{"status_id": "<status>"}' # preview a write
94
+ ```
95
+
96
+ ## Why "agent-ready"
97
+
98
+ An agent-ready CLI is one an LLM with **no prior knowledge** of the tool can
99
+ discover, drive correctly, and know whether it worked — without a human in the
100
+ loop. Concretely:
101
+
102
+ - **stdout is JSON, always.** `close … | jq` never breaks; human status goes to stderr.
103
+ - **Errors are a machine channel too.** `{"error": "...", "status": 404}` on stderr,
104
+ and a 422 carries `fieldErrors` — the exact fields Close rejected, as dotted
105
+ paths (`contacts.0.emails.0.email`) — so a rejected write is fixable on the next call.
106
+ - **Exit codes are the error taxonomy** (see below): branch on the class without parsing prose.
107
+ - **It teaches itself.** `close guide` is a zero-config, zero-network, offline
108
+ manual compiled into the binary; `close install claude` registers it as a Claude Code skill.
109
+ - **Preview before you write.** `--dry-run` prints the exact request and sends nothing.
110
+
111
+ ## The Close data model
112
+
113
+ | Object | Id prefix | What |
114
+ |---|---|---|
115
+ | **Lead** | `lead_` | A company/account — the central object; everything hangs off it. Has a status. |
116
+ | **Contact** | `cont_` | A person at a lead — names, emails, phones. |
117
+ | **Activity** | `acti_` | The lead's timeline: notes, calls, emails, SMS, status changes. "What happened last." |
118
+ | **Task** | `task_` | A to-do with a due date. "Open tasks" = incomplete ones due. |
119
+ | **Opportunity** | `oppo_` | A potential deal: value, confidence, a pipeline status (active/won/lost), a close date. |
120
+ | **Status** | `stat_` | Lead & opportunity statuses — **per-org and custom**; resolve them, never hard-code. |
121
+
122
+ Lists return `{"data": [...], "has_more": ..., "total_results": N}`; page with
123
+ `_skip`/`_limit` (max 100). Updates are **PUT** (partial — send only what changed).
124
+
125
+ ## Output contract & exit codes
126
+
127
+ Default output is JSON on stdout; add `-o table` for humans, `-o csv` to export,
128
+ `--fields id,display_name` to trim, `--stream` for NDJSON. Errors are JSON on
129
+ stderr with a non-zero exit code:
130
+
131
+ | Code | Meaning | | Code | Meaning |
132
+ |---|---|---|---|---|
133
+ | 0 | success (incl. a `--dry-run`) | | 5 | not found |
134
+ | 1 | generic error | | 6 | conflict |
135
+ | 3 | config (no API key) | | 7 | validation — see `fieldErrors` |
136
+ | 4 | auth (bad/insufficient key) | | 130 | interrupted |
137
+
138
+ Codes 0–7 mean the same thing across every tool in the family.
139
+
140
+ ## Authentication
141
+
142
+ A Close **API key** (starts with `api_`), minted at
143
+ [app.close.com/settings/api/](https://app.close.com/settings/api/). The key *is*
144
+ the org selector — there is no server URL to configure.
145
+
146
+ ```bash
147
+ close auth login # prompts, verifies against /me/, stores in your OS keyring
148
+ export CLOSE_API_KEY=api_xxxxxxxx # or headless, no config file
149
+ close auth status # names WHICH key/backend is actually in use
150
+ ```
151
+
152
+ Precedence is **env > OS keyring > 0600 file**; a second Close org is a second
153
+ profile (`close auth login --profile client-x`).
154
+
155
+ ## Part of the family
156
+
157
+ `close` is built on **[agent-tool-shared-cli](https://github.com/alexander-zierhut/agent-tool-shared-cli)**,
158
+ the shared chassis that fixes the output format, the exit-code taxonomy and the
159
+ credential handling — so an agent that has learned one tool in the family already
160
+ knows the next.
161
+
162
+ | Tool | Install | For |
163
+ | --- | --- | --- |
164
+ | [**close**](https://github.com/alexander-zierhut/agent-tool-close-crm-cli) | `pipx install agent-tool-close-crm-cli` | Close CRM — leads, contacts, notes, tasks, opportunities, search |
165
+ | [**drone-cli**](https://github.com/alexander-zierhut/agent-tool-drone-cli) | `pipx install agent-tool-drone-cli` | Drone CI — builds, failing-step logs, promotions |
166
+ | [**grafana**](https://github.com/alexander-zierhut/agent-tool-grafana-cli) | `pipx install agent-tool-grafana-cli` | Grafana — log discovery, health scan, alert routing |
167
+ | [**openproject**](https://github.com/alexander-zierhut/agent-tool-openproject-cli) | `pipx install agent-tool-openproject-cli` | OpenProject — work packages, time, invoicing |
168
+ | [**lexware-office**](https://github.com/alexander-zierhut/agent-tool-lexware-office-cli) | `pipx install agent-tool-lexware-office-cli` | Lexware Office — invoices, contacts, AR-aging |
169
+
170
+ **Keywords:** Close CRM CLI, Close.com API, sales CRM command line, leads,
171
+ contacts, sales opportunities, sales pipeline, tasks, CRM automation, AI agent
172
+ tool, LLM tooling, Claude.
173
+
174
+ ## License
175
+
176
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,71 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "agent-tool-close-crm-cli"
7
+ description = "Agent-ready command-line interface for Close CRM — set up leads, keep contacts and notes current, track tasks and opportunities, and search across all of it. Installs the `close` command."
8
+ readme = "README.md"
9
+ requires-python = ">=3.10"
10
+ license = { text = "MIT" }
11
+ authors = [{ name = "Zierhut IT" }, { name = "Alexander Zierhut" }]
12
+ dynamic = ["version"]
13
+ keywords = [
14
+ "close", "close-crm", "crm", "sales", "leads", "contacts", "opportunities",
15
+ "pipeline", "sales-pipeline", "cli", "command-line", "close-api",
16
+ "ai-agent", "llm", "automation",
17
+ ]
18
+ classifiers = [
19
+ "Development Status :: 3 - Alpha",
20
+ "Environment :: Console",
21
+ "Intended Audience :: Developers",
22
+ "Intended Audience :: Customer Service",
23
+ "License :: OSI Approved :: MIT License",
24
+ "Programming Language :: Python :: 3",
25
+ "Topic :: Office/Business",
26
+ "Topic :: Utilities",
27
+ ]
28
+ dependencies = [
29
+ # The shared chassis: exit-code contract, Emitter, credentials, AppSpec.
30
+ # Pinned to a major -- the exit codes and output shapes are published API.
31
+ "agent-tool-shared-cli>=0.1.3,<0.2",
32
+ "typer>=0.12",
33
+ "httpx>=0.27",
34
+ "keyring>=25",
35
+ "rich>=13",
36
+ ]
37
+
38
+ [project.optional-dependencies]
39
+ test = [
40
+ "pytest>=8",
41
+ "pytest-timeout>=2.3",
42
+ ]
43
+ build = [
44
+ "pyinstaller>=6",
45
+ ]
46
+
47
+ [project.urls]
48
+ Homepage = "https://github.com/alexander-zierhut/agent-tool-close-crm-cli"
49
+ Repository = "https://github.com/alexander-zierhut/agent-tool-close-crm-cli"
50
+ Issues = "https://github.com/alexander-zierhut/agent-tool-close-crm-cli/issues"
51
+ Changelog = "https://github.com/alexander-zierhut/agent-tool-close-crm-cli/releases"
52
+
53
+ [project.scripts]
54
+ # Only `close` — the short alias `cl` is intentionally NOT claimed, to avoid
55
+ # colliding with other tools. Add your own alias if you want a shorter command.
56
+ close = "closecli.cli:main"
57
+
58
+ [tool.setuptools.packages.find]
59
+ where = ["src"]
60
+
61
+ # Single source of truth for the version.
62
+ [tool.setuptools.dynamic]
63
+ version = { attr = "closecli.__version__" }
64
+
65
+ [tool.pytest.ini_options]
66
+ testpaths = ["tests"]
67
+ addopts = "-ra -q"
68
+ markers = [
69
+ "integration: talks to a live Close org (requires CLOSE_API_KEY)",
70
+ ]
71
+ timeout = 120
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+