devdoor 0.1.0__tar.gz → 0.2.1__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 (48) hide show
  1. {devdoor-0.1.0 → devdoor-0.2.1}/PKG-INFO +53 -15
  2. {devdoor-0.1.0 → devdoor-0.2.1}/README.md +52 -14
  3. {devdoor-0.1.0 → devdoor-0.2.1}/pyproject.toml +1 -1
  4. {devdoor-0.1.0 → devdoor-0.2.1}/pyproject.toml.orig +1 -1
  5. devdoor-0.2.1/src/devdoor/__init__.py +16 -0
  6. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/cli/app.py +35 -1
  7. devdoor-0.2.1/src/devdoor/cli/auth.py +321 -0
  8. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/cli/domains.py +76 -28
  9. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/cli/inspector.py +29 -8
  10. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/cli/local.py +569 -88
  11. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/cli/share.py +266 -31
  12. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/cli/validators.py +2 -0
  13. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/core/config.py +156 -10
  14. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/core/engine.py +57 -17
  15. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/core/events.py +53 -4
  16. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/core/router.py +23 -2
  17. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/inspector/curl.py +29 -2
  18. devdoor-0.2.1/src/devdoor/inspector/daemon_hook.py +234 -0
  19. devdoor-0.2.1/src/devdoor/inspector/replay.py +253 -0
  20. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/inspector/store.py +110 -71
  21. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/platform/__init__.py +8 -1
  22. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/platform/base.py +23 -5
  23. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/platform/darwin.py +93 -16
  24. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/platform/linux.py +21 -8
  25. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/platform/windows.py +59 -7
  26. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/proxy/forwarder.py +218 -39
  27. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/tui/inspector_app.py +125 -18
  28. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/tunnel/auth_client.py +171 -28
  29. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/tunnel/client.py +84 -17
  30. devdoor-0.2.1/src/devdoor/tunnel/mux.py +856 -0
  31. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/tunnel/relay_api.py +109 -10
  32. devdoor-0.1.0/src/devdoor/__init__.py +0 -6
  33. devdoor-0.1.0/src/devdoor/cli/auth.py +0 -178
  34. devdoor-0.1.0/src/devdoor/inspector/daemon_hook.py +0 -147
  35. devdoor-0.1.0/src/devdoor/inspector/replay.py +0 -122
  36. devdoor-0.1.0/src/devdoor/tunnel/mux.py +0 -566
  37. {devdoor-0.1.0 → devdoor-0.2.1}/LICENSE +0 -0
  38. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/__main__.py +0 -0
  39. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/cli/__init__.py +0 -0
  40. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/core/__init__.py +0 -0
  41. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/core/protocol.py +0 -0
  42. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/inspector/__init__.py +0 -0
  43. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/proxy/__init__.py +0 -0
  44. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/proxy/certs.py +0 -0
  45. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/proxy/https_server.py +0 -0
  46. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/tui/__init__.py +0 -0
  47. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/tunnel/__init__.py +0 -0
  48. {devdoor-0.1.0 → devdoor-0.2.1}/src/devdoor/tunnel/httperr.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devdoor
3
- Version: 0.1.0
3
+ Version: 0.2.1
4
4
  Summary: Open-source local HTTPS domain proxy, streaming tunnel client, and TUI inspector
5
5
  Keywords: https,local-development,reverse-proxy,tunnel,websocket,tui
6
6
  Author: Dipak Rathod
@@ -51,7 +51,7 @@ Description-Content-Type: text/markdown
51
51
  myapp.test → localhost:3000
52
52
  myapp.test/api → localhost:8080
53
53
  dashboard.test → localhost:5173
54
- share --port 3000 → https://brisk-otter.devdoor.dev (streaming SSE + WebSockets + replay)
54
+ share --port 3000 → https://brisk-otter.relay.dipakrathod.me (streaming SSE + WebSockets + replay)
55
55
  ```
56
56
 
57
57
  ## Why DevDoor?
@@ -63,12 +63,11 @@ share --port 3000 → https://brisk-otter.devdoor.dev (streaming SSE + WebSocke
63
63
 
64
64
  ## Installation
65
65
 
66
- > **Note:** Not yet published on PyPI—install directly from GitHub or a local source clone.
67
-
68
66
  Requires **Python 3.15+** and [`uv`](https://docs.astral.sh/uv/) (or `pipx`):
69
67
 
70
68
  ```bash
71
- uv tool install git+https://github.com/dipakrathod-tech/DevDoor.git
69
+ uv tool install devdoor
70
+ # or: pipx install devdoor
72
71
  ```
73
72
 
74
73
  Or run from a source checkout:
@@ -93,7 +92,7 @@ Expose a local server (or multi-route project) to the internet:
93
92
 
94
93
  ```bash
95
94
  devdoor share --port 3000
96
- # https://brisk-otter.devdoor.dev → localhost:3000
95
+ # https://brisk-otter.relay.dipakrathod.me → localhost:3000
97
96
  ```
98
97
 
99
98
  ## Local HTTPS Domains
@@ -108,11 +107,11 @@ devdoor stop myapp # stop one domain
108
107
  devdoor stop # stop all domains
109
108
  ```
110
109
 
111
- Bare names default to `.test` on macOS/Linux (or `.localhost` in zero-admin Windows mode). You can specify any custom TLD explicitly:
110
+ Bare names default to `.test` on macOS/Linux (or `.localhost` in zero-admin Windows mode; override globally with `devdoor config set default-tld ...`). You can specify any custom TLD or upstream host explicitly:
112
111
 
113
112
  ```bash
114
- devdoor start app.loc --port 3000 # https://app.loc → localhost:3000
115
- devdoor start my.demo --port 4000 # https://my.demo → localhost:4000
113
+ devdoor start app.loc --port 3000 # https://app.loc -> 127.0.0.1:3000
114
+ devdoor start my.demo --port 4000 --host ::1 # https://my.demo -> [::1]:4000
116
115
  ```
117
116
 
118
117
  > **Note:** Avoid `.local`—it is reserved for mDNS and can cause slow DNS lookups on macOS and Linux.
@@ -121,6 +120,7 @@ Route multiple URL paths under one domain:
121
120
 
122
121
  ```bash
123
122
  devdoor start myapp --port 3000 --route /api=8080 --route /ws=9000 --cors
123
+ devdoor start myapp --port 3000 --no-cors
124
124
  ```
125
125
 
126
126
  Or declare services in `devdoor.yaml` (or `.devdoor.yaml`) at your project root:
@@ -146,26 +146,41 @@ devdoor down # stop project services only
146
146
 
147
147
  ## Internet Sharing & Self-Hosting
148
148
 
149
+ By default, DevDoor connects to the official hosted relay at `https://relay.dipakrathod.me`—override it anytime with `--relay`, `DEVDOOR_RELAY_URL`, or `devdoor config set relay` to point at your own self-hosted `devdoor-relay` server.
150
+
149
151
  Authenticate via browser OAuth (`GitHub` / `OIDC`) or an API token, then share a local port or a `devdoor.yaml` multi-route service:
150
152
 
151
153
  ```bash
152
154
  devdoor login # browser OAuth device flow
153
155
  devdoor login --token dd_your_api_token # headless / CI / self-hosted token
156
+ printf '%s\n' "$DEVDOOR_TOKEN" | devdoor login --token-stdin # read token without shell history
154
157
  devdoor logout # clear stored local credentials
155
158
  devdoor config set relay https://tunnel.example.com # point to your own devdoor-relay
156
- devdoor config show # inspect current config
159
+ devdoor config set upstream-host ::1 # default upstream host (default: 127.0.0.1)
160
+ devdoor config set control-port 19500 # fixed loopback control port (0 = ephemeral)
161
+ devdoor config set connect-timeout 5.0 # upstream TCP connect timeout (seconds)
162
+ devdoor config set max-exchanges 1000 # bounded inspector.db history size
163
+ devdoor config set cors-origins https://app.example.com # default public CORS allowlist
164
+ devdoor config unset cors-origins # clear optional setting back to default
165
+ devdoor config set record-secrets false # default: redact Cookie/Authorization at capture
166
+ devdoor config show # inspect current config & relay source
157
167
 
158
168
  devdoor share --port 3000 # random subdomain
159
169
  devdoor share myapp # share multi-route devdoor.yaml service
170
+ devdoor share --port 3000 --host ::1 # forward tunnel traffic to non-IPv4 loopback
160
171
  devdoor share --port 3000 --subdomain demo # reserved vanity subdomain
161
- devdoor share --port 3000 --password secret # password-protected tunnel (HTTP Basic Auth)
172
+ devdoor share --port 3000 --password-stdin # read Basic Auth passphrase from stdin (or DEVDOOR_SHARE_PASSWORD)
162
173
  devdoor share --port 3000 --ttl 30m # auto-expire after 30 minutes
163
174
  devdoor share --port 3000 --domain api.example.com # verified custom domain
164
175
  devdoor share --port 3000 --preserve-host # preserve incoming public Host header
165
- devdoor share --port 3000 --cors # inject dev CORS headers
176
+ devdoor share --port 3000 --cors # non-credentialed wildcard CORS (*)
177
+ devdoor share --port 3000 --cors-origin https://app.example.com # credentialed CORS allowlist
166
178
  devdoor share --port 3000 --tui # live Textual inspector during share
179
+ devdoor list --relay https://tunnel.example.com # inspect local domains + relay tunnels
167
180
  ```
168
181
 
182
+ Non-loopback relay endpoints require `https://` (`wss://` for `/ws/tunnel`) by default; pass `--allow-insecure-relay` (or set `DEVDOOR_ALLOW_INSECURE_RELAY=1`) only on trusted private networks. Captured traffic in `inspector.db` respects `log_mode` (`full` / `minimal` / `off`) and redacts `Authorization`, `Cookie`, `Set-Cookie`, `Proxy-Authorization`, and `X-Api-Key` headers at capture time unless `--record-secrets` or `devdoor config set record-secrets true` is enabled.
183
+
169
184
  Manage verified custom domains and reserved vanity subdomains:
170
185
 
171
186
  ```bash
@@ -183,7 +198,7 @@ devdoor subdomain release demo
183
198
  Random-subdomain tunnels display a one-time interstitial notice on browser page loads to protect shared relay domains. It is skipped automatically for vanity subdomains, custom domains, password-protected tunnels, and programmatic HTTP clients (`curl`, webhooks, `fetch`/XHR, CORS preflights, WebSockets). Browser-like scripts can also bypass it explicitly:
184
199
 
185
200
  ```bash
186
- curl -H "DevDoor-Skip-Browser-Warning: 1" https://brisk-otter.devdoor.dev/
201
+ curl -H "DevDoor-Skip-Browser-Warning: 1" https://brisk-otter.relay.dipakrathod.me/
187
202
  ```
188
203
 
189
204
  ## Request Inspector, Logs & Diagnostics
@@ -199,11 +214,34 @@ devdoor logs --follow myapp # tail logs for one domain (-f)
199
214
  devdoor logs --flush # clear stored logs from inspector.db
200
215
 
201
216
  devdoor doctor # verify CA, trust store, port forwarding, hosts, certs
217
+ devdoor reset --dry-run # preview OS cleanup without modifying files
218
+ devdoor reset # safely undo OS changes & domains (keeps login & inspector.db)
219
+ devdoor reset --all # also remove auth.json, config.yaml, and inspector.db
202
220
  devdoor upgrade # upgrade devdoor via uv/pipx/pip (alias: update)
203
- devdoor version # print version and Python runtime
204
- devdoor uninstall # remove CA, trust, hosts entries, firewall rules, ~/.devdoor
221
+ devdoor version # print version and Python runtime (or -v / --version)
222
+ devdoor uninstall # full OS undo + remove DevDoor files under ~/.devdoor
205
223
  ```
206
224
 
225
+ ### Safely Undoing System Changes (`reset` / Manual Fallback)
226
+
227
+ Always run `devdoor reset` (or `devdoor uninstall`) **before** removing the package with `uv tool uninstall devdoor` or `pip uninstall devdoor`. `devdoor reset` probes each subsystem first, validates `/etc/pf.conf` before reloading on macOS, only deletes `# devdoor` entries in `/etc/hosts` and DevDoor-owned port-forwarding rules, and preserves `~/.devdoor/ca/` if an OS step fails so you can retry cleanly.
228
+
229
+ If you already removed the CLI binary before resetting:
230
+
231
+ - **macOS:** Remove `# devdoor` lines from `/etc/hosts`, remove `com.devdoor` anchor lines from `/etc/pf.conf`, delete `/etc/pf.anchors/com.devdoor`, run `sudo pfctl -a com.devdoor -F all && sudo pfctl -vnf /etc/pf.conf && sudo pfctl -f /etc/pf.conf`, and run `sudo security delete-certificate -t -c "DevDoor Root CA" /Library/Keychains/System.keychain`.
232
+ - **Linux:** Remove `# devdoor` lines from `/etc/hosts`, delete `/usr/local/share/ca-certificates/devdoor.crt` (or `/etc/pki/ca-trust/source/anchors/devdoor.crt`) and refresh trust (`sudo update-ca-certificates --fresh` or `sudo update-ca-trust extract`), and delete only the `DEVDOOR` `iptables -t nat` chain or `ip devdoor` `nft` table.
233
+ - **Windows:** Run `certutil -user -delstore Root "DevDoor Root CA"`, remove `# devdoor` lines from `%SystemRoot%\System32\drivers\etc\hosts`, and delete DevDoor `netsh interface portproxy` rules (`connectport=10080` / `10443`) if elevated `.test` mode was used.
234
+
235
+ ## Documentation
236
+
237
+ Browse the full client documentation index in [docs/README.md](docs/README.md):
238
+
239
+ - [Configuration & CLI Reference](docs/configuration-and-cli.md) — Environment variables, `~/.devdoor` state layout, `devdoor config` keys, `devdoor.yaml` schema, CLI flags, and TUI keybindings
240
+ - [How-To Guides](docs/guides.md) — Multi-service setups, CORS recipes, password-protected webhooks, targeting custom relays, and request replay workflows
241
+ - [Architecture](docs/architecture.md) — Client module boundaries, daemon/tunnel traffic flows, wire framing, and privacy design
242
+ - [Troubleshooting & Recovery](docs/troubleshooting.md) — `devdoor doctor` diagnostics, browser/OS trust notes, firewall/port conflicts, and safe reset / manual cleanup
243
+ - [Architecture Decision Records (ADRs)](docs/decisions/) — Client design decisions (`ADR-001`–`ADR-006`)
244
+
207
245
  ## Contributing
208
246
 
209
247
  Contributions are welcome! Please read the [Contributing Guide](CONTRIBUTING.md), follow the [Code of Conduct](CODE_OF_CONDUCT.md), and adhere to [CONSTRAINTS.md](CONSTRAINTS.md).
@@ -16,7 +16,7 @@
16
16
  myapp.test → localhost:3000
17
17
  myapp.test/api → localhost:8080
18
18
  dashboard.test → localhost:5173
19
- share --port 3000 → https://brisk-otter.devdoor.dev (streaming SSE + WebSockets + replay)
19
+ share --port 3000 → https://brisk-otter.relay.dipakrathod.me (streaming SSE + WebSockets + replay)
20
20
  ```
21
21
 
22
22
  ## Why DevDoor?
@@ -28,12 +28,11 @@ share --port 3000 → https://brisk-otter.devdoor.dev (streaming SSE + WebSocke
28
28
 
29
29
  ## Installation
30
30
 
31
- > **Note:** Not yet published on PyPI—install directly from GitHub or a local source clone.
32
-
33
31
  Requires **Python 3.15+** and [`uv`](https://docs.astral.sh/uv/) (or `pipx`):
34
32
 
35
33
  ```bash
36
- uv tool install git+https://github.com/dipakrathod-tech/DevDoor.git
34
+ uv tool install devdoor
35
+ # or: pipx install devdoor
37
36
  ```
38
37
 
39
38
  Or run from a source checkout:
@@ -58,7 +57,7 @@ Expose a local server (or multi-route project) to the internet:
58
57
 
59
58
  ```bash
60
59
  devdoor share --port 3000
61
- # https://brisk-otter.devdoor.dev → localhost:3000
60
+ # https://brisk-otter.relay.dipakrathod.me → localhost:3000
62
61
  ```
63
62
 
64
63
  ## Local HTTPS Domains
@@ -73,11 +72,11 @@ devdoor stop myapp # stop one domain
73
72
  devdoor stop # stop all domains
74
73
  ```
75
74
 
76
- Bare names default to `.test` on macOS/Linux (or `.localhost` in zero-admin Windows mode). You can specify any custom TLD explicitly:
75
+ Bare names default to `.test` on macOS/Linux (or `.localhost` in zero-admin Windows mode; override globally with `devdoor config set default-tld ...`). You can specify any custom TLD or upstream host explicitly:
77
76
 
78
77
  ```bash
79
- devdoor start app.loc --port 3000 # https://app.loc → localhost:3000
80
- devdoor start my.demo --port 4000 # https://my.demo → localhost:4000
78
+ devdoor start app.loc --port 3000 # https://app.loc -> 127.0.0.1:3000
79
+ devdoor start my.demo --port 4000 --host ::1 # https://my.demo -> [::1]:4000
81
80
  ```
82
81
 
83
82
  > **Note:** Avoid `.local`—it is reserved for mDNS and can cause slow DNS lookups on macOS and Linux.
@@ -86,6 +85,7 @@ Route multiple URL paths under one domain:
86
85
 
87
86
  ```bash
88
87
  devdoor start myapp --port 3000 --route /api=8080 --route /ws=9000 --cors
88
+ devdoor start myapp --port 3000 --no-cors
89
89
  ```
90
90
 
91
91
  Or declare services in `devdoor.yaml` (or `.devdoor.yaml`) at your project root:
@@ -111,26 +111,41 @@ devdoor down # stop project services only
111
111
 
112
112
  ## Internet Sharing & Self-Hosting
113
113
 
114
+ By default, DevDoor connects to the official hosted relay at `https://relay.dipakrathod.me`—override it anytime with `--relay`, `DEVDOOR_RELAY_URL`, or `devdoor config set relay` to point at your own self-hosted `devdoor-relay` server.
115
+
114
116
  Authenticate via browser OAuth (`GitHub` / `OIDC`) or an API token, then share a local port or a `devdoor.yaml` multi-route service:
115
117
 
116
118
  ```bash
117
119
  devdoor login # browser OAuth device flow
118
120
  devdoor login --token dd_your_api_token # headless / CI / self-hosted token
121
+ printf '%s\n' "$DEVDOOR_TOKEN" | devdoor login --token-stdin # read token without shell history
119
122
  devdoor logout # clear stored local credentials
120
123
  devdoor config set relay https://tunnel.example.com # point to your own devdoor-relay
121
- devdoor config show # inspect current config
124
+ devdoor config set upstream-host ::1 # default upstream host (default: 127.0.0.1)
125
+ devdoor config set control-port 19500 # fixed loopback control port (0 = ephemeral)
126
+ devdoor config set connect-timeout 5.0 # upstream TCP connect timeout (seconds)
127
+ devdoor config set max-exchanges 1000 # bounded inspector.db history size
128
+ devdoor config set cors-origins https://app.example.com # default public CORS allowlist
129
+ devdoor config unset cors-origins # clear optional setting back to default
130
+ devdoor config set record-secrets false # default: redact Cookie/Authorization at capture
131
+ devdoor config show # inspect current config & relay source
122
132
 
123
133
  devdoor share --port 3000 # random subdomain
124
134
  devdoor share myapp # share multi-route devdoor.yaml service
135
+ devdoor share --port 3000 --host ::1 # forward tunnel traffic to non-IPv4 loopback
125
136
  devdoor share --port 3000 --subdomain demo # reserved vanity subdomain
126
- devdoor share --port 3000 --password secret # password-protected tunnel (HTTP Basic Auth)
137
+ devdoor share --port 3000 --password-stdin # read Basic Auth passphrase from stdin (or DEVDOOR_SHARE_PASSWORD)
127
138
  devdoor share --port 3000 --ttl 30m # auto-expire after 30 minutes
128
139
  devdoor share --port 3000 --domain api.example.com # verified custom domain
129
140
  devdoor share --port 3000 --preserve-host # preserve incoming public Host header
130
- devdoor share --port 3000 --cors # inject dev CORS headers
141
+ devdoor share --port 3000 --cors # non-credentialed wildcard CORS (*)
142
+ devdoor share --port 3000 --cors-origin https://app.example.com # credentialed CORS allowlist
131
143
  devdoor share --port 3000 --tui # live Textual inspector during share
144
+ devdoor list --relay https://tunnel.example.com # inspect local domains + relay tunnels
132
145
  ```
133
146
 
147
+ Non-loopback relay endpoints require `https://` (`wss://` for `/ws/tunnel`) by default; pass `--allow-insecure-relay` (or set `DEVDOOR_ALLOW_INSECURE_RELAY=1`) only on trusted private networks. Captured traffic in `inspector.db` respects `log_mode` (`full` / `minimal` / `off`) and redacts `Authorization`, `Cookie`, `Set-Cookie`, `Proxy-Authorization`, and `X-Api-Key` headers at capture time unless `--record-secrets` or `devdoor config set record-secrets true` is enabled.
148
+
134
149
  Manage verified custom domains and reserved vanity subdomains:
135
150
 
136
151
  ```bash
@@ -148,7 +163,7 @@ devdoor subdomain release demo
148
163
  Random-subdomain tunnels display a one-time interstitial notice on browser page loads to protect shared relay domains. It is skipped automatically for vanity subdomains, custom domains, password-protected tunnels, and programmatic HTTP clients (`curl`, webhooks, `fetch`/XHR, CORS preflights, WebSockets). Browser-like scripts can also bypass it explicitly:
149
164
 
150
165
  ```bash
151
- curl -H "DevDoor-Skip-Browser-Warning: 1" https://brisk-otter.devdoor.dev/
166
+ curl -H "DevDoor-Skip-Browser-Warning: 1" https://brisk-otter.relay.dipakrathod.me/
152
167
  ```
153
168
 
154
169
  ## Request Inspector, Logs & Diagnostics
@@ -164,11 +179,34 @@ devdoor logs --follow myapp # tail logs for one domain (-f)
164
179
  devdoor logs --flush # clear stored logs from inspector.db
165
180
 
166
181
  devdoor doctor # verify CA, trust store, port forwarding, hosts, certs
182
+ devdoor reset --dry-run # preview OS cleanup without modifying files
183
+ devdoor reset # safely undo OS changes & domains (keeps login & inspector.db)
184
+ devdoor reset --all # also remove auth.json, config.yaml, and inspector.db
167
185
  devdoor upgrade # upgrade devdoor via uv/pipx/pip (alias: update)
168
- devdoor version # print version and Python runtime
169
- devdoor uninstall # remove CA, trust, hosts entries, firewall rules, ~/.devdoor
186
+ devdoor version # print version and Python runtime (or -v / --version)
187
+ devdoor uninstall # full OS undo + remove DevDoor files under ~/.devdoor
170
188
  ```
171
189
 
190
+ ### Safely Undoing System Changes (`reset` / Manual Fallback)
191
+
192
+ Always run `devdoor reset` (or `devdoor uninstall`) **before** removing the package with `uv tool uninstall devdoor` or `pip uninstall devdoor`. `devdoor reset` probes each subsystem first, validates `/etc/pf.conf` before reloading on macOS, only deletes `# devdoor` entries in `/etc/hosts` and DevDoor-owned port-forwarding rules, and preserves `~/.devdoor/ca/` if an OS step fails so you can retry cleanly.
193
+
194
+ If you already removed the CLI binary before resetting:
195
+
196
+ - **macOS:** Remove `# devdoor` lines from `/etc/hosts`, remove `com.devdoor` anchor lines from `/etc/pf.conf`, delete `/etc/pf.anchors/com.devdoor`, run `sudo pfctl -a com.devdoor -F all && sudo pfctl -vnf /etc/pf.conf && sudo pfctl -f /etc/pf.conf`, and run `sudo security delete-certificate -t -c "DevDoor Root CA" /Library/Keychains/System.keychain`.
197
+ - **Linux:** Remove `# devdoor` lines from `/etc/hosts`, delete `/usr/local/share/ca-certificates/devdoor.crt` (or `/etc/pki/ca-trust/source/anchors/devdoor.crt`) and refresh trust (`sudo update-ca-certificates --fresh` or `sudo update-ca-trust extract`), and delete only the `DEVDOOR` `iptables -t nat` chain or `ip devdoor` `nft` table.
198
+ - **Windows:** Run `certutil -user -delstore Root "DevDoor Root CA"`, remove `# devdoor` lines from `%SystemRoot%\System32\drivers\etc\hosts`, and delete DevDoor `netsh interface portproxy` rules (`connectport=10080` / `10443`) if elevated `.test` mode was used.
199
+
200
+ ## Documentation
201
+
202
+ Browse the full client documentation index in [docs/README.md](docs/README.md):
203
+
204
+ - [Configuration & CLI Reference](docs/configuration-and-cli.md) — Environment variables, `~/.devdoor` state layout, `devdoor config` keys, `devdoor.yaml` schema, CLI flags, and TUI keybindings
205
+ - [How-To Guides](docs/guides.md) — Multi-service setups, CORS recipes, password-protected webhooks, targeting custom relays, and request replay workflows
206
+ - [Architecture](docs/architecture.md) — Client module boundaries, daemon/tunnel traffic flows, wire framing, and privacy design
207
+ - [Troubleshooting & Recovery](docs/troubleshooting.md) — `devdoor doctor` diagnostics, browser/OS trust notes, firewall/port conflicts, and safe reset / manual cleanup
208
+ - [Architecture Decision Records (ADRs)](docs/decisions/) — Client design decisions (`ADR-001`–`ADR-006`)
209
+
172
210
  ## Contributing
173
211
 
174
212
  Contributions are welcome! Please read the [Contributing Guide](CONTRIBUTING.md), follow the [Code of Conduct](CODE_OF_CONDUCT.md), and adhere to [CONSTRAINTS.md](CONSTRAINTS.md).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devdoor"
3
- version = "0.1.0"
3
+ version = "0.2.1"
4
4
  description = "Open-source local HTTPS domain proxy, streaming tunnel client, and TUI inspector"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devdoor"
3
- version = "0.1.0"
3
+ version = "0.2.1"
4
4
  description = "Open-source local HTTPS domain proxy, streaming tunnel client, and TUI inspector"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -0,0 +1,16 @@
1
+ """DevDoor open-source local HTTPS proxy, streaming tunnel, and TUI inspector."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from importlib.metadata import PackageNotFoundError, version
6
+
7
+
8
+ def _resolve_version() -> str:
9
+ try:
10
+ return version("devdoor")
11
+ except PackageNotFoundError:
12
+ return "0.2.1"
13
+
14
+
15
+ __version__ = _resolve_version()
16
+ __all__ = ["__version__"]
@@ -6,6 +6,7 @@ import platform
6
6
  import shutil
7
7
  import subprocess
8
8
  from collections.abc import Callable
9
+ from typing import Annotated
9
10
 
10
11
  import typer
11
12
 
@@ -18,19 +19,51 @@ from devdoor.cli.local import (
18
19
  doctor_command,
19
20
  down_command,
20
21
  list_command,
22
+ reset_command,
21
23
  start_command,
22
24
  stop_command,
23
25
  uninstall_command,
24
26
  up_command,
25
27
  )
26
28
  from devdoor.cli.share import share_command
29
+ from devdoor.cli.validators import CLI_CONTEXT_SETTINGS
27
30
 
28
31
  app = typer.Typer(
29
32
  name="devdoor",
30
33
  help="Open-source local HTTPS domain proxy, streaming tunnel, and TUI inspector.",
31
34
  no_args_is_help=True,
35
+ context_settings=CLI_CONTEXT_SETTINGS,
32
36
  )
33
37
 
38
+
39
+ def _format_version() -> str:
40
+ return f"devdoor {__version__} (Python {platform.python_version()})"
41
+
42
+
43
+ def _version_callback(value: bool) -> None:
44
+ if value:
45
+ typer.echo(_format_version())
46
+ raise typer.Exit()
47
+
48
+
49
+ @app.callback()
50
+ def root_callback(
51
+ version: Annotated[
52
+ bool,
53
+ typer.Option(
54
+ "--version",
55
+ "-v",
56
+ "-V",
57
+ callback=_version_callback,
58
+ is_eager=True,
59
+ help="Print installed DevDoor version and exit.",
60
+ ),
61
+ ] = False,
62
+ ) -> None:
63
+ """DevDoor CLI entrypoint."""
64
+ del version
65
+
66
+
34
67
  app.command("start")(start_command)
35
68
  app.command("stop")(stop_command)
36
69
  app.command("up")(up_command)
@@ -38,6 +71,7 @@ app.command("down")(down_command)
38
71
  app.command("list")(list_command)
39
72
  app.command("ls")(list_command)
40
73
  app.command("doctor")(doctor_command)
74
+ app.command("reset")(reset_command)
41
75
  app.command("uninstall")(uninstall_command)
42
76
  app.command("login")(login_command)
43
77
  app.command("logout")(logout_command)
@@ -53,7 +87,7 @@ app.add_typer(subdomain_app, name="subdomain")
53
87
  @app.command("version")
54
88
  def version_command() -> None:
55
89
  """Print installed DevDoor version and Python runtime."""
56
- typer.echo(f"devdoor {__version__} (Python {platform.python_version()})")
90
+ typer.echo(_format_version())
57
91
 
58
92
 
59
93
  def detect_upgrade_command(