Skip to content

About

Local web development environment for Windows, macOS and Linux that manages Apache, PHP, MySQL/MariaDB, SSL, Redis and Cloudflare Tunnel. Electron 34, Vue 3, .NET 9.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

2,692 Commits

Folders and files

Repository files navigation

NKS WebDev Console

Build & Release CI Latest Release License .NET Electron Vue 3 Cross-platform

Local development environment for Windows, macOS, and Linux that manages Apache, PHP, MySQL/MariaDB, SSL, mail catching, Redis, Node, Cloudflare tunnels and DNS for .local / .test domains. An alternative to MAMP PRO, XAMPP, WampServer and Laragon.

Features

  • πŸ–₯️ Cross-platform - Windows (NSIS + portable), macOS (DMG + ZIP, Apple Silicon), Linux (AppImage)
  • 🧩 Plugin daemon - Apache, PHP, MySQL, MariaDB, SSL (mkcert), Mailpit, Redis, Node, Caddy, Cloudflare and Hosts editor loaded as isolated .NET 9 plugin DLLs
  • 🐘 Per-site PHP - each site can pin its own PHP version, INI overrides (memory, timeouts, upload limits, Xdebug, OPcache, extensions) and Apache Fcgid timeouts
  • 🚚 MAMP PRO migration - importer reads MAMP PRO's SQLite database, recreates vhosts, copies SSL certs and migrates databases (verified on 17 sites + 66 databases)
  • πŸŽ›οΈ Three interfaces - Electron GUI, wdc CLI and REST API with Bearer-token auth
  • πŸ€– MCP server - 72 tools for Claude Code or any MCP client, shipped with the app: sites, databases, services, SSL, plugins, backups, Cloudflare tunnels, deployments. Every tool call is logged and shown in the GUI's MCP β†’ Activity tab (24h timeline, top tools, p50/p95/p99 latency, CSV export). See src/daemon/NKS.WebDevConsole.Daemon/Mcp/README.md for the operator guide.
  • ☁️ Cloudflare - tunnels, DNS records and routes via cloudflared
  • πŸ” Elevated on Windows - one UAC prompt at launch, no per-operation prompts for hosts-file edits
  • πŸ“¦ Self-contained daemon - .NET 9 published with --self-contained, no separate runtime install needed
  • πŸ§ͺ Type checking - strict TypeScript on the frontend, nullable enable on the backend, 595+ xUnit tests

Requirements

Running the pre-built app

  • Windows 10 / 11 (x64), administrator rights for hosts-file editing
  • macOS 14+ (Apple Silicon, arm64)
  • Linux: any glibc 2.28+ distribution (Ubuntu 22.04+, Debian 12+, Fedora 38+)

Building from source

Tool Version Notes
.NET SDK 9.0+ macOS: brew install dotnet@9
Node.js 20 LTS+ Tested with 22 (CI) and 23.x
Python 3.11+ Optional, only for running the catalog-api locally
Git any

Installation

Pre-built releases

Download the latest installer from GitHub Releases:

  • Windows: NKS.WebDev.Console-<version>-setup-x64.exe (NSIS) or *-portable-x64.exe
  • macOS: NKS.WebDev.Console-<version>-mac-arm64.dmg or *.zip
  • Linux: NKS.WebDev.Console-<version>-linux-x86_64.AppImage

From source

git clone https://github.com/nks-hub/webdev-console.git
cd webdev-console

# 1. Build the .NET solution (daemon + plugin SDK + tests)
dotnet build WebDevConsole.sln -c Release

# 2. Install frontend dependencies (~150 MB Electron binary on first run)
cd src/frontend
npm install

# 3. Build the platform installer
npm run dist          # Windows (NSIS + portable)
npm run dist:mac      # macOS (DMG + ZIP)
npm run dist:linux    # Linux (AppImage)

Output lands in src/frontend/release/.

Quick Start

Start the daemon + Electron in development:

# Terminal 1 β€” daemon
dotnet run --project src/daemon/NKS.WebDevConsole.Daemon

# Terminal 2 β€” Electron with hot-reload
cd src/frontend && npm run dev

On Windows, run.cmd from the repo root does both (supports --no-build, --daemon-only, --frontend-only).

Create your first site (with the app running, see CLI for installing wdc):

wdc sites create --domain my-app.local --docroot "$HOME/Sites/my-app.local" --php 8.3 --ssl
wdc services start apache

In PowerShell use --docroot "$HOME\Sites\my-app.local". A missing document root is created.

Open https://my-app.local/. The site is served from the document root with PHP 8.3 through Apache + mod_fcgid and a mkcert-signed SSL certificate.

Usage

CLI

Every installer includes wdc, a self-contained single-file binary (System.CommandLine) that sits in the app's resources/cli folder. It talks to the running daemon, so start the app first.

  • Windows installer: <install dir>\resources\cli\wdc.exe. The installer adds that folder to your user PATH (per-user install) or the system PATH (all-users install) and removes it on uninstall. Open a new terminal afterwards. The portable build does not touch PATH.
  • macOS: /Applications/NKS WebDev Console.app/Contents/Resources/cli/wdc. Not on PATH; the installer leaves your shell profile alone.
  • Linux (AppImage): resources/cli/wdc inside the image. Run ./NKS-WebDev-Console-*.AppImage --appimage-extract once, then use squashfs-root/resources/cli/wdc. Not on PATH.

On macOS and Linux link it yourself once, for example:

sudo ln -s "/Applications/NKS WebDev Console.app/Contents/Resources/cli/wdc" /usr/local/bin/wdc

The default Windows install dir is %LOCALAPPDATA%\Programs\NKS WebDev Console (per-user) or C:\Program Files\NKS WebDev Console (all users). From a source checkout, dotnet run --project src/daemon/NKS.WebDevConsole.Cli -- <command> runs the same CLI.

wdc status                                    # daemon and service overview
wdc sites                                     # list all sites
wdc sites create --domain my-app.local \
                 --docroot "$HOME/Sites/my-app.local" --php 8.3 --ssl
wdc services start apache
wdc databases                                 # list databases
wdc binaries catalog                          # available PHP / Apache / MySQL versions
wdc doctor                                    # 13 health checks
wdc sites --json                              # machine-readable output for scripts

wdc --help lists every command. Output is a table in a terminal and tab-separated lines when piped.

REST API + auth

The daemon writes its listening port + fresh Bearer token at startup:

OS Port file
Windows %TEMP%\nks-wdc-daemon.port
macOS $TMPDIR/nks-wdc-daemon.port
Linux /tmp/nks-wdc-daemon.port

Format: line 1 = port (e.g. 5000), line 2 = base64 token. The token rotates on every restart.

PORT=$(sed -n 1p $TMPDIR/nks-wdc-daemon.port)
TOKEN=$(sed -n 2p $TMPDIR/nks-wdc-daemon.port)
curl -H "Authorization: Bearer $TOKEN" http://localhost:$PORT/api/status
# β†’ {"status":"running","version":"0.2.3","plugins":13,"uptime":215437}

OpenAPI spec is exposed at /openapi/v1.json.

MCP server (Claude Code, Claude Desktop, Cursor)

The installer ships the MCP server as resources/mcp-server/index.js. Open AI clients (MCP) in the app: the Connect an AI client card has the MCP switch, live status, a connection test and copy buttons with the exact path for your install. For Claude Code it is:

claude mcp add --scope user nks-wdc -- node "<WDC resources>/mcp-server/index.js"

Options go before the server name and -- separates the server command. This needs Node.js 18+ on PATH; without Node.js the card switches to running the server with the WDC binary itself (see services/mcp-server/README.md). Claude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json) take the same mcpServers entry:

{ "mcpServers": { "nks-wdc": { "command": "node", "args": ["<WDC resources>/mcp-server/index.js"] } } }

From a source checkout, build the server and point the client at it:

cd services/mcp-server
npm install && npm run build      # or `npm run bundle` for the single-file build in dist-bundle/
claude mcp add --scope user nks-wdc -- node "$(pwd)/dist/index.js"

MCP must be enabled (the switch on the AI clients (MCP) page or in Settings β†’ AI clients (MCP)); while it is off the daemon refuses every request made with the MCP token (mcp_disabled).

Module Tools Examples
sites 6 list, get, create, delete, get_metrics, get_access_log
services 3 list, start, stop
system 3 status, system_info, recent_activity
databases 6 list, create, drop, tables, query, execute
mysql users 7 list, create, set_password, grant, drop, root password
ssl 4 list_certs, install_ca, generate_cert, revoke_cert
php 2 list_versions, toggle_extension
binaries 5 list_catalog, list_installed, install, uninstall, refresh
plugins 5 list, marketplace, enable, disable, install
backup 3 create, list, restore
settings 2 get, update
cloudflare 9 tunnels, dns, routes, …
deploy 16 targets, releases, intents, deploy, rollback, groups, …
confirmation 1 request_confirmation

Destructive operations need the operator's approval in WDC: the agent calls wdc_request_confirmation, the user approves the banner (or a trust rule on the MCP β†’ Rules tab approves it), then the agent repeats the operation with the returned intent token. With --readonly the server leaves out every mutating tool (33 tools remain).

MAMP PRO migration

wdc migrate mamp --port 3308              # dry-run
wdc migrate mamp --port 3308 --apply      # migrate

Reads %APPDATA%\Appsolute\MAMPPRO\userdb\mamp.db and rebuilds sites + databases in WDC.

Architecture

webdev-console/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ daemon/                              # C# .NET 9
β”‚   β”‚   β”œβ”€β”€ NKS.WebDevConsole.Daemon         # ASP.NET Core REST service
β”‚   β”‚   β”œβ”€β”€ NKS.WebDevConsole.Core           # shared services + models
β”‚   β”‚   β”œβ”€β”€ NKS.WebDevConsole.Cli            # `wdc` CLI (System.CommandLine)
β”‚   β”‚   └── NKS.WebDevConsole.Plugin.SDK     # plugin contract
β”‚   └── frontend/                            # Electron 34 + Vue 3 + Element Plus + Tailwind v4
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ catalog-api/                         # FastAPI sidecar (binary + version catalog)
β”‚   └── mcp-server/                          # TypeScript stdio MCP server (72 tools, Phase 8 audit log)
β”œβ”€β”€ tests/                                   # xUnit tests (Daemon + Core)
β”œβ”€β”€ scripts/                                 # build helpers
└── .github/workflows/                       # CI matrix β€” Windows, macOS, Linux

Related repositories

NKS WebDev Console ships as four co-operating public repositories:

Repo Purpose
nks-hub/webdev-console This repo: daemon, CLI, Electron frontend, Plugin SDK
nks-hub/webdev-console-plugins 13 official plugins (Apache, PHP, MySQL, …)
nks-hub/webdev-console-binaries Versioned runtime binaries (PHP, Apache, Nginx, Caddy, …)
nks-hub/wdc-catalog-api FastAPI catalog + config-sync service

A single v* tag push to this repo triggers Build & Release (Win/macOS/Linux installers), Publish Plugin SDK (GitHub Packages NuGet), Defender Submission and Release Security Scan in parallel.

Development

Tests

dotnet test WebDevConsole.sln                  # 595+ tests (daemon + core)
cd services/catalog-api && pytest              # FastAPI sidecar tests
cd services/mcp-server && node e2e-test.mjs    # MCP smoke tests (27 assertions)

Cutting a release

git tag v0.2.3
git push --tags

GitHub Actions builds all three platforms and uploads to Releases. macOS code-signing uses CSC_LINK + CSC_KEY_PASSWORD secrets when present; notarization requires APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, APPLE_TEAM_ID.

CI matrix

OS Daemon RID Output
windows-2022 win-x64 *-setup-x64.exe (NSIS) + *-portable-x64.exe
macos-14 osx-arm64 *-mac-arm64.dmg + *-mac-arm64.zip
ubuntu-24.04 linux-x64 *.AppImage

Contributing

Contributions are welcome! For major changes, please open an issue first. Keep dotnet test and the frontend build green; CI runs the matrix build for all three platforms.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: description')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

License

MIT License β€” see LICENSE for details.


Made with ❀️ by NKS Hub

About

Local web development environment for Windows, macOS and Linux that manages Apache, PHP, MySQL/MariaDB, SSL, Redis and Cloudflare Tunnel. Electron 34, Vue 3, .NET 9.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages