tunnelhook 0.1.0
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.
- package/README.md +64 -0
- package/package.json +44 -0
- package/src/index.tsx +1739 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# tunnelhook
|
|
2
|
+
|
|
3
|
+
A CLI tool for receiving and forwarding webhooks to your local development server.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- [Bun](https://bun.sh) runtime (v1.0.0+)
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun add -g tunnelhook
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Login
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
tunnelhook login
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Forward webhooks
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
tunnelhook <slug> --forward <url>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For example:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
tunnelhook stripe-dev --forward http://localhost:3000/webhook
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This will:
|
|
36
|
+
1. Create the endpoint `stripe-dev` if it doesn't exist
|
|
37
|
+
2. Register your machine as a listener
|
|
38
|
+
3. Forward any incoming webhooks to `http://localhost:3000/webhook`
|
|
39
|
+
|
|
40
|
+
Your webhook URL will be:
|
|
41
|
+
```
|
|
42
|
+
https://tunnelhook-server-shkumbinhasani.shkumbinhasani20001439.workers.dev/hooks/stripe-dev
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Interactive mode
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
tunnelhook
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Opens the full TUI with endpoint selection, machine setup, and live monitoring.
|
|
52
|
+
|
|
53
|
+
### Options
|
|
54
|
+
|
|
55
|
+
- `--forward <url>` -- Local URL to forward webhooks to
|
|
56
|
+
- `--machine <name>` -- Custom machine name (defaults to hostname)
|
|
57
|
+
|
|
58
|
+
### Environment
|
|
59
|
+
|
|
60
|
+
- `TUNNELHOOK_SERVER_URL` -- Override the server URL (defaults to production)
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tunnelhook",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CLI tool for receiving and forwarding webhooks via TunnelHook",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "src/index.tsx",
|
|
7
|
+
"bin": {
|
|
8
|
+
"tunnelhook": "src/index.tsx"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "bun run --watch src/index.tsx"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"webhook",
|
|
18
|
+
"tunnel",
|
|
19
|
+
"cli",
|
|
20
|
+
"tui",
|
|
21
|
+
"hookdeck",
|
|
22
|
+
"ngrok",
|
|
23
|
+
"relay",
|
|
24
|
+
"forward"
|
|
25
|
+
],
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"engines": {
|
|
28
|
+
"bun": ">=1.0.0"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@opentui/core": "^0.1.79",
|
|
32
|
+
"@opentui/react": "^0.1.79",
|
|
33
|
+
"@orpc/client": "^1.12.2",
|
|
34
|
+
"react": "^19.2.4"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@tunnelhook/api": "workspace:*",
|
|
38
|
+
"@types/bun": "latest",
|
|
39
|
+
"@types/react": "^19.2.14"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"typescript": "^5"
|
|
43
|
+
}
|
|
44
|
+
}
|