hookstride-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.
@@ -0,0 +1,14 @@
1
+ .env
2
+ .venv/
3
+ __pycache__/
4
+ *.py[cod]
5
+ .pytest_cache/
6
+ .ruff_cache/
7
+ .coverage
8
+ htmlcov/
9
+ db.sqlite3
10
+ staticfiles/*
11
+ !staticfiles/.gitkeep
12
+ .DS_Store
13
+ .idea/
14
+ .vscode/
@@ -0,0 +1,215 @@
1
+ Metadata-Version: 2.5
2
+ Name: hookstride-cli
3
+ Version: 1.0.0
4
+ Summary: Manage webhook delivery, monitor events, and automate Hookstride workflows from your terminal.
5
+ Project-URL: Homepage, https://hookstride.com
6
+ Project-URL: Documentation, https://hookstride.com/docs
7
+ Project-URL: Support, https://hookstride.com/support
8
+ Project-URL: Service status, https://status.hookstride.com
9
+ License: Proprietary
10
+ Keywords: cli,developer-tools,hookstride,webhooks
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
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
+ Classifier: Programming Language :: Python :: 3.14
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: click<9,>=8.1
21
+ Requires-Dist: httpx[socks]<1,>=0.28
22
+ Requires-Dist: prompt-toolkit<4,>=3.0.52
23
+ Requires-Dist: rich<15,>=14
24
+ Requires-Dist: typer<1,>=0.20
25
+ Description-Content-Type: text/markdown
26
+
27
+ # Hookstride CLI
28
+
29
+ Send a webhook, see whether it arrived, and inspect delivery attempts without leaving your terminal. The official [Hookstride](https://hookstride.com) CLI also lets you manage projects and destinations, and preview supported changes before applying them.
30
+
31
+ The CLI connects to production by default. You can check service readiness without signing in. For commands that access a workspace, you need a Hookstride account and the appropriate credential.
32
+
33
+ ## Installation
34
+
35
+ Requires Python 3.11 or later.
36
+
37
+ ```bash
38
+ uv tool install hookstride-cli
39
+ ```
40
+
41
+ Alternatively, install with pipx:
42
+
43
+ ```bash
44
+ pipx install hookstride-cli
45
+ ```
46
+
47
+ Check your installation and API connectivity:
48
+
49
+ ```bash
50
+ hookstride --version
51
+ hookstride status
52
+ ```
53
+
54
+ To upgrade an existing installation, use `uv tool upgrade hookstride-cli` or `pipx upgrade hookstride-cli`. To remove the CLI, use `uv tool uninstall hookstride-cli` or `pipx uninstall hookstride-cli`.
55
+
56
+ ## Getting started
57
+
58
+ Create a Control API token in your Hookstride dashboard after verifying with MFA. Open the interactive console:
59
+
60
+ ```bash
61
+ hookstride console
62
+ ```
63
+
64
+ Sign in, list your projects, and select one. Replace `1` with the number of the project you want:
65
+
66
+ ```text
67
+ auth login
68
+ show projects
69
+ use 1
70
+ show destinations
71
+ show events
72
+ ```
73
+
74
+ Enter your token at the hidden prompt when you run `auth login`. Use `help` to see available commands and Tab for suggestions. Run `auth logout` to clear the console token or `exit` to leave. The console keeps its token in memory. It does not sign in separate terminal commands.
75
+
76
+ For standalone commands, set `HOOKSTRIDE_CONTROL_TOKEN` from a hidden prompt or inject it from your secret manager. For example, in Bash:
77
+
78
+ ```bash
79
+ read -rs -p "Control API token: " HOOKSTRIDE_CONTROL_TOKEN
80
+ echo
81
+ export HOOKSTRIDE_CONTROL_TOKEN
82
+ hookstride auth status
83
+ hookstride projects list
84
+ hookstride projects use PROJECT_UUID
85
+ ```
86
+
87
+ Use a **Control API token** (`whrctl_`) for management commands and a **project delivery API key** (`whrk_`) for sending events. They are not interchangeable. Don't put them in command arguments, shell history, logs, or support messages. Run `unset HOOKSTRIDE_CONTROL_TOKEN` when you're done with the terminal session.
88
+
89
+ ## Projects and destinations
90
+
91
+ ```bash
92
+ hookstride projects list
93
+ hookstride projects use PROJECT_UUID
94
+ hookstride destinations list
95
+ hookstride destinations create --name "Order notifications" --url https://example.com/webhooks
96
+ hookstride destinations update DESTINATION_UUID --pause
97
+ hookstride destinations update DESTINATION_UUID --resume
98
+ ```
99
+
100
+ Select a project by its number in the project list or its full UUID. For workspace project creation, find the workspace account ID with `hookstride --json projects list` or `hookstride actions workspaces`.
101
+
102
+ ```bash
103
+ hookstride projects create --account ACCOUNT_UUID --name "My project"
104
+ hookstride projects update PROJECT_UUID --name "Order notifications"
105
+ ```
106
+
107
+ Project creation and updates require an administrator or owner role. Destination changes require developer access or higher. Copy a new destination's signing secret to a secure store when it is shown. It is returned only once, and that includes JSON output, so don't capture it in shared logs or CI artifacts.
108
+
109
+ ## Send and inspect events
110
+
111
+ Select a project and an active destination you control. `events send` sends a real webhook, even with the sample payload. The CLI asks for the project's delivery key at a hidden prompt if one is not set.
112
+
113
+ ```bash
114
+ hookstride events send DESTINATION_UUID --wait
115
+ hookstride events list --status failed
116
+ hookstride events show EVENT_UUID
117
+ ```
118
+
119
+ To submit your own JSON object, save it in a file:
120
+
121
+ ```json
122
+ {"order_id": "12345", "status": "paid"}
123
+ ```
124
+
125
+ ```bash
126
+ hookstride events send DESTINATION_UUID --type order.paid --payload-file order.json --wait
127
+ ```
128
+
129
+ Use `--payload-file` for a UTF-8 JSON object up to 64 KiB. The default event type is `webhook.test`; change it with `--type`. Without `--wait`, an accepted event is queued, not necessarily delivered. With `--wait`, a failure or timeout returns a nonzero exit code. A timeout doesn't cancel delivery. If an event ID was returned, inspect it with `events show` before sending again.
130
+
131
+ For non-interactive sends, inject `HOOKSTRIDE_PRODUCTION_API_KEY` from your secret manager. For `--env dev`, use `HOOKSTRIDE_DEV_API_KEY` for that environment.
132
+
133
+ ## Delivery insights and exports
134
+
135
+ ```bash
136
+ hookstride stats
137
+ hookstride metrics --days 7
138
+ hookstride status --pipeline
139
+ hookstride --json events export --status failed > failed-events.json
140
+ ```
141
+
142
+ - **Stats:** totals for the selected project, including events still pending.
143
+ - **Metrics:** delivery results for a 1-, 7-, or 30-day UTC window, plus the current queue backlog.
144
+ - **Status:** current API readiness; add `--pipeline` to include delivery-worker readiness. This isn't a historical uptime report.
145
+ - **Export:** up to 200 matching events and their redacted attempts. Narrow your filters if the export is truncated. Treat exported event data as private.
146
+
147
+ ## Confirmed actions
148
+
149
+ Discover the operations available to your account:
150
+
151
+ ```bash
152
+ hookstride actions list
153
+ hookstride actions context
154
+ hookstride actions workspaces
155
+ ```
156
+
157
+ Use `actions list` to see what you can do in the selected project. Available actions depend on your permissions and workspace configuration. `actions context` shows authorized IDs and settings you can use as inputs.
158
+
159
+ To replay an eligible event, create a JSON file named `replay.json` containing its event UUID:
160
+
161
+ ```json
162
+ {"event_id": "EVENT_UUID"}
163
+ ```
164
+
165
+ ```bash
166
+ hookstride actions preview event.replay --input-file replay.json
167
+ hookstride actions apply event.replay --input-file replay.json
168
+ ```
169
+
170
+ `actions preview` makes no change. In interactive use, `actions apply` fetches a new preview and asks you to confirm. In a script, review the action first, then pass `--confirm` to skip the prompt. Replays use event units when your plan meters them.
171
+
172
+ ## Account information
173
+
174
+ ```bash
175
+ hookstride keys list
176
+ hookstride billing status
177
+ hookstride billing history
178
+ hookstride config show
179
+ ```
180
+
181
+ API key listings show masked credentials. Billing history retains recorded currencies. Use the dashboard to manage credentials, payments and account security.
182
+
183
+ ## Incoming webhooks and local forwarding
184
+
185
+ If your project has access to incoming webhooks, use `hookstride incoming --help` to find the source, route, binding and registration-key inspection commands. The CLI does not grant access to those features. Local forwarding with `hookstride listen` is a restricted preview, not a generally available feature.
186
+
187
+ ## Scripting and configuration
188
+
189
+ Place global options before the command:
190
+
191
+ ```bash
192
+ hookstride --json projects list
193
+ hookstride --project PROJECT_UUID --json events list --status failed
194
+ hookstride --no-color destinations list
195
+ ```
196
+
197
+ Use `--json` for machine-readable output and check the exit code as well as the response. The CLI saves project selection separately for production and development. It does not write Control API tokens or project delivery keys to the settings file.
198
+
199
+ Run `hookstride --help` for all commands or append `--help` to a command for its options.
200
+
201
+ ## Troubleshooting
202
+
203
+ - If `hookstride` is not found, ensure the installer’s executable directory is on your PATH and reopen your terminal.
204
+ - If authentication fails, check that the credential matches the command and environment.
205
+ - If a command is denied, check the selected project, your workspace role, and whether the feature is enabled.
206
+ - If an event is accepted but not delivered, run `hookstride events show EVENT_UUID` to see its attempts. If the API is unavailable, run `hookstride status` or check the service status page.
207
+
208
+ Never include tokens, signing secrets or private event payloads in a support request.
209
+
210
+ ## Resources
211
+
212
+ - [Website](https://hookstride.com)
213
+ - [Documentation](https://hookstride.com/docs)
214
+ - [Service status](https://status.hookstride.com)
215
+ - [Support](https://hookstride.com/support)
@@ -0,0 +1,189 @@
1
+ # Hookstride CLI
2
+
3
+ Send a webhook, see whether it arrived, and inspect delivery attempts without leaving your terminal. The official [Hookstride](https://hookstride.com) CLI also lets you manage projects and destinations, and preview supported changes before applying them.
4
+
5
+ The CLI connects to production by default. You can check service readiness without signing in. For commands that access a workspace, you need a Hookstride account and the appropriate credential.
6
+
7
+ ## Installation
8
+
9
+ Requires Python 3.11 or later.
10
+
11
+ ```bash
12
+ uv tool install hookstride-cli
13
+ ```
14
+
15
+ Alternatively, install with pipx:
16
+
17
+ ```bash
18
+ pipx install hookstride-cli
19
+ ```
20
+
21
+ Check your installation and API connectivity:
22
+
23
+ ```bash
24
+ hookstride --version
25
+ hookstride status
26
+ ```
27
+
28
+ To upgrade an existing installation, use `uv tool upgrade hookstride-cli` or `pipx upgrade hookstride-cli`. To remove the CLI, use `uv tool uninstall hookstride-cli` or `pipx uninstall hookstride-cli`.
29
+
30
+ ## Getting started
31
+
32
+ Create a Control API token in your Hookstride dashboard after verifying with MFA. Open the interactive console:
33
+
34
+ ```bash
35
+ hookstride console
36
+ ```
37
+
38
+ Sign in, list your projects, and select one. Replace `1` with the number of the project you want:
39
+
40
+ ```text
41
+ auth login
42
+ show projects
43
+ use 1
44
+ show destinations
45
+ show events
46
+ ```
47
+
48
+ Enter your token at the hidden prompt when you run `auth login`. Use `help` to see available commands and Tab for suggestions. Run `auth logout` to clear the console token or `exit` to leave. The console keeps its token in memory. It does not sign in separate terminal commands.
49
+
50
+ For standalone commands, set `HOOKSTRIDE_CONTROL_TOKEN` from a hidden prompt or inject it from your secret manager. For example, in Bash:
51
+
52
+ ```bash
53
+ read -rs -p "Control API token: " HOOKSTRIDE_CONTROL_TOKEN
54
+ echo
55
+ export HOOKSTRIDE_CONTROL_TOKEN
56
+ hookstride auth status
57
+ hookstride projects list
58
+ hookstride projects use PROJECT_UUID
59
+ ```
60
+
61
+ Use a **Control API token** (`whrctl_`) for management commands and a **project delivery API key** (`whrk_`) for sending events. They are not interchangeable. Don't put them in command arguments, shell history, logs, or support messages. Run `unset HOOKSTRIDE_CONTROL_TOKEN` when you're done with the terminal session.
62
+
63
+ ## Projects and destinations
64
+
65
+ ```bash
66
+ hookstride projects list
67
+ hookstride projects use PROJECT_UUID
68
+ hookstride destinations list
69
+ hookstride destinations create --name "Order notifications" --url https://example.com/webhooks
70
+ hookstride destinations update DESTINATION_UUID --pause
71
+ hookstride destinations update DESTINATION_UUID --resume
72
+ ```
73
+
74
+ Select a project by its number in the project list or its full UUID. For workspace project creation, find the workspace account ID with `hookstride --json projects list` or `hookstride actions workspaces`.
75
+
76
+ ```bash
77
+ hookstride projects create --account ACCOUNT_UUID --name "My project"
78
+ hookstride projects update PROJECT_UUID --name "Order notifications"
79
+ ```
80
+
81
+ Project creation and updates require an administrator or owner role. Destination changes require developer access or higher. Copy a new destination's signing secret to a secure store when it is shown. It is returned only once, and that includes JSON output, so don't capture it in shared logs or CI artifacts.
82
+
83
+ ## Send and inspect events
84
+
85
+ Select a project and an active destination you control. `events send` sends a real webhook, even with the sample payload. The CLI asks for the project's delivery key at a hidden prompt if one is not set.
86
+
87
+ ```bash
88
+ hookstride events send DESTINATION_UUID --wait
89
+ hookstride events list --status failed
90
+ hookstride events show EVENT_UUID
91
+ ```
92
+
93
+ To submit your own JSON object, save it in a file:
94
+
95
+ ```json
96
+ {"order_id": "12345", "status": "paid"}
97
+ ```
98
+
99
+ ```bash
100
+ hookstride events send DESTINATION_UUID --type order.paid --payload-file order.json --wait
101
+ ```
102
+
103
+ Use `--payload-file` for a UTF-8 JSON object up to 64 KiB. The default event type is `webhook.test`; change it with `--type`. Without `--wait`, an accepted event is queued, not necessarily delivered. With `--wait`, a failure or timeout returns a nonzero exit code. A timeout doesn't cancel delivery. If an event ID was returned, inspect it with `events show` before sending again.
104
+
105
+ For non-interactive sends, inject `HOOKSTRIDE_PRODUCTION_API_KEY` from your secret manager. For `--env dev`, use `HOOKSTRIDE_DEV_API_KEY` for that environment.
106
+
107
+ ## Delivery insights and exports
108
+
109
+ ```bash
110
+ hookstride stats
111
+ hookstride metrics --days 7
112
+ hookstride status --pipeline
113
+ hookstride --json events export --status failed > failed-events.json
114
+ ```
115
+
116
+ - **Stats:** totals for the selected project, including events still pending.
117
+ - **Metrics:** delivery results for a 1-, 7-, or 30-day UTC window, plus the current queue backlog.
118
+ - **Status:** current API readiness; add `--pipeline` to include delivery-worker readiness. This isn't a historical uptime report.
119
+ - **Export:** up to 200 matching events and their redacted attempts. Narrow your filters if the export is truncated. Treat exported event data as private.
120
+
121
+ ## Confirmed actions
122
+
123
+ Discover the operations available to your account:
124
+
125
+ ```bash
126
+ hookstride actions list
127
+ hookstride actions context
128
+ hookstride actions workspaces
129
+ ```
130
+
131
+ Use `actions list` to see what you can do in the selected project. Available actions depend on your permissions and workspace configuration. `actions context` shows authorized IDs and settings you can use as inputs.
132
+
133
+ To replay an eligible event, create a JSON file named `replay.json` containing its event UUID:
134
+
135
+ ```json
136
+ {"event_id": "EVENT_UUID"}
137
+ ```
138
+
139
+ ```bash
140
+ hookstride actions preview event.replay --input-file replay.json
141
+ hookstride actions apply event.replay --input-file replay.json
142
+ ```
143
+
144
+ `actions preview` makes no change. In interactive use, `actions apply` fetches a new preview and asks you to confirm. In a script, review the action first, then pass `--confirm` to skip the prompt. Replays use event units when your plan meters them.
145
+
146
+ ## Account information
147
+
148
+ ```bash
149
+ hookstride keys list
150
+ hookstride billing status
151
+ hookstride billing history
152
+ hookstride config show
153
+ ```
154
+
155
+ API key listings show masked credentials. Billing history retains recorded currencies. Use the dashboard to manage credentials, payments and account security.
156
+
157
+ ## Incoming webhooks and local forwarding
158
+
159
+ If your project has access to incoming webhooks, use `hookstride incoming --help` to find the source, route, binding and registration-key inspection commands. The CLI does not grant access to those features. Local forwarding with `hookstride listen` is a restricted preview, not a generally available feature.
160
+
161
+ ## Scripting and configuration
162
+
163
+ Place global options before the command:
164
+
165
+ ```bash
166
+ hookstride --json projects list
167
+ hookstride --project PROJECT_UUID --json events list --status failed
168
+ hookstride --no-color destinations list
169
+ ```
170
+
171
+ Use `--json` for machine-readable output and check the exit code as well as the response. The CLI saves project selection separately for production and development. It does not write Control API tokens or project delivery keys to the settings file.
172
+
173
+ Run `hookstride --help` for all commands or append `--help` to a command for its options.
174
+
175
+ ## Troubleshooting
176
+
177
+ - If `hookstride` is not found, ensure the installer’s executable directory is on your PATH and reopen your terminal.
178
+ - If authentication fails, check that the credential matches the command and environment.
179
+ - If a command is denied, check the selected project, your workspace role, and whether the feature is enabled.
180
+ - If an event is accepted but not delivered, run `hookstride events show EVENT_UUID` to see its attempts. If the API is unavailable, run `hookstride status` or check the service status page.
181
+
182
+ Never include tokens, signing secrets or private event payloads in a support request.
183
+
184
+ ## Resources
185
+
186
+ - [Website](https://hookstride.com)
187
+ - [Documentation](https://hookstride.com/docs)
188
+ - [Service status](https://status.hookstride.com)
189
+ - [Support](https://hookstride.com/support)
@@ -0,0 +1,63 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "hookstride-cli"
7
+ version = "1.0.0"
8
+ description = "Manage webhook delivery, monitor events, and automate Hookstride workflows from your terminal."
9
+ readme = "README.md"
10
+ keywords = ["webhooks", "hookstride", "cli", "developer-tools"]
11
+ classifiers = [
12
+ "Development Status :: 5 - Production/Stable",
13
+ "Environment :: Console",
14
+ "Intended Audience :: Developers",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.11",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Programming Language :: Python :: 3.13",
19
+ "Programming Language :: Python :: 3.14",
20
+ ]
21
+ requires-python = ">=3.11"
22
+ license = { text = "Proprietary" }
23
+ dependencies = [
24
+ "click>=8.1,<9",
25
+ "httpx[socks]>=0.28,<1",
26
+ "prompt-toolkit>=3.0.52,<4",
27
+ "rich>=14,<15",
28
+ "typer>=0.20,<1",
29
+ ]
30
+
31
+ [project.urls]
32
+ Homepage = "https://hookstride.com"
33
+ Documentation = "https://hookstride.com/docs"
34
+ Support = "https://hookstride.com/support"
35
+ "Service status" = "https://status.hookstride.com"
36
+
37
+ [project.scripts]
38
+ hookstride = "hookstride_cli.main:main"
39
+
40
+ [dependency-groups]
41
+ dev = [
42
+ "pytest>=8.4,<10",
43
+ "ruff>=0.12,<1",
44
+ ]
45
+
46
+ [tool.hatch.build.targets.sdist]
47
+ include = ["/README.md", "/pyproject.toml", "/src/hookstride_cli"]
48
+
49
+ [tool.hatch.build.targets.wheel]
50
+ packages = ["src/hookstride_cli"]
51
+
52
+ [tool.ruff]
53
+ target-version = "py311"
54
+ line-length = 100
55
+
56
+ [tool.ruff.lint]
57
+ select = ["E", "F", "I", "UP", "B", "SIM"]
58
+ # Typer uses Option/Argument as intentional function defaults; long CLI lines
59
+ # are formatted where practical without enforcing an arbitrary terminal width.
60
+ ignore = ["B008", "E501"]
61
+
62
+ [tool.pytest.ini_options]
63
+ testpaths = ["tests"]
@@ -0,0 +1,3 @@
1
+ """Hookstride developer CLI."""
2
+
3
+ __version__ = "1.0.0"