One command. Every tool. Any Linux device.
A zero-friction installer that auto-detects your system, wires up your entire workflow — service manager, dual GitHub identities, secure localhost sharing, VPN, mesh networking, battery care — and hands you a single, beautiful CLI to run it all.
curl -fsSL https://raw.githubusercontent.com/Khan3K/Supermod-installer/main/install.sh | bashSuperMod is a universal setup layer for Linux power users. Instead of spending a day configuring VPN, Git, SSH, tunnels, and dotfiles on a fresh machine, you run one command and get a complete, opinionated workstation with one CLI to rule it all.
It works on Arch, Ubuntu, Fedora, openSUSE, Void, Alpine, Gentoo, NixOS, and even macOS — auto-detecting the package manager, desktop environment, and hardware, then installing only what you need.
The star of the show is the supermod command — a single binary that
turns your whole environment on, off, or shows you exactly what's
running. One keystroke. Total control.
| Problem | SuperMod's answer |
|---|---|
| "I just got a new laptop, now I have to install 30 things" | One-liner install does it all |
| "VPN drops every time I wake from sleep" | Wake-from-sleep service auto-reconnects |
| "I want to share my localhost with a friend" | supermod host link → instant trycloudflare URL |
| "I have two GitHub accounts — private and public" | Dual-account SSH + gh config, fully isolated |
| "My battery is dying after 18 months" | Auto charge-cycle limits (20–80%) |
| "I forget to start XAMPP / Tailscale / VPN" | supermod on brings up everything |
| "My installer only works on Arch" | Auto-detects 9 distros + macOS |
| "Tunneling needs me to remember a command" | Bare supermod shows your current link |
curl -fsSL https://raw.githubusercontent.com/Khan3K/Supermod-installer/main/install.sh | bashThat's it. The installer will:
- Detect your OS, distro, package manager, and desktop
- Install all dependencies (
git,gh,curl,jq,tailscale,warp-cli,cloudflared,htpasswd,openssh, …) via the native package manager — or a binary download fallback if unavailable - Copy 19 scripts to
~/.local/bin/ - Set up SSH keys, dual GitHub CLI profiles, sudoers, and a
systemduser service - Prompt you for share-link credentials (so nothing is hardcoded)
- Verify the install and print a summary
git clone https://github.com/Khan3K/Supermod-installer.git
cd Supermod-installer
./install.sh./install.sh --no-deps # I already have git, gh, jq, …
./install.sh --no-sudo # Don't touch sudoers
./install.sh --no-hyprland # I don't use Hyprland
./install.sh --no-github # Skip the guided GitHub login
./install.sh --prefix=/opt # Install to /opt/bin instead of ~/.local/binOne CLI, total control. Run supermod and see your current Cloudflare
share link at the top, then a full command palette.
Top-level modes
| Command | Effect |
|---|---|
supermod |
Show current share link + help palette |
supermod on |
Start everything (VPN, tunnel, battery, monitor, …) |
supermod off |
Stop everything cleanly |
supermod status |
Live status of every service |
supermod version |
Print the current SuperMod version |
host — Cloudflare localhost share
| Command | Effect |
|---|---|
supermod host / supermod host link |
Show the current public trycloudflare.com link (starts the tunnel if needed) |
supermod host on |
Start the tunnel in the background |
supermod host off |
Stop the tunnel |
supermod host status |
Is the tunnel up? What URL? |
bios — BIOS-safe boot menu
| Command | Effect |
|---|---|
supermod bios on [minutes] |
Power-ons show the boot menu, wait N min (default 1), then auto-boot Linux; entry to real BIOS Setup included |
supermod bios off |
Instant boot (menu disabled) |
supermod bios toggle |
Flip the boot menu on/off |
supermod bios status |
Show boot menu state |
supermod bios now |
Reboot straight into BIOS Setup |
Enabled with supermod on too, re-applied automatically after kernel
and bootloader updates (pacman hook + boot hook).
The share is protected with HTTP Basic Auth — credentials are prompted
at install time, stored in ~/.config/supermod/tunnel-auth (chmod
600), and applied to your web root via .htaccess.
vpn — WARP (Cloudflare)
| Command | Effect |
|---|---|
supermod vpn on |
Connect to WARP |
supermod vpn off |
Disconnect |
supermod vpn rotate |
Force an IP change (disconnect → reconnect) |
supermod vpn cp |
Copy your current public IP to the clipboard |
supermod vpn status |
Show WARP state and your masked IP |
ssh — OpenSSH server
| Command | Effect |
|---|---|
supermod ssh on |
Enable and start sshd (port 22) |
supermod ssh off |
Stop the SSH server |
supermod ssh status |
Is SSH running? |
Other
| Command | Effect |
|---|---|
supermod reset-disp |
Force-restore a stuck or blanked display |
supermod help / -h |
Full help with current share link at top |
What supermod on brings up
- 🔋 Battery care — 20%–80% charge cycle (laptop only)
- 🔒 WARP VPN — Cloudflare's free, fast VPN
- 🌐 Tailscale — mesh networking (if installed)
- 🔗 Cloudflare tunnel — public localhost share with login
- 💤 Sleep prevention —
caffeine-style keep-awake - 🖥️ Display —
Ctrl+Deletetoggles screen off - 🗄️ XAMPP — auto-start if
/opt/lamppexists - 🔑 SSH —
sshdon port 22 - 💻 OpenCode — web IDE on port 4096 (if installed)
- 🩺 Background monitor — auto-reconnects VPN / tunnel if they drop
Designed for your primary identity — private repos, internal work,
backups. Lives in the default ~/.config/gh/ and ~/.ssh/id_ed25519.
| Command | Effect |
|---|---|
pnew <name> |
Create a private repo and push the current directory |
gupdate [msg] |
Pull → commit → push (one command) |
gpush |
Stage, commit, push |
gpull |
Pull latest |
gclone <name> |
Clone one of your repos |
ghstatus |
Show gh auth + git repo status |
gprofile |
Pretty-print your profile + repo list |
gsharch [term] |
List or search your repos |
cd ~/projects/my-app
pnew my-app # private repo + first push
# Daily workflow
gupdate "fixed login bug"
gpush
gpullDesigned for a second identity — public portfolio, OSS releases,
clean history. Fully isolated via a second gh config dir and SSH key.
| Command | Effect |
|---|---|
mnew <name> |
Create a public repo and push the current directory |
trepo <name> |
Transfer a private repo → fresh public repo (wipes history) |
msharch [term] |
List or search Account 2 repos |
cd ~/portfolio/site
mnew site # public repo + first push
# Publish a private project without leaking the old history
trepo secret-project # clones, nukes history, makes new public repoSuperMod sets up two completely independent GitHub identities on one machine. They never collide.
| Account 1 (private) | Account 2 (public) | |
|---|---|---|
| Visibility | private repos | public repos |
| SSH key | ~/.ssh/id_ed25519 |
~/.ssh/id_ed25519_mnew |
| SSH host alias | github.com |
githubproxy.fjygbaifeng.eu.org-mnew |
gh config dir |
~/.config/gh/ |
~/.config/gh-mnew/ |
| Commands | pnew, gclone, gupdate, … |
mnew, trepo, msharch |
Env var to use gh directly |
(default) | GH_CONFIG_DIR=~/.config/gh-mnew |
flowchart LR
subgraph A1["Account 1 — Private 🔒"]
A1SSH["~/.ssh/id_ed25519"]
A1GH["~/.config/gh/"]
A1CMD["pnew · gclone · gupdate<br/>gpush · gpull · gprofile"]
end
subgraph A2["Account 2 — Public 🌍"]
A2SSH["~/.ssh/id_ed25519_mnew"]
A2GH["~/.config/gh-mnew/"]
A2CMD["mnew · trepo · msharch"]
end
GH[("github.com")] --- A1SSH
GHMNEW[("githubproxy.fjygbaifeng.eu.org-mnew")] --- A2SSH
A1CMD --> A1GH
A1GH --> A1SSH
A2CMD --> A2GH
A2GH --> A2SSH
style A1 fill:#1e1b4b,stroke:#a78bfa,stroke-width:2px,color:#fff
style A2 fill:#064e3b,stroke:#22c55e,stroke-width:2px,color:#fff
style GH fill:#0f172a,stroke:#fff,color:#fff
style GHMNEW fill:#0f172a,stroke:#fff,color:#fff
Login once per account:
gh auth login # Account 1
GH_CONFIG_DIR=~/.config/gh-mnew gh auth login # Account 2Add each public key to its respective GitHub account at Settings → SSH and GPG keys → New SSH key.
A killer feature: run any web app on localhost, get a public URL.
flowchart LR
A["🌐 Web server<br/>:80<br/>(XAMPP / Flask /<br/>nginx / etc.)"] -->|"cloudflared<br/>quick tunnel"| B["☁️ trycloudflare.com<br/>(random URL)"]
B -->|"HTTPS +<br/>Basic Auth"| C["👤 Friend<br/>on any device"]
style A fill:#1e293b,stroke:#06b6d4,stroke-width:2px,color:#fff
style B fill:#f59e0b,stroke:#fbbf24,stroke-width:2px,color:#000
style C fill:#22c55e,stroke:#16a34a,stroke-width:2px,color:#fff
cloudflaredruns in the background — no account, no signup, no DNS- The URL is printed once and saved to
~/.supermod-tunnel.log - HTTP Basic Auth gates the share with credentials you set at install time (never hardcoded)
- Works on any web server that listens on a port (XAMPP, nginx, python -m http.server, etc.)
supermod # prints the current link at the top
supermod host link # start (if needed) and print
supermod host off # tear it downSuperMod auto-detects your environment and adapts. The matrix below is what it supports out of the box.
| Distro | Package manager | Status |
|---|---|---|
| Arch Linux / Manjaro / EndeavourOS | pacman (+ yay/paru for AUR) |
✅ Fully tested |
| Ubuntu / Debian / Pop!_OS / Linux Mint | apt |
✅ Fully tested |
| Fedora / Nobara | dnf |
✅ Fully tested |
| openSUSE Tumbleweed / Leap | zypper |
✅ Supported |
| Void Linux | xbps |
✅ Supported |
| Alpine Linux | apk |
✅ Supported |
| Gentoo | emerge (portage) |
✅ Supported |
| NixOS | nix-env |
✅ Supported (user-level) |
| Solus | eopkg |
✅ Supported |
| Slackware | slackpkg |
✅ Supported |
| macOS | Homebrew |
| DE / WM | What SuperMod configures |
|---|---|
| Hyprland | Ctrl+Delete / Ctrl+Backspace screen-toggle keybinds |
| GNOME, KDE Plasma, i3, sway | Detected, no special config needed |
| XFCE, MATE, Cinnamon | Detected, no special config needed |
| Headless / no DE | All features work except display toggle |
| Component | Detection |
|---|---|
| Laptop battery | BAT0 / BAT1 → 20%–80% charge limits |
| VPN | warp-cli (Cloudflare WARP) |
| Mesh | tailscale |
| Web server | XAMPP at /opt/lampp, or any web root |
| OpenCode IDE | optional install, auto-started if present |
All user config lives in ~/.config/supermod/:
| File | Purpose |
|---|---|
batt-start |
Lower battery threshold (default 20) |
batt-end |
Upper battery threshold (default 80) |
pref-vpn |
VPN preference: warp (or protonvpn if you add it back) |
tunnel-auth |
Basic Auth credentials for the share (chmod 600) |
tunnel-port |
Port the tunnel forwards to (default 80) |
htpasswd |
Apache-format password file for .htaccess |
env |
Saved session env for the background monitor |
System state:
| File | Purpose |
|---|---|
~/.supermod-tunnel.log |
cloudflared output (contains your URL) |
/tmp/supermod-monitor.pid |
Background health-monitor PID |
Edit a threshold without reinstalling:
echo 30 > ~/.config/supermod/batt-start
echo 75 > ~/.config/supermod/batt-end| Path | Purpose |
|---|---|
supermod |
Main service manager |
supermod-setup |
First-run wizard (GitHub / SSH / share / doctor) |
supermod-disp |
Display toggle helper |
supermod-wake |
VPN/tunnel restore after sleep |
no-browser |
Browser-suppression helper |
pnew |
Private repo creator (Account 1) |
mnew |
Public repo creator (Account 2) |
trepo |
Private → public transfer |
gupdate / gpush / gpull / gclone |
Git workflow |
ghstatus / gprofile / gsharch |
Account 1 repo tools |
msharch |
Account 2 repo search |
pi |
Pi coding agent |
env / env.fish |
Shell env snippets |
| Path | Purpose |
|---|---|
~/.config/supermod/ |
All SuperMod state |
~/.config/gh-mnew/ |
Account 2 gh config |
~/.ssh/config |
SSH host aliases for both accounts |
~/.ssh/id_ed25519_mnew |
Account 2 SSH key (generated) |
~/.config/systemd/user/supermod-wake.service |
Wake-from-sleep hook |
/etc/sudoers.d/supermod |
Limited NOPASSWD rules (optional) |
The installer drops a supermod-setup wizard that walks you through
everything and uploads the SSH keys for you. This is the easiest path.
supermod-setupflowchart TD
START(["supermod-setup"]) --> MENU{"Pick a step"}
MENU -->|"1"| GH1["🟢 Login main GitHub<br/>(web / PAT / skip)"]
MENU -->|"2"| GH2["🟢 Login second GitHub<br/>(web / PAT / skip)"]
MENU -->|"3"| SSH["🔑 Generate + upload<br/>SSH keys to both accounts"]
MENU -->|"4"| SHARE["🔐 Set Cloudflare share<br/>credentials"]
MENU -->|"5"| DOC["🩺 Run doctor<br/>(18 health checks)"]
MENU -->|"6"| ALL["⚡ Do everything 1→4"]
GH1 --> SSH
GH2 --> SSH
SSH --> SHARE
SHARE --> DOC
ALL --> DOC
DOC --> READY["✅ Ready!<br/>supermod on"]
style START fill:#06b6d4,stroke:#0891b2,stroke-width:2px,color:#fff
style READY fill:#22c55e,stroke:#16a34a,stroke-width:3px,color:#fff
style DOC fill:#ec4899,stroke:#db2777,color:#fff
style GH1 fill:#22c55e,stroke:#16a34a,color:#fff
style GH2 fill:#22c55e,stroke:#16a34a,color:#fff
style SSH fill:#f59e0b,stroke:#d97706,color:#fff
style SHARE fill:#a78bfa,stroke:#7c3aed,color:#fff
Interactive menu:
SUPERMOD SETUP — first-run wizard
1) Connect GitHub — main account 2) Connect GitHub — second account (Account 2) 3) Generate + upload SSH keys 4) Set / change Cloudflare share-link credentials 5) Run doctor (diagnose problems) 6) Do everything (1 → 4)
The wizard supports 3 auth methods for GitHub:
- Web browser — copies a one-time code, you paste it in the browser
- Personal Access Token — paste a pre-made PAT
- Skip — do it later
After you log in, the wizard automatically:
- Generates any missing SSH keys (
ed25519) - Uploads them to your GitHub account(s) via
gh ssh-key add - Tests that SSH-to-GitHub works
- Saves your share-link credentials to
~/.config/supermod/tunnel-auth(chmod 600)
# 1. Login to GitHub (one per account)
gh auth login
GH_CONFIG_DIR=~/.config/gh-mnew gh auth login
# 2. Generate SSH keys (if you don't have them)
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N "" -C "main@github.com"
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_mnew -N "" -C "second@github.com"
# 3. Upload SSH keys to GitHub
gh ssh-key add ~/.ssh/id_ed25519.pub --title "main-$(hostname)"
GH_CONFIG_DIR=~/.config/gh-mnew gh ssh-key add ~/.ssh/id_ed25519_mnew.pub --title "second-$(hostname)"
# 4. Boot the SuperMod stack
supermod on
# 5. Check what's running
supermod status
# 6. (Optional) Get a public link to a web app on :80
supermod host linksupermod-setup doctorRuns 18 health checks and tells you exactly what to fix:
System health check
✓ PATH contains ~/.local/bin
✓ git installed
✓ gh (GitHub CLI) installed
✓ jq installed
✓ cloudflared installed
✓ systemd available
✓ GitHub: main account
✓ GitHub: second account
✓ Internet reachable
...
Summary: 18 passed 1 failed
flowchart TB
CLI["🎛️ supermod CLI<br/>on · off · status · version<br/>vpn · ssh · host · reset-disp"]
subgraph BACKEND["Background services"]
WARP["🔒 WARP VPN<br/>(warp-cli)"]
TUNNEL["☁️ cloudflared<br/>(quick tunnel)"]
TAIL["🌐 Tailscale<br/>(mesh)"]
end
WEB["🗄️ Web root<br/>:80<br/>/opt/lampp · /var/www<br/>.htaccess: Basic Auth"]
MON["🩺 background<br/>health monitor<br/>(every 60s)"]
WAKE["⏰ systemd<br/>wake hook<br/>(on resume from sleep)"]
CLI --> WARP
CLI --> TUNNEL
CLI --> TAIL
TUNNEL -->|"http://localhost:80"| WEB
MON -->|"check + auto-recover"| WARP
MON -->|"check + auto-recover"| TUNNEL
WAKE -->|"trigger"| MON
style CLI fill:#1e293b,stroke:#06b6d4,stroke-width:2px,color:#fff
style WARP fill:#f59e0b,stroke:#fbbf24,stroke-width:2px,color:#000
style TUNNEL fill:#f59e0b,stroke:#fbbf24,stroke-width:2px,color:#000
style TAIL fill:#a78bfa,stroke:#8b5cf6,stroke-width:2px,color:#fff
style WEB fill:#22c55e,stroke:#16a34a,stroke-width:2px,color:#fff
style MON fill:#ec4899,stroke:#db2777,stroke-width:2px,color:#fff
style WAKE fill:#ec4899,stroke:#db2777,stroke-width:2px,color:#fff
The installer says "command not found" after install
~/.local/bin isn't on your PATH. Add this to your ~/.bashrc
(or ~/.zshrc):
export PATH="$HOME/.local/bin:$PATH"Then source ~/.bashrc (or open a new terminal).
supermod host link says "no link yet"
The tunnel takes ~3–10 s to register. Either wait and re-run, or:
tail -f ~/.supermod-tunnel.log # see cloudflared connecting
supermod host link # try againIf cloudflared is missing: ./install.sh --no-deps=false to
re-trigger the dependency pass.
VPN keeps dropping after sleep
Make sure the wake service is enabled and running:
systemctl --user status supermod-wake.service
systemctl --user enable --now supermod-wake.servicescripts/supermod-wake is what re-establishes the WARP connection
after your laptop wakes.
Battery thresholds don't stick on a new laptop
The kernel charge_control_* sysfs files vary by vendor. Run as
root once to find the right path:
find /sys/class/power_supply -name 'charge_control_*'Then update scripts/supermod battery_set_limits() to write to
that path.
I want to re-run the installer
It's safe to re-run. To start fully clean:
./install.shConfig files in ~/.config/supermod/ are preserved if they already
exist (so your share credentials aren't wiped).
The share link requires login from me too — even on localhost
That's by design (Basic Auth protects the share). If you want
localhost to be open while still requiring login on the public
link, add a <Files> exception in your .htaccess for 127.0.0.1.
# Remove scripts
rm -f ~/.local/bin/{supermod,supermod-setup,supermod-disp,supermod-wake,no-browser,pi} \
~/.local/bin/{pnew,mnew,trepo,msharch} \
~/.local/bin/{gupdate,gpush,gpull,gclone,ghstatus,gprofile,gsharch,env,env.fish}
# Remove config (this deletes your share credentials + state)
rm -rf ~/.config/supermod ~/.config/gh-mnew
# Remove systemd hook
systemctl --user disable --now supermod-wake.service 2>/dev/null
rm -f ~/.config/systemd/user/supermod-wake.service
# Remove sudoers rule (only if you opted in)
sudo rm -f /etc/sudoers.d/supermod
# Remove the Account 2 SSH key
rm -f ~/.ssh/id_ed25519_mnew ~/.ssh/id_ed25519_mnew.pub
# Optional: uninstall the dependencies it brought in
sudo pacman -Rns cloudflared warp-cli tailscale # Arch
sudo apt remove cloudflared # Debian/Ubuntu
# …or just leave them — they're all useful- Bash 4+ (any modern distro)
- Linux (systemd recommended; macOS works with caveats)
- Internet during install (to fetch packages)
sudofor the optional passwordless-rules step (skippable with--no-sudo)
Everything else is installed for you.
PRs welcome. The codebase is intentionally small — read install.sh,
then the lib/ and scripts/ directories in that order. Each script
is self-contained and ~50–80 lines.
Ideas for contributions:
- A new distro in
lib/detect.sh+lib/deps.sh - A new GitHub helper in
scripts/ - A new service to wire into
supermod on(e.g. Syncthing, mosh) - Better wake-from-sleep handling for non-laptop hardware
MIT — do whatever you want, just keep the copyright line.
cloudflared— the tunnel binary that powerssupermod host link- Cloudflare WARP — the VPN layer
- Tailscale — mesh networking
- GitHub CLI — the engine behind every
g*andm*command - Hyprland — first-class DE support
SuperMod — because your time is better spent building things than reinstalling your laptop.
⭐ Star this repo if it saved you an afternoon. ⭐