Skip to content

DevShare is a CLI tool that lets you instantly share your local development environment with others on your local network. It detects your project type (React, Next.js, Node.js, Go, Laravel), starts the appropriate server, and displays a QR code for easy access from any device on your LAN.

License

Notifications You must be signed in to change notification settings

abdorrahmani/devshare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub Repo Go Version License: MIT Static Badge


DevShare

DevShare Logo
Your Interactive Share development environment over LAN Tool

Share your development environment over LAN in seconds!

DevShare is a CLI tool that lets you instantly share your local development environment with others on your local network. It detects your project type (React, Next.js, Vue.js, Node.js, Go, Laravel), starts the appropriate server, and displays a QR code for easy access from any device on your LAN.


πŸš€ Features

  • πŸ” Auto-detects project type (React, Next.js, Node.js, Go, Laravel)
  • πŸ› οΈ Runs the correct dev server for your project
  • 🌍 Custom port configuration simple and flexible
  • 🌐 LAN sharing: exposes your app to your local network
  • πŸ“± QR code: scan to open your app instantly on any device
  • πŸ” Password protection: secure your development environment with authentication
  • 🧠 Smart dependency install: auto-installs dependencies if needed
  • πŸ’‘ Simple CLI: just run devshare in your project folder

πŸ“¦ Supported Frameworks

  • React (Vite, Create React App)
  • Next.js
  • Vue.js (Vite)
  • Node.js (with start or dev script, or entry file)
  • Go
  • Laravel

πŸ› οΈ Installation

1. Download and Install DevShare

Option 1: Download from Releases (Recommended)

Download the latest release for your platform from GitHub Releases and extract the archive:

  • Windows: devshare_windows_amd64.zip
  • macOS: devshare_darwin_amd64.tar.gz or devshare_darwin_arm64.tar.gz (Apple Silicon)
  • Linux: devshare_linux_amd64.tar.gz

Each archive contains:

  • The DevShare binary (devshare or devshare.exe)
  • The installer script (install.sh for Linux/macOS, install.ps1 for Windows)

To install:

  • On Linux/macOS:

    cd <extracted-folder>
    sudo bash install.sh
  • On Windows:

    • Easiest: Double-click install.bat in the extracted folder. This will request Administrator privileges, then run the installer in a new window.
    • Advanced: If you prefer to use Windows Terminal or PowerShell, first right-click Windows Terminal and select "Run as administrator", then:
      cd <extracted-folder>
      .\install.ps1
  • To check installation success:

    devshare --version
    DevShare version: vX.X.X

The installer will copy the binary to the appropriate location and add it to your PATH if needed. No build step is required.

Troubleshooting:

  • If you see devshare.exe not found in current directory, make sure you are running the installer from the same folder where devshare.exe is located (the extracted archive folder). If you double-clicked install.bat, this should happen automatically.

Option 2: Install via Go (for Go users)

go install github.com/abdorrahmani/devshare@latest

Option 3: Build from source

git clone https://github.com/abdorrahmani/devshare.git
cd devshare
go mod download
go build -o devshare

🚦 Usage

  1. Open your terminal in your project directory.
  2. Run:
# Basic usage (no authentication)
devshare

# With authentication (password protection)
devshare --password=your_password

# Specify custom port
devshare 3000 --password=your_password
  1. DevShare will:

    • Detect your project type
    • Start the appropriate dev server
    • Show your LAN IP and a QR code
    • If password is provided, create a secure proxy with authentication
  2. Scan the QR code with your phone or share the link with others on your LAN!

πŸ” Authentication

When you use the --password flag, DevShare creates a secure proxy server that:

  • Requires a password to access your development environment
  • Provides a beautiful authentication page
  • Maintains session cookies for 1 hour
  • Protects your development work from unauthorized access

Example with authentication:

devshare --password=mysecret123

This will show:

  • Local access: http://localhost:3000 (direct access)
  • Secure network access: http://192.168.1.42:3001 (password protected)
  • QR code for the secure access URL

πŸ“ Example Output

Without Authentication

 ____              _____ _                    
|  _ \  _____   __/ ___|| |__   __ _ _ __ ___ 
| | | |/ _ \ \ / /\___ \| '_ \ / _ | '__/ _ \
| |_| |  __/\ V /  ___) | | | | (_| | | |  __/
|____/ \___| \_/  |____/|_| |_|\__,_|_|  \___|

DevShare - Share your dev environment over LAN
πŸ”— Served by DevShare - Built with πŸ’™ by Anophel

Current working directory: /your/project/path
βœ… React project detected!
πŸ“¦ Using package manager: npm
πŸš€ Starting React app...
🌐 Your LAN IP is: 192.168.1.42
Local:   http://localhost:5173
Network: http://192.168.1.42:5173
πŸ“± Scan this on your phone (React/Vite default port 5173):
[QR CODE]

With Authentication

 ____              _____ _                    
|  _ \  _____   __/ ___|| |__   __ _ _ __ ___ 
| | | |/ _ \ \ / /\___ \| '_ \ / _ | '__/ _ \
| |_| |  __/\ V /  ___) | | | | (_| | | |  __/
|____/ \___| \_/  |____/|_| |_|\__,_|_|  \___|

DevShare - Share your dev environment over LAN
πŸ”— Served by DevShare - Built with πŸ’™ by Anophel

Current working directory: /your/project/path
βœ… React project detected!
πŸ“¦ Using package manager: npm
πŸ” Authentication enabled - Password required to access the app
πŸš€ Starting React app...
🌐 Your LAN IP is: 192.168.1.42
Local:   http://localhost:5173
πŸ”— Auth Proxy: http://192.168.1.42:5174
πŸ“± Scan this on your phone (React/Vite default port 5173):
[QR CODE]

πŸ”„ Updating DevShare

To update DevShare to the latest version, simply run:

devshare update

This command will:

  • Check for the latest release on GitHub
  • Download the correct archive for your platform
  • Extract the new binary and run the official installer script (install.sh on Linux/macOS, install.bat on Windows)
  • Replace your current DevShare installation with the latest version

Note:

  • You may be prompted for administrator/root permissions during the update, depending on your system configuration.
  • If the update fails, you can always manually download and install the latest release as described in the installation section above.

Security Note for Node.js Users

WARNING: Your Node.js app may be listening on all interfaces (0.0.0.0). For security, ensure your app binds to 127.0.0.1 to prevent bypassing authentication.

If you control the app, update your server code to listen only on 127.0.0.1, for example:

// Node.js (Express example):
const host = process.env.HOST || '127.0.0.1';
const port = process.env.PORT || 3000;
app.listen(port, host, () => {
  console.log(`Server running at http://${host}:${port}/`);
});

🀝 Contributing

Contributions are welcome! Please open issues or pull requests on GitHub.


πŸ“„ License

This project is licensed under the MIT License.


πŸ”— Links


Built with πŸ’™ by Anophel

About

DevShare is a CLI tool that lets you instantly share your local development environment with others on your local network. It detects your project type (React, Next.js, Node.js, Go, Laravel), starts the appropriate server, and displays a QR code for easy access from any device on your LAN.

Topics

Resources

License

Stars

Watchers

Forks