@danecando/lanx
v0.1.4
Published
LocalCan-style local domain and reverse proxy CLI for macOS
Downloads
489
Maintainers
Readme
lanx
lanx is a small CLI for local development domains on macOS. It can:
- generate local TLS certificates
- manage domain entries (
add,edit,remove,list) - run a local HTTPS reverse proxy
- apply trusted cert changes
It's a free CLI based alternative to the LocalCan app.
Requirements
- Node.js 18+
openssl- macOS
Install
Install from npm:
npm install -g @danecando/lanxQuick Start
- Initialize lanx state and certificates:
lanx install- Add a proxied domain:
lanx add app --target http://127.0.0.1:3000- Update it later if needed:
lanx edit app --target http://127.0.0.1:4000- Start the runtime:
lanx start always starts the runtime, publishes lanx.local, and serves the CA helper page there. You will probably want to start it with elevated permissions so that lanx can listen on ports 80 and 443. If lanx doesn't have permission to listen on those ports it will fall back to 8088 and 8443.
If it is bound to 80 and 443 you can access your apps directly: https://app.local otherwise you will need to append the port number https://app.local:8443.
lanx startWith elevated permissions:
sudo lanx start- On a phone, open the built-in CA helper page:
https://lanx.local- Access your configured apps/domains on your network
https://app.localCommon Commands
lanx list
lanx add <name> [--port <n> | --target <url>]
lanx edit <name> [--target <url> | --port <n>]
lanx remove <name>
lanx uninstallData Location
By default:
- config:
$XDG_CONFIG_HOME/lanx/config.jsonor~/.config/lanx/config.json - state:
$XDG_STATE_HOME/lanxor~/.local/state/lanx
You can override them with standard XDG environment variables such as XDG_CONFIG_HOME and XDG_STATE_HOME.
