devtunnel-cli 3.0.45 → 3.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 CHANGED
@@ -8,7 +8,17 @@
8
8
 
9
9
  🌐 **Website:** [devtunnel-cli.vercel.app](https://devtunnel-cli.vercel.app) | šŸ“¦ **npm:** [devtunnel-cli](https://www.npmjs.com/package/devtunnel-cli) | šŸ’» **GitHub:** [maiz-an/DevTunnel-CLI](https://github.com/maiz-an/DevTunnel-CLI)
10
10
 
11
- **Install (global):** `npm i -g devtunnel-cli`
11
+ ## Install
12
+
13
+ | Platform | Command |
14
+ | -------- | ------- |
15
+ | **Windows** | `winget install devtunnel-cli` |
16
+ | **macOS** | `brew install devtunnel-cli` |
17
+ | **Linux** | `sudo apt install devtunnel-cli` |
18
+ | **npm** | `npm i -g devtunnel-cli` |
19
+
20
+ Windows, macOS, and Linux: same style — **standalone binary**, no Node required.
21
+ **Linux (first time only):** run once `curl -fsSL https://raw.githubusercontent.com/maiz-an/DevTunnel-CLI/main/scripts/install.sh | sudo sh` to add our APT repo, then use the command above. npm requires Node.
12
22
 
13
23
  ---
14
24
 
@@ -24,7 +34,8 @@ DevTunnel-CLI is built for developers who need instant public URLs to share work
24
34
 
25
35
  ### Step-by-Step Guide
26
36
 
27
- **1. Install DevTunnel (one-time setup):**
37
+ **1. Install DevTunnel (one-time setup):**
38
+ Use **Windows** (winget), **macOS** (brew), **Linux** (apt), or **npm** — see the [Install](#install) table above.
28
39
 
29
40
  ```bash
30
41
  npm i -g devtunnel-cli
@@ -75,7 +86,7 @@ devtunnel-cli # Auto-detects project type and port!
75
86
 
76
87
  **Important:** Run `devtunnel-cli` from the same directory as your project!
77
88
 
78
- 1. **Install DevTunnel** (one-time): `npm i -g devtunnel-cli`
89
+ 1. **Install DevTunnel** (one-time): use winget, brew, apt, or [npm](#install) above.
79
90
  2. **Go to your project**: `cd your-project` (Node, Laravel, HTML, or XAMPP folder)
80
91
  3. **Have your app running**: `npm run dev`, `php artisan serve`, or XAMPP. For HTML, optional — DevTunnel can serve it.
81
92
  4. **Open a new terminal** in the same project directory
@@ -109,11 +120,11 @@ devtunnel-cli
109
120
 
110
121
  ## šŸ› ļø Requirements
111
122
 
112
- - Node.js 16+ (download from [nodejs.org](https://nodejs.org))
113
- - Internet connection
114
- - Your dev server running
123
+ - **Windows / macOS / Linux (OS install):** No Node required — standalone binary.
124
+ - **npm install:** Node.js 16+ ([nodejs.org](https://nodejs.org)).
125
+ - Internet connection and your dev server running.
115
126
 
116
- **No other installations needed!** Cloudflare is automatically bundled on first run.
127
+ Cloudflare is automatically bundled on first run.
117
128
 
118
129
  ---
119
130
 
package/package.json CHANGED
@@ -1,87 +1,90 @@
1
- {
2
- "name": "devtunnel-cli",
3
- "version": "3.0.45",
4
- "type": "module",
5
- "description": "DevTunnel-CLI — fast, zero-config tool to share local servers for development, testing, demos, and webhook debugging. npm i -g devtunnel-cli.",
6
- "main": "src/core/start.js",
7
- "files": [
8
- "README.md",
9
- "src"
10
- ],
11
- "bin": {
12
- "devtunnel-cli": "src/core/RUN.js"
13
- },
14
- "scripts": {
15
- "start": "node src/core/RUN.js",
16
- "dev": "node src/core/RUN.js",
17
- "run": "node src/core/RUN.js",
18
- "tunnel": "node src/core/index.js",
19
- "sync-version": "node sync-version.js",
20
- "test": "node -e \"console.log('ok')\"",
21
- "prepublishOnly": "npm test",
22
- "postinstall": "node src/utils/postinstall-global-check.cjs"
23
- },
24
- "keywords": [
25
- "DevTunnel-CLI",
26
- "DevTunnel",
27
- "devtunnel",
28
- "dev-tunnel",
29
- "Dev-Tunnel",
30
- "devtunnel-cli",
31
- "dev-tunnel-cli",
32
- "Dev-Tunnel-CLI",
33
- "multiple ports",
34
- "dev tunnel",
35
- "localhost tunnel",
36
- "cloudflare tunnel",
37
- "ngrok alternative",
38
- "ngrok",
39
- "localtunnel",
40
- "dev-server",
41
- "share localhost",
42
- "public-url",
43
- "port forwarding",
44
- "local development",
45
- "vite tunnel",
46
- "react dev server",
47
- "nextjs tunnel",
48
- "nestjs",
49
- "express",
50
- "laravel",
51
- "php",
52
- "html",
53
- "backend",
54
- "frontend",
55
- "proxy",
56
- "development tools",
57
- "web development",
58
- "tunnel service",
59
- "local server sharing",
60
- "dev server proxy",
61
- "cloudflare tunnel cli",
62
- "ngrok alternative free",
63
- "zero config tunnel",
64
- "development",
65
- "localhost"
66
- ],
67
- "author": "maiz",
68
- "license": "MIT",
69
- "preferGlobal": true,
70
- "repository": {
71
- "type": "git",
72
- "url": "git+https://github.com/maiz-an/DevTunnel-CLI.git"
73
- },
74
- "bugs": {
75
- "url": "https://github.com/maiz-an/DevTunnel-CLI/issues"
76
- },
77
- "homepage": "https://devtunnel-cli.vercel.app",
78
- "engines": {
79
- "node": ">=16.0.0"
80
- },
81
- "dependencies": {
82
- "http-proxy": "^1.18.1",
83
- "localtunnel": "^2.0.2",
84
- "prompts": "^2.4.2"
85
- },
86
- "devDependencies": {}
1
+ {
2
+ "name": "devtunnel-cli",
3
+ "version": "3.1.0",
4
+ "type": "module",
5
+ "description": "DevTunnel-CLI — fast, zero-config tool to share local servers for development, testing, demos, and webhook debugging. npm i -g devtunnel-cli.",
6
+ "main": "src/core/start.js",
7
+ "files": [
8
+ "README.md",
9
+ "src"
10
+ ],
11
+ "bin": {
12
+ "devtunnel-cli": "src/core/RUN.js"
13
+ },
14
+ "scripts": {
15
+ "start": "node src/core/RUN.js",
16
+ "dev": "node src/core/RUN.js",
17
+ "run": "node src/core/RUN.js",
18
+ "tunnel": "node src/core/index.js",
19
+ "sync-version": "node sync-version.js",
20
+ "build:standalone": "node scripts/build-standalone.js",
21
+ "test": "node -e \"console.log('ok')\"",
22
+ "prepublishOnly": "npm test",
23
+ "postinstall": "node src/utils/postinstall-global-check.cjs"
24
+ },
25
+ "keywords": [
26
+ "DevTunnel-CLI",
27
+ "DevTunnel",
28
+ "devtunnel",
29
+ "dev-tunnel",
30
+ "Dev-Tunnel",
31
+ "devtunnel-cli",
32
+ "dev-tunnel-cli",
33
+ "Dev-Tunnel-CLI",
34
+ "multiple ports",
35
+ "dev tunnel",
36
+ "localhost tunnel",
37
+ "cloudflare tunnel",
38
+ "ngrok alternative",
39
+ "ngrok",
40
+ "localtunnel",
41
+ "dev-server",
42
+ "share localhost",
43
+ "public-url",
44
+ "port forwarding",
45
+ "local development",
46
+ "vite tunnel",
47
+ "react dev server",
48
+ "nextjs tunnel",
49
+ "nestjs",
50
+ "express",
51
+ "laravel",
52
+ "php",
53
+ "html",
54
+ "backend",
55
+ "frontend",
56
+ "proxy",
57
+ "development tools",
58
+ "web development",
59
+ "tunnel service",
60
+ "local server sharing",
61
+ "dev server proxy",
62
+ "cloudflare tunnel cli",
63
+ "ngrok alternative free",
64
+ "zero config tunnel",
65
+ "development",
66
+ "localhost"
67
+ ],
68
+ "author": "maiz",
69
+ "license": "MIT",
70
+ "preferGlobal": true,
71
+ "repository": {
72
+ "type": "git",
73
+ "url": "git+https://github.com/maiz-an/DevTunnel-CLI.git"
74
+ },
75
+ "bugs": {
76
+ "url": "https://github.com/maiz-an/DevTunnel-CLI/issues"
77
+ },
78
+ "homepage": "https://devtunnel-cli.vercel.app",
79
+ "engines": {
80
+ "node": ">=16.0.0"
81
+ },
82
+ "dependencies": {
83
+ "http-proxy": "^1.18.1",
84
+ "localtunnel": "^2.0.2",
85
+ "prompts": "^2.4.2"
86
+ },
87
+ "devDependencies": {
88
+ "@yao-pkg/pkg": "^5.15.0"
89
+ }
87
90
  }
package/src/core/RUN.js CHANGED
@@ -1,64 +1,64 @@
1
- #!/usr/bin/env node
2
-
3
- // Universal Node.js Launcher - Works on ALL platforms!
4
- import { spawn } from "child_process";
5
- import { readFileSync, existsSync } from "fs";
6
- import { fileURLToPath } from "url";
7
- import { dirname, join } from "path";
8
-
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = dirname(__filename);
11
-
12
- // Version flags: devtunnel-cli --version, -v, or --v
13
- const args = process.argv.slice(2);
14
- const showVersion = args.some((a) => a === "--version" || a === "-v" || a === "--v");
15
- if (showVersion) {
16
- try {
17
- const pkgPath = join(dirname(dirname(__dirname)), "package.json");
18
- const version = existsSync(pkgPath)
19
- ? JSON.parse(readFileSync(pkgPath, "utf8")).version
20
- : "?.?.?";
21
- console.log(version);
22
- } catch (err) {
23
- console.log("?.?.?");
24
- }
25
- process.exit(0);
26
- }
27
-
28
- const originalEmitWarning = process.emitWarning;
29
- process.emitWarning = function(warning, ...args) {
30
- if (typeof warning === 'string' && warning.includes('util._extend')) {
31
- return;
32
- }
33
- return originalEmitWarning.call(this, warning, ...args);
34
- };
35
-
36
- process.stdout.write('\x1B[2J\x1B[0f');
37
- console.clear();
38
-
39
- const startPath = join(__dirname, "start.js");
40
- const child = spawn("node", [startPath], {
41
- stdio: "inherit",
42
- shell: false
43
- });
44
-
45
- child.on("error", (error) => {
46
- console.error("āŒ Error starting app:", error.message);
47
- process.exit(1);
48
- });
49
-
50
- child.on("close", (code) => {
51
- if (code !== 0) {
52
- console.log(`\nāš ļø Process exited with code ${code}`);
53
- }
54
- process.exit(code || 0);
55
- });
56
-
57
- // Handle Ctrl+C
58
- process.on("SIGINT", () => {
59
- child.kill("SIGINT");
60
- });
61
-
62
- process.on("SIGTERM", () => {
63
- child.kill("SIGTERM");
64
- });
1
+ #!/usr/bin/env node
2
+
3
+ // Universal Node.js Launcher - Works on ALL platforms!
4
+ import { spawn } from "child_process";
5
+ import { readFileSync, existsSync } from "fs";
6
+ import { fileURLToPath } from "url";
7
+ import { dirname, join } from "path";
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ // Version flags: devtunnel-cli --version, -v, or --v
13
+ const args = process.argv.slice(2);
14
+ const showVersion = args.some((a) => a === "--version" || a === "-v" || a === "--v");
15
+ if (showVersion) {
16
+ try {
17
+ const pkgPath = join(dirname(dirname(__dirname)), "package.json");
18
+ const version = existsSync(pkgPath)
19
+ ? JSON.parse(readFileSync(pkgPath, "utf8")).version
20
+ : "?.?.?";
21
+ console.log(version);
22
+ } catch (err) {
23
+ console.log("?.?.?");
24
+ }
25
+ process.exit(0);
26
+ }
27
+
28
+ const originalEmitWarning = process.emitWarning;
29
+ process.emitWarning = function(warning, ...args) {
30
+ if (typeof warning === 'string' && warning.includes('util._extend')) {
31
+ return;
32
+ }
33
+ return originalEmitWarning.call(this, warning, ...args);
34
+ };
35
+
36
+ process.stdout.write('\x1B[2J\x1B[0f');
37
+ console.clear();
38
+
39
+ const startPath = join(__dirname, "start.js");
40
+ const child = spawn("node", [startPath], {
41
+ stdio: "inherit",
42
+ shell: false
43
+ });
44
+
45
+ child.on("error", (error) => {
46
+ console.error("āŒ Error starting app:", error.message);
47
+ process.exit(1);
48
+ });
49
+
50
+ child.on("close", (code) => {
51
+ if (code !== 0) {
52
+ console.log(`\nāš ļø Process exited with code ${code}`);
53
+ }
54
+ process.exit(code || 0);
55
+ });
56
+
57
+ // Handle Ctrl+C
58
+ process.on("SIGINT", () => {
59
+ child.kill("SIGINT");
60
+ });
61
+
62
+ process.on("SIGTERM", () => {
63
+ child.kill("SIGTERM");
64
+ });