Skip to main content

AI-powered linking and automation tool

Project description

Dev Linker

Dev Linker runs frontend and backend dev servers, proxies both through a single local port (8000), and creates a single public URL via Cloudflare or ngrok.

Features

  • Launches frontend automatically (when frontend exists)
  • Auto-detects backend runtime (Docker Compose, Dockerfile, Node, or Python)
  • Auto-starts Python/Node backends; Docker is manual by default for reliability
  • Detects common frontend/backend ports
  • Supports Docker backend port auto-detection
  • Works with dynamic container host ports
  • No config needed for standard Flask/Docker flows
  • Serves both through one proxy at http://localhost:8000
  • Creates a public tunnel for sharing (Cloudflare first, ngrok fallback)
  • Terminal-first workflow
  • Supports CLI version output with --version

Project Structure

devlinker/
├── devlinker/
│   ├── __init__.py
│   ├── main.py
│   ├── runner.py
│   ├── detector.py
│   ├── proxy.py
│   └── tunnel.py
├── setup.py
├── README.md
└── requirements.txt

Install

For local development:

pip install .

After publishing to PyPI:

pip install devlinker

Run

devlinker

Typical startup output:

Dev Linker v0.2.0

[INFO] Mode: Auto (Flask + Docker detection)
[INFO] Booting local services...
[INFO] Detecting frontend/backend ports...
[OK] Frontend -> 5173
[OK] Backend  -> 5000

[OK] Proxy ready at http://localhost:8000

[OK] Tunnel provider: Cloudflare
[OK] Public URL:
    https://xxxx.trycloudflare.com
Tip: Press Ctrl+Click to open link

[INFO] Share this link with collaborators.

DevLinker Ready (in 2.4s)
Frontend: http://localhost:5173
Backend:  http://localhost:5000
Proxy:    http://localhost:8000
PUBLIC URL: https://xxxx.trycloudflare.com
Tip: Press Ctrl+Click to open link

Version check:

devlinker --version

Optional overrides:

devlinker --frontend 5173 --backend 5000

Backend override alias:

devlinker --backend-port 3001

Enable Docker auto-start explicitly:

devlinker --docker

Run local-only mode without tunnel:

devlinker --no-tunnel

If port 8000 is already in use:

devlinker --frontend 5173 --backend 5000 --proxy-port 18000

Default behavior also tries fallback ports automatically when 8000 is busy:

[WARN] Port 8000 in use
[INFO] Using proxy port: 8001
  • 8001
  • 8002
  • 18000

Important Frontend Rule

Frontend requests must use relative API paths:

fetch("/api/endpoint")

Do not hardcode backend host URLs in frontend code.

Backend Auto-Detection

Backend port detection runs in this order:

  1. Check localhost port 5000
  2. If not found, check Docker port mappings for ->5000/tcp
  3. Use the mapped host port automatically
  4. If nothing is found, print next-step guidance and exit

Detection messages include source labels, for example:

[OK] Backend detected (Local) -> port 5000

Example Docker dynamic-port message:

[WARN] Backend not found on port 5000
[INFO] Checking Docker containers...
[OK] Backend detected (Docker) -> port 32768

Dev Linker checks backend runtime in this order:

  1. Docker Compose (backend/docker-compose.yml, docker-compose.yaml, compose.yml, or compose.yaml)
  2. Docker (backend/Dockerfile)
  3. Node (backend/package.json)
  4. Python (backend/requirements.txt or backend/app.py)

Backend startup commands:

  • Docker Compose (default): manual run docker compose up --build in backend/
  • Dockerfile (default): manual run docker build -t devlinker-backend . then docker run --rm -p 5000:5000 devlinker-backend
  • Docker Compose/Dockerfile with --docker: Dev Linker runs those Docker commands for you
  • Node: npm run dev (or npm start when dev is missing)
  • Python: python app.py

For containerized Flask backends, ensure:

  • App binds to all interfaces: app.run(host="0.0.0.0", port=5000)
  • Port mapping is present: -p 5000:5000

Notes

  • runner.py expects frontend project in frontend and Flask app in backend/app.py.
  • If those paths do not exist, Dev Linker skips launch and only tries to detect already-running services.
  • Tunnel selection order is: cloudflared (TryCloudflare), then ngrok.
  • If cloudflared is unavailable and ngrok is not configured, Dev Linker prints one-time setup guidance.
  • You may need to set ngrok auth once on your machine using ngrok config add-authtoken .
  • Dev Linker prints a public URL with ngrok-skip-browser-warning=true only when ngrok is used.
  • Startup output includes selected tunnel provider (cloudflare or ngrok).
  • When Dev Linker launches a Vite frontend, it sets ONELINK=1 to disable Vite HMR WebSockets for stable tunnel behavior.

Real-Time Development Modes

Option 1: Dev Linker sharing mode (recommended)

  • Run devlinker to share one combined frontend/backend URL.
  • Open local Vite URL yourself for instant HMR updates.
  • Share Dev Linker/ngrok URL with others; they can use normal page refresh to see changes.

Option 2: Full remote HMR mode (bypass Dev Linker)

  • Start frontend and backend manually.
  • Configure Vite server.proxy for /api to backend.
  • Run ngrok http <vite-port> directly so Vite handles WebSocket HMR traffic.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devlinker-0.2.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devlinker-0.2.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file devlinker-0.2.0.tar.gz.

File metadata

  • Download URL: devlinker-0.2.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for devlinker-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d846fbb5cba818369621b6ed56022f42e8dcc911caa5d76eb56d496b8c7e19b4
MD5 a5a2c0f9cb804016318f8b4c5bd03d60
BLAKE2b-256 871a9b9f53f4480f1624d3d88a408d2689a5f4fb33e7122fc46581ff8d7835e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for devlinker-0.2.0.tar.gz:

Publisher: publish.yml on mani1028/devlinker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file devlinker-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: devlinker-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for devlinker-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54c968e2436e55f90b12965e1c1c73e9112e0150ac4516095a25c3a37b73d471
MD5 bafeab8842f7e099ba45c9970b9dc455
BLAKE2b-256 c632d5fe42e148587645f3523f35a8c8cfb5b63fa84a3dcc5992573567a4661a

See more details on using hashes here.

Provenance

The following attestation bundles were made for devlinker-0.2.0-py3-none-any.whl:

Publisher: publish.yml on mani1028/devlinker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page