@zeroexcore/tuna 0.1.0 → 0.1.1

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,14 +1,14 @@
1
1
 
2
- > @zeroexcore/tuna@0.1.0 test /home/runner/work/tuna/tuna/packages/cli
2
+ > @zeroexcore/tuna@0.1.1 test /home/runner/work/tuna/tuna/packages/cli
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.0.18 /home/runner/work/tuna/tuna/packages/cli
7
7
 
8
- ✓ tests/unit/config.test.ts (23 tests) 9ms
8
+ ✓ tests/unit/config.test.ts (23 tests) 8ms
9
9
 
10
10
   Test Files  1 passed (1)
11
11
   Tests  23 passed (23)
12
-  Start at  07:11:47
13
-  Duration  198ms (transform 47ms, setup 0ms, import 66ms, tests 9ms, environment 0ms)
12
+  Start at  07:15:46
13
+  Duration  184ms (transform 48ms, setup 0ms, import 66ms, tests 8ms, environment 0ms)
14
14
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @zeroexcore/tuna@0.1.0 typecheck /home/runner/work/tuna/tuna/packages/cli
2
+ > @zeroexcore/tuna@0.1.1 typecheck /home/runner/work/tuna/tuna/packages/cli
3
3
  > tsc --noEmit
4
4
 
package/README.md ADDED
@@ -0,0 +1,161 @@
1
+ # @zeroexcore/tuna
2
+
3
+ **Cloudflare Tunnels for humans.** Wrap any dev command with a secure, persistent tunnel.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@zeroexcore/tuna.svg)](https://www.npmjs.com/package/@zeroexcore/tuna)
6
+ [![CI](https://github.com/zeroexcore/tuna/actions/workflows/ci.yml/badge.svg)](https://github.com/zeroexcore/tuna/actions/workflows/ci.yml)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ ## Links
10
+
11
+ - **Website:** [tuna.oxc.sh](https://tuna.oxc.sh)
12
+ - **Documentation:** [docs.tuna.oxc.sh](https://docs.tuna.oxc.sh)
13
+ - **GitHub:** [github.com/zeroexcore/tuna](https://github.com/zeroexcore/tuna)
14
+
15
+ ## What is tuna?
16
+
17
+ tuna wraps your development server commands with automatic Cloudflare Tunnel setup. No more manual tunnel configuration, DNS management, or random ngrok URLs.
18
+
19
+ ```bash
20
+ # Before: Manual tunnel setup
21
+ cloudflared tunnel create my-tunnel
22
+ cloudflared tunnel route dns my-tunnel my-app.example.com
23
+ cloudflared tunnel run my-tunnel &
24
+ vite dev
25
+
26
+ # After: Just prefix with tuna
27
+ tuna vite dev
28
+ ```
29
+
30
+ Your local server is instantly available at `https://my-app.example.com`.
31
+
32
+ ## Features
33
+
34
+ - **Free custom domains** - Use your own domain, no random URLs
35
+ - **Persistent tunnels** - Runs as a service, survives terminal restarts
36
+ - **Team collaboration** - `$USER` variable gives each dev their own subdomain
37
+ - **Zero Trust Access** - Restrict access by email/domain in config
38
+ - **Transparent wrapper** - Colors, TTY, exit codes all preserved
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ npm install -g @zeroexcore/tuna
44
+ # or
45
+ pnpm add -g @zeroexcore/tuna
46
+ # or
47
+ npx @zeroexcore/tuna <command>
48
+ ```
49
+
50
+ ## Quick Start
51
+
52
+ ### 1. Login to Cloudflare
53
+
54
+ ```bash
55
+ tuna --login
56
+ ```
57
+
58
+ You'll need a Cloudflare API token with these permissions:
59
+ - Account → Cloudflare Tunnel → Edit
60
+ - Account → Access: Apps and Policies → Edit
61
+ - Zone → DNS → Edit
62
+ - Account → Account Settings → Read
63
+
64
+ ### 2. Configure your project
65
+
66
+ Add to `package.json`:
67
+
68
+ ```json
69
+ {
70
+ "tuna": {
71
+ "forward": "my-app.example.com",
72
+ "port": 3000
73
+ }
74
+ }
75
+ ```
76
+
77
+ Or use the interactive setup:
78
+
79
+ ```bash
80
+ tuna --init
81
+ ```
82
+
83
+ ### 3. Run your dev server
84
+
85
+ ```bash
86
+ tuna vite dev
87
+ # or
88
+ tuna npm run dev
89
+ # or
90
+ tuna next dev
91
+ ```
92
+
93
+ That's it! Your local server is now available at your custom domain.
94
+
95
+ ## Team Collaboration
96
+
97
+ Use `$USER` to give each developer their own subdomain:
98
+
99
+ ```json
100
+ {
101
+ "tuna": {
102
+ "forward": "$USER-api.example.com",
103
+ "port": 3000
104
+ }
105
+ }
106
+ ```
107
+
108
+ - Alice runs `tuna vite dev` → `https://alice-api.example.com`
109
+ - Bob runs `tuna vite dev` → `https://bob-api.example.com`
110
+
111
+ ## Access Control
112
+
113
+ Restrict who can access your tunnel:
114
+
115
+ ```json
116
+ {
117
+ "tuna": {
118
+ "forward": "staging.example.com",
119
+ "port": 3000,
120
+ "access": ["@mycompany.com", "contractor@gmail.com"]
121
+ }
122
+ }
123
+ ```
124
+
125
+ ## Commands
126
+
127
+ | Command | Description |
128
+ |---------|-------------|
129
+ | `tuna <command>` | Wrap command with tunnel |
130
+ | `tuna --init` | Interactive project setup |
131
+ | `tuna --login` | Setup Cloudflare credentials |
132
+ | `tuna --list` | List all tunnels |
133
+ | `tuna --stop` | Stop cloudflared service |
134
+ | `tuna --delete [name]` | Delete tunnel |
135
+ | `tuna --help` | Show help |
136
+ | `tuna --version` | Show version |
137
+
138
+ ## Configuration
139
+
140
+ | Field | Type | Required | Description |
141
+ |-------|------|:--------:|-------------|
142
+ | `forward` | `string` | Yes | Domain to expose (supports `$USER`, `$TUNA_USER`) |
143
+ | `port` | `number` | Yes | Local port to forward |
144
+ | `access` | `string[]` | No | Email addresses/domains for access control |
145
+
146
+ ## Requirements
147
+
148
+ - Node.js 18+
149
+ - macOS (Linux/Windows support planned)
150
+ - A Cloudflare account with a domain
151
+
152
+ ## Security
153
+
154
+ - **Credentials** stored in macOS Keychain with biometric auth
155
+ - **No secrets** in package.json or environment variables
156
+ - **Zero Trust Access** for fine-grained access control
157
+ - **TLS everywhere** via Cloudflare
158
+
159
+ ## License
160
+
161
+ MIT - see [LICENSE](https://github.com/zeroexcore/tuna/blob/main/LICENSE) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeroexcore/tuna",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Cloudflare Tunnel Wrapper for Development Servers",
5
5
  "type": "module",
6
6
  "repository": {