hookstride-cli 0.2.1__tar.gz → 0.3.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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: hookstride-cli
3
- Version: 0.2.1
4
- Summary: Command-line access to Hookstride projects, webhook activity, and billing.
3
+ Version: 0.3.0
4
+ Summary: Manage Hookstride projects and destinations, inspect webhook activity and billing.
5
5
  License: Proprietary
6
6
  Requires-Python: >=3.11
7
7
  Requires-Dist: click<9,>=8.1
@@ -13,9 +13,9 @@ Description-Content-Type: text/markdown
13
13
 
14
14
  # Hookstride CLI
15
15
 
16
- Hookstride CLI provides command-line access to project information, webhook activity, incoming integrations, and billing records in Hookstride. It includes an interactive console for inspecting the same information without using the web dashboard.
16
+ Hookstride CLI lets you manage projects and webhook destinations, inspect delivery activity, and view billing records. It includes an interactive console with the same selected-project commands.
17
17
 
18
- The current release supports read operations only. It cannot create or modify destinations, replay deliveries, manage credentials, or initiate payments.
18
+ Version 0.3.0 adds project creation and updates, plus destination creation, updates, and pausing/resuming. Billing and credential changes, delivery replay, and destructive operations remain unavailable.
19
19
 
20
20
  ## Installation
21
21
 
@@ -65,8 +65,14 @@ hookstride status
65
65
  hookstride auth status
66
66
  hookstride projects list
67
67
  hookstride projects use PROJECT_UUID
68
+ hookstride projects create --account ACCOUNT_UUID --name "Staging" --slug staging
69
+ hookstride projects update PROJECT_UUID --name "Production EU"
68
70
 
69
71
  hookstride destinations list
72
+ hookstride destinations create --name "Webhook receiver" --url "https://app.example.com/webhooks/hookstride"
73
+ hookstride destinations update DESTINATION_UUID --url "https://api.example.com/webhooks/hookstride"
74
+ hookstride destinations update DESTINATION_UUID --pause
75
+ hookstride destinations update DESTINATION_UUID --resume
70
76
  hookstride keys list
71
77
  hookstride events list --status failed
72
78
  hookstride events show EVENT_UUID
@@ -82,7 +88,7 @@ hookstride billing history
82
88
  hookstride config show
83
89
  ```
84
90
 
85
- Replace `PROJECT_UUID` and `EVENT_UUID` with identifiers from your account.
91
+ Replace the example UUIDs with identifiers from your account. Find your workspace's `account_id` with `hookstride --json projects list`; that ID is required for project creation. Project creation and renaming require an admin/owner role. Destination changes require developer access or higher.
86
92
 
87
93
  Commands that operate on a project use the selected project. You can override the selection for an individual command:
88
94
 
@@ -96,7 +102,7 @@ hookstride --project PROJECT_UUID events list
96
102
  hookstride console
97
103
  ```
98
104
 
99
- Use `help` to view commands, Tab for completion, and `exit` or Ctrl+D to leave. The console also supports `show projects`, `show events`, `show destinations`, `use PROJECT_UUID`, `back`, and `set env dev|production`.
105
+ Use `help` to view commands, Tab for completion, and `exit` or Ctrl+D to leave. The console also supports `show projects`, `show events`, `show destinations`, `use PROJECT_UUID`, `back`, and `set env dev|production`. The same `projects create/update` and `destinations create/update` commands work inside the console. Commands with customer-provided names and URLs are not saved to console history.
100
106
 
101
107
  ### JSON output
102
108
 
@@ -108,24 +114,23 @@ hookstride --project PROJECT_UUID --json events list --status failed
108
114
  hookstride --env production --json billing history
109
115
  ```
110
116
 
111
- Errors go to standard error; unsuccessful requests return a nonzero exit code.
117
+ Errors go to standard error; unsuccessful requests return a nonzero exit code. When creating a destination, the server returns a signing secret **once**. Save it securely immediately. Both terminal output and `--json` deliberately include that one-time secret, so avoid piping creation output into logs or public CI artifacts.
112
118
 
113
119
  ## Environments and local settings
114
120
 
115
- The CLI connects to the development API by default: `https://api-dev.hookstride.voteeasy.net`.
121
+ The CLI connects to the production API by default: `https://api.hookstride.com`.
122
+ A new release must be published to PyPI before existing installations receive this change.
116
123
 
117
- To access production, select it explicitly:
124
+ To inspect the development API explicitly, select it:
118
125
 
119
126
  ```bash
120
- hookstride --env production console
127
+ hookstride --env dev console
121
128
  ```
122
129
 
123
- Production requests use `https://api.hookstride.voteeasy.net`. Use a Control API token issued for the selected environment. A custom HTTPS API origin can be supplied with `--api-url`.
130
+ Development requests use `https://api-dev.hookstride.com`. Use a Control API token issued for the selected environment. A custom HTTPS API origin can be supplied with `--api-url`.
124
131
 
125
132
  Project selections are stored separately by environment in `~/.config/hookstride/settings.json`. This file contains project identifiers, **not authentication tokens**. Console tokens and command history remain in memory and are discarded at exit.
126
133
 
127
134
  ## Documentation
128
135
 
129
- Product documentation: https://hookstride.voteeasy.net/docs
130
-
131
- Source: https://github.com/quarj0/webhook-reliability-api/tree/main/cli
136
+ Documentation: https://hookstride.com
@@ -1,8 +1,8 @@
1
1
  # Hookstride CLI
2
2
 
3
- Hookstride CLI provides command-line access to project information, webhook activity, incoming integrations, and billing records in Hookstride. It includes an interactive console for inspecting the same information without using the web dashboard.
3
+ Hookstride CLI lets you manage projects and webhook destinations, inspect delivery activity, and view billing records. It includes an interactive console with the same selected-project commands.
4
4
 
5
- The current release supports read operations only. It cannot create or modify destinations, replay deliveries, manage credentials, or initiate payments.
5
+ Version 0.3.0 adds project creation and updates, plus destination creation, updates, and pausing/resuming. Billing and credential changes, delivery replay, and destructive operations remain unavailable.
6
6
 
7
7
  ## Installation
8
8
 
@@ -52,8 +52,14 @@ hookstride status
52
52
  hookstride auth status
53
53
  hookstride projects list
54
54
  hookstride projects use PROJECT_UUID
55
+ hookstride projects create --account ACCOUNT_UUID --name "Staging" --slug staging
56
+ hookstride projects update PROJECT_UUID --name "Production EU"
55
57
 
56
58
  hookstride destinations list
59
+ hookstride destinations create --name "Webhook receiver" --url "https://app.example.com/webhooks/hookstride"
60
+ hookstride destinations update DESTINATION_UUID --url "https://api.example.com/webhooks/hookstride"
61
+ hookstride destinations update DESTINATION_UUID --pause
62
+ hookstride destinations update DESTINATION_UUID --resume
57
63
  hookstride keys list
58
64
  hookstride events list --status failed
59
65
  hookstride events show EVENT_UUID
@@ -69,7 +75,7 @@ hookstride billing history
69
75
  hookstride config show
70
76
  ```
71
77
 
72
- Replace `PROJECT_UUID` and `EVENT_UUID` with identifiers from your account.
78
+ Replace the example UUIDs with identifiers from your account. Find your workspace's `account_id` with `hookstride --json projects list`; that ID is required for project creation. Project creation and renaming require an admin/owner role. Destination changes require developer access or higher.
73
79
 
74
80
  Commands that operate on a project use the selected project. You can override the selection for an individual command:
75
81
 
@@ -83,7 +89,7 @@ hookstride --project PROJECT_UUID events list
83
89
  hookstride console
84
90
  ```
85
91
 
86
- Use `help` to view commands, Tab for completion, and `exit` or Ctrl+D to leave. The console also supports `show projects`, `show events`, `show destinations`, `use PROJECT_UUID`, `back`, and `set env dev|production`.
92
+ Use `help` to view commands, Tab for completion, and `exit` or Ctrl+D to leave. The console also supports `show projects`, `show events`, `show destinations`, `use PROJECT_UUID`, `back`, and `set env dev|production`. The same `projects create/update` and `destinations create/update` commands work inside the console. Commands with customer-provided names and URLs are not saved to console history.
87
93
 
88
94
  ### JSON output
89
95
 
@@ -95,24 +101,23 @@ hookstride --project PROJECT_UUID --json events list --status failed
95
101
  hookstride --env production --json billing history
96
102
  ```
97
103
 
98
- Errors go to standard error; unsuccessful requests return a nonzero exit code.
104
+ Errors go to standard error; unsuccessful requests return a nonzero exit code. When creating a destination, the server returns a signing secret **once**. Save it securely immediately. Both terminal output and `--json` deliberately include that one-time secret, so avoid piping creation output into logs or public CI artifacts.
99
105
 
100
106
  ## Environments and local settings
101
107
 
102
- The CLI connects to the development API by default: `https://api-dev.hookstride.voteeasy.net`.
108
+ The CLI connects to the production API by default: `https://api.hookstride.com`.
109
+ A new release must be published to PyPI before existing installations receive this change.
103
110
 
104
- To access production, select it explicitly:
111
+ To inspect the development API explicitly, select it:
105
112
 
106
113
  ```bash
107
- hookstride --env production console
114
+ hookstride --env dev console
108
115
  ```
109
116
 
110
- Production requests use `https://api.hookstride.voteeasy.net`. Use a Control API token issued for the selected environment. A custom HTTPS API origin can be supplied with `--api-url`.
117
+ Development requests use `https://api-dev.hookstride.com`. Use a Control API token issued for the selected environment. A custom HTTPS API origin can be supplied with `--api-url`.
111
118
 
112
119
  Project selections are stored separately by environment in `~/.config/hookstride/settings.json`. This file contains project identifiers, **not authentication tokens**. Console tokens and command history remain in memory and are discarded at exit.
113
120
 
114
121
  ## Documentation
115
122
 
116
- Product documentation: https://hookstride.voteeasy.net/docs
117
-
118
- Source: https://github.com/quarj0/webhook-reliability-api/tree/main/cli
123
+ Documentation: https://hookstride.com
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "hookstride-cli"
7
- version = "0.2.1"
8
- description = "Command-line access to Hookstride projects, webhook activity, and billing."
7
+ version = "0.3.0"
8
+ description = "Manage Hookstride projects and destinations, inspect webhook activity and billing."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
11
11
  license = { text = "Proprietary" }
@@ -1,3 +1,3 @@
1
1
  """Hookstride developer CLI."""
2
2
 
3
- __version__ = "0.2.1"
3
+ __version__ = "0.3.0"
@@ -1,8 +1,7 @@
1
- """Interactive, read-only Hookstride console.
1
+ """Interactive Hookstride console with allowlisted project and destination writes.
2
2
 
3
- The console intentionally does not execute shell commands. It uses the same
4
- project-scoped Control API commands as the CLI, keeps tokens only in memory,
5
- and stores no history on disk.
3
+ The console never executes shell commands, retains tokens only in memory,
4
+ and stores no command history on disk.
6
5
  """
7
6
 
8
7
  from __future__ import annotations
@@ -25,11 +24,11 @@ from typer.main import get_command
25
24
  from . import main as cli
26
25
 
27
26
  # Only these typed commands may execute through the console.
28
- # Future write actions must be explicitly reviewed, not implicitly unlocked.
29
- READ_COMMANDS: dict[str, set[str]] = {
27
+ # Write actions are intentionally allowlisted, never automatically unlocked.
28
+ ALLOWED_COMMANDS: dict[str, set[str]] = {
30
29
  "auth": {"status"},
31
- "projects": {"list", "use"},
32
- "destinations": {"list"},
30
+ "projects": {"list", "use", "create", "update"},
31
+ "destinations": {"list", "create", "update"},
33
32
  "keys": {"list"},
34
33
  "events": {"list", "show"},
35
34
  "billing": {"status", "history"},
@@ -38,7 +37,7 @@ READ_COMMANDS: dict[str, set[str]] = {
38
37
  }
39
38
  ROOT_COMMANDS = {"status", "stats"}
40
39
 
41
- # Aliases that feel like a familiar operator console, but remain read-only.
40
+ # Aliases that feel like a familiar operator console.
42
41
  SHOW_TARGETS: dict[str, tuple[str, ...] | None] = {
43
42
  "options": None,
44
43
  "projects": ("projects", "list"),
@@ -72,6 +71,8 @@ COMMAND_COMPLETIONS = sorted(
72
71
  *SAFE_HISTORY_COMMANDS,
73
72
  "use ", "projects use ", "events show ", "events list --status ",
74
73
  "events list --origin ", "events list --page ", "set project ",
74
+ "projects create --name ", "projects update ",
75
+ "destinations create --name ", "destinations update ",
75
76
  "set env ", "json ", "show ", "auth ",
76
77
  }
77
78
  )
@@ -194,6 +195,8 @@ class HookstrideConsole:
194
195
  "[bold]help[/bold] Show console help\n"
195
196
  "[bold]show options[/bold] Display environment, project and authentication\n"
196
197
  "[bold]show projects[/bold] List accessible projects\n"
198
+ "[bold]projects create --name N --account UUID[/bold] Create a project\n"
199
+ "[bold]projects update UUID --name N[/bold] Rename a project\n"
197
200
  "[bold]use UUID[/bold] Select a project (also saves preference)\n"
198
201
  "[bold]back[/bold] Leave the active project context\n"
199
202
  "[bold]set env dev[/bold] Switch to development API\n"
@@ -202,6 +205,8 @@ class HookstrideConsole:
202
205
  "[bold]auth logout[/bold] Clear the current environment's session token\n"
203
206
  "[bold]auth status[/bold] Validate current token\n"
204
207
  "[bold]show destinations[/bold] Inspect outgoing webhooks\n"
208
+ "[bold]destinations create --name N --url HTTPS_URL[/bold] Add receiver\n"
209
+ "[bold]destinations update UUID --pause[/bold] Pause a receiver\n"
205
210
  "[bold]show events[/bold] View recent events\n"
206
211
  "[bold]events list --status failed[/bold] Filter delivery history\n"
207
212
  "[bold]events show UUID[/bold] Inspect a delivery and attempts\n"
@@ -223,7 +228,6 @@ class HookstrideConsole:
223
228
  ["API", self.session.origin],
224
229
  ["Project", project],
225
230
  ["Authenticated token", "configured" if self._current_token() else "missing"],
226
- ["Mode", "read-only"],
227
231
  ]
228
232
  cli._table(_FakeContext(self.session), "Session options", ["Setting", "Value"], rows)
229
233
 
@@ -294,7 +298,7 @@ class HookstrideConsole:
294
298
  self._write("[green]✓[/green] Signed out for this console environment.")
295
299
 
296
300
  def _execute_cli(self, args: list[str], *, json_output: bool = False) -> None:
297
- """Invoke existing read-only Click/Typer commands, never a shell."""
301
+ """Invoke explicitly allowed Click/Typer commands, never a shell."""
298
302
  if not _allowed_cli(args):
299
303
  raise cli.CLIError("Unknown or unavailable command. Type 'help'.")
300
304
  group = args[0]
@@ -382,7 +386,7 @@ class HookstrideConsole:
382
386
 
383
387
  def run(self) -> None:
384
388
  self._write(
385
- "\n[bold cyan]HOOKSTRIDE[/bold cyan] [dim]CONSOLE v0.2[/dim]\n"
389
+ f"\n[bold cyan]HOOKSTRIDE[/bold cyan] [dim]CONSOLE v{cli.VERSION}[/dim]\n"
386
390
  "[dim]Type 'help' for commands, 'auth login' for a token, "
387
391
  "or 'exit' to quit.[/dim]\n"
388
392
  )
@@ -431,8 +435,8 @@ def _allowed_cli(parts: list[str]) -> bool:
431
435
  return len(parts) == 1
432
436
  return (
433
437
  len(parts) >= 2
434
- and parts[0] in READ_COMMANDS
435
- and parts[1] in READ_COMMANDS[parts[0]]
438
+ and parts[0] in ALLOWED_COMMANDS
439
+ and parts[1] in ALLOWED_COMMANDS[parts[0]]
436
440
  )
437
441
 
438
442