A Clientless, Sovereign, Web-Based Terminal Multiplexer.
AIM-Connect transforms any web browser on any device into a secure, root-level control panel for your Linux server. No SSH keys to carry, no terminal apps to download, and no corporate bouncers. Just raw, unrestricted access to your machine from anywhere on Earth.
Standard SSH requires you to have a dedicated terminal emulator app and your private keys stored on your physical device. If you are on a locked-down corporate laptop, a friend's iPad, or a public library computer, you are locked out of your own server.
AIM-Connect changes the paradigm.
By wrapping standard tmux sessions in a secure WebSocket and serving them through a FastAPI React bridge, you can securely access your running server scripts using nothing but a web browser.
- Clientless SSH Alternative: Access your terminal from Safari, Chrome, or Firefox. No App Store downloads required.
- The "Immortality" Protocol: Built on top of
tmux. Close your browser, put your phone in your pocket, and your scripts keep running. Log back in and instantly re-attach to the live terminal stream. - The Web IDE (Microsoft Monaco Engine): The visual file explorer isn't just a basic text box. It is a fully functional Sovereign Web IDE powered by the exact same engine as VS Code. Tap a script to edit its code with full syntax highlighting, predictive text, line numbers, and a native find/replace mode. Hit "Save" to instantly overwrite the file on your Linux server. You can visually create, rename, and delete files/folders right from your phone.
- Three-Factor Auth (Zero-Trust): Secured by three-layer authentication (Stealth Passphrase + Admin Password + Google Authenticator TOTP), strict API token TTLs, TOTP replay protection, Rate Limiting, and IP Allowlisting. No cloud IdP, no accounts β you own every byte of the auth chain.
- WebAuthn Biometrics (TouchID/FaceID): Optionally bypass the TOTP pipeline by registering your device's secure enclave (FaceID/TouchID/YubiKey) for cryptographic passwordless logins.
- Optional End-to-End Encryption (E2EE): Enter a pre-shared 256-bit AES-GCM secret to cryptographically scramble your keystrokes and terminal outputs in the browser before they hit the WebSocket. This ensures your traffic remains completely opaque even if your SSL reverse proxy is compromised. You can dynamically manage and sync this encryption key directly from the Settings menu.
- Dynamic Custom Macros: Build your own interface. Using the "Commander Toolbar", you can add custom macro buttons (e.g.
pm2 logs\r) on the fly. The app persists your macros securely in your browser's local storage. - Sovereign Mobile Keyboard & Viewport Management: Native iOS and Android keyboards notoriously ruin mobile coding by hijacking the viewport and inserting ghost characters via predictive text. AIM-Connect features a custom, on-screen HTML keyboard with specialized developer keys (
[,],|,\) that dynamically adjusts the viewport to prevent screen clipping. - Tmux GUI Session Control: Never lose your place. AIM-Connect features a built-in session manager. Use the native UI dropdown to create new isolated
tmuxworkspaces, instantly teleport between running tasks, or permanently destroy environments when you are finished. - 100% Free Voice Macro Engine (Speech-to-Terminal): Talk to your terminal without paying API fees or renting cloud seats. AIM-Connect includes a completely free, built-in voice recognition engine. Beyond simple dictation, it features a fully programmable Voice Trigger system. Map any spoken phrase (e.g. "deploy to production") to execute custom terminal commands (
git push && pm2 restart\r) instantly. As we like to say: "Speech-to-text that learns you, not speech-to-text that you have to learn." - Scrollback & Copy Mode: Tap "π Scroll/Copy" to capture the full terminal scrollback buffer. Switch between color-rendered ANSI view and a text-selection mode for easy copy-paste on mobile β something native terminal apps struggle with.
- Collaborative Sovereignty (Multi-User): Stop paying for arbitrary "seat licenses" just to share your own hardware. Because
aim-connectrelies on raw OS-levelptyforks, it natively supports isolated, simultaneous multi-user environments. Share your secure URL and TOTP with a collaborator, and you can both work on the same machineβin the same session or entirely different background sessionsβwithout relying on any third-party account systems or corporate gatekeepers. - Sovereign Agent Gateway (IaaS for Terminals): AIM-Connect can act as a headless terminal backend for your other web applications. External apps can securely route their users to your
aim-connectWebSocket by generating a "Magic Link" JWT signed with a sharedLEADDEED_DOWNLOAD_SIGNING_SECRET.aim-connectvalidates the cryptographic signature and automatically spins up a completely isolated, sandboxed tmux session (e.g.agent-[user_email]) for that user. This provides a secure, sandboxed CLI environment for external users without exposing your root machine or primary dashboard.
- Clone the repository:
git clone https://github.com/BrianV1981/aim-connect.git cd aim-connect - Configure your Environment (
.env):Editcp .env.example .env
.envto configure your settings:NGROK_AUTHTOKEN: (Required if using ngrok) Your token.ALLOWED_IPS: (Optional) A comma-separated list of IPs allowed to access the server (e.g.,192.168.1.5,203.0.113.42). Leave blank or commented out to allow all IPs.
You must compile the React assets before launching the backend.
cd frontend
npm install
npm run build
cd ..cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cd ..You must run the startup script directly in your terminal the very first time to capture your credentials.
./startup.shCRITICAL SETUP INSTRUCTION: On first launch, AIM-Connect auto-generates three credentials and prints them to the console:
- TOTP Secret (QR Code): A QR code for Google Authenticator / Authy. Scan it with your phone.
- Admin Password: A secure random password. Save it in your password manager.
- Stealth Passphrase: A secret passphrase for the "Name" field on the login screen. Save this too β it's your third auth factor.
β οΈ You will never see these credentials again after first launch. If you lose them, delete the corresponding.hashor.secretfile and restart to regenerate.To reset:
rm passphrase.hash && ./startup.sh(orpassword.hash/totp.secret)
- Look at your terminal output to find your secure public URL (e.g.,
https://random-string.ngrok.app). - Open that URL on your phone or remote browser.
- You will be greeted by the AIM Secure login screen with three fields.
- Enter your Stealth Passphrase in the "Name" field, your Admin Password, then your 6-digit TOTP pin from your authenticator app.
- You are in!
AIM-Connect is a Progressive Web App (PWA). You can install it natively on your phone by tapping "Add to Home Screen" in your mobile browser.
If you are running multiple servers (e.g. a Raspberry Pi, a Gaming PC, and a Cloud VPS) and want to have multiple AIM-Connect icons on your phone's home screen, you can easily customize the app name and theme color for each server without modifying any code.
- Open your
.envfile on the server. - Add the following environment variables:
AIM_APP_NAME="Gaming Node" AIM_APP_COLOR="#8b0000"
- Restart the server using
./startup.sh. The backend will dynamically rewrite the PWA manifest so your phone treats it as a completely unique application!
If you want to actively modify the UI, use this split-terminal setup:
-
Terminal 1 (Backend):
cd backend source venv/bin/activate uvicorn main:app --host 0.0.0.0 --port 8000 --reload
-
Terminal 2 (Frontend Dev Server):
cd frontend npm run dev -- --host -
Terminal 3 (The Tunnel): You must expose the frontend over HTTPS to use secure features. You have two options:
Option A (Permanent URL - Requires Ngrok Account):
ngrok http --url=your-static-domain.ngrok-free.dev 5173
Option B (Quick Temporary URL - No Account Needed):
npx -y cloudflared tunnel --url http://localhost:5173
AIM-Connect ships with a hardened, multi-stage Dockerfile:
- Stage 1 builds the React frontend (no Node.js in the final image)
- Stage 2 runs the Python backend as a non-root user (
appuser) - Includes a
HEALTHCHECKendpoint at/api/health - Volume mounts are restricted to
workspace/only β no source code or secrets exposed to the container
Quick start:
cp .env.example .envand fill in yourNGROK_AUTHTOKENandALLOWED_IPS.- Run
docker-compose up -d --build. - Check the logs (
docker logs aim-connect -f) to capture your initial TOTP QR Code, admin password, and stealth passphrase.
By default, AIM-Connect uses Ngrok or Cloudflare Tunnels to easily bypass home NAT firewalls and provide HTTPS out of the box. However, if you want a 100% self-hosted, sovereign setup without relying on third-party tunnel providers, you have three excellent options:
Instead of exposing AIM-Connect to the public internet, install a mesh VPN like Tailscale or WireGuard on both your server and your phone.
- Setup: Bind AIM-Connect to
0.0.0.0or your Tailscale IP. Access it on your phone via the VPN IP (e.g.,http://100.x.x.x:8000). - Pros: Zero public exposure, impossible to port-scan, and HTTPS is technically unnecessary since the VPN tunnel provides native End-to-End Encryption.
- Cons: Requires the VPN app to be active on your client device.
If you want public browser access from any device (e.g., a library computer) without installing a VPN app.
- Setup: Register a free Dynamic DNS domain (like DuckDNS). Forward port
443on your home router to your server. Use Nginx as a reverse proxy with a free Let's Encrypt SSL certificate to terminate HTTPS and forward traffic tolocalhost:8000. - Pros: Completely sovereign, accessible anywhere, no third-party traffic inspection.
- Cons: Exposes an open port on your home network (though AIM-Connect's 3FA protects the application layer).
If you cannot port-forward (e.g., Carrier-Grade NAT, strict corporate firewalls) but still want a public URL without Ngrok.
- Setup: Rent a cheap $5/mo cloud VPS. Run FRP (Fast Reverse Proxy) or an SSH reverse tunnel from your home server to the VPS. Point your domain to the VPS.
- Pros: Bypasses all firewalls, completely self-hosted infrastructure, hides your true home IP address.
- Session Manager (Top Bar): Use the dropdown to swap between active Tmux sessions. Tap
+to spawn a new isolated workspace, orποΈto kill the current one. - File Explorer: Tap
π Filesin the header to toggle the full-screen file browser. Navigate directories, tap any text file to open it in the built-in editor, then hitSaveto write changes directly to the server. Create new files/folders with the+ File/+ Dirbuttons. - Commander Toolbar: Your custom macro buttons live here. Tap
βοΈto open the Macro Library where you can create, edit, pin/unpin, and delete macros. Each macro can be local (π±, stored in your browser) or server-synced (βοΈ, shared across devices). Add\rto a command to auto-press Enter. - Sovereign Keyboard: Tap
β¨οΈto toggle the custom on-screen keyboard. It suppresses the native virtual keyboard to prevent autocorrect and ghost characters. Includes specialized keys forTab,Esc,Ctrl, pipes, brackets, and more. Choose between Standard and Hacker (terminal keys) layouts in Settings. - Voice Dictation: Tap
π€ Voiceto start speech-to-terminal input. Say "Enter", "Send", or "Execute" to submit commands verbally. Use verbal punctuation ("comma", "period", "question mark") for natural dictation. Enable Continuous Loop mode in Settings to keep the mic hot. (Note: Requires a browser that fully supports the Web Speech API like Chrome, Edge, or Safari. Privacy browsers like Brave often do not support this feature.) - Scroll/Copy Mode: Tap
π Scroll/Copyto capture the terminal scrollback. Switch between Color View (rendered ANSI) and Select Text mode for easy copy-paste on mobile. Scroll to the bottom to auto-exit. - Settings: Tap
βοΈ Settingsto configure keyboard layout, auto-capitalization, terminal font size, terminal theme (Standard / High Contrast / Hacker Green), keyboard feedback (audio/haptic/off), and voice dictation options. - WebAuthn Biometrics: Inside the Settings modal, tap "Register FaceID / TouchID" to bind your current device. Once bound, you can simply type your Name on the login screen and tap "Login with FaceID" to bypass the password/TOTP fields entirely.
- End-to-End Encryption: On the login screen, fill out the "E2EE Secret (Optional)" field with a custom string (e.g.,
my_secret_key) before logging in. You must export this exact same string on your server as an environment variable (export E2EE_SECRET="my_secret_key") before starting./startup.sh. If the secrets match, all WebSocket traffic is locally AES-GCM encrypted. To deactivate it, just leave the field blank and don't export the variable on the server.
Caution
FULL ROOT-LEVEL TERMINAL ACCESS AIM-Connect grants full, unbridled terminal execution rights to whatever user executes the backend script. This is the equivalent of exposing SSH to the web.
MANDATORY SECURITY PROTOCOLS:
- HTTPS IS STRICTLY REQUIRED: You must ALWAYS run this application behind a secure SSL/TLS tunnel (like Ngrok, Cloudflare Tunnels, or an Nginx Reverse Proxy). If you run this over raw HTTP, your keystrokes (and TOTP codes) can be trivially intercepted.
- IP Allowlisting: Strongly recommended. Configure
ALLOWED_IPSin your.envto restrict access to trusted networks. - Basic Path Traversal Protection: While the web-UI file endpoints have basic path-traversal blocks to keep navigation scoped, the terminal itself has no such restrictions.
- Protect Your Keys: The
.envfile containing your Ngrok auth tokens and backend secrets must never be committed to source control.
AIM-Connect includes a full pytest test suite covering authentication and security:
cd backend
source venv/bin/activate
pip install -r requirements-test.txt
python -m pytest tests/ -v16 tests covering:
- Three-factor auth flow (passphrase + password + TOTP)
- Individual factor rejection (wrong passphrase, wrong password, wrong TOTP)
- TOTP replay protection
- Rate limiting and lockout
- Session name validation
- Path traversal prevention
- Token expiry and unauthenticated access
Tests also run automatically via GitHub Actions CI on every push and PR to master.
Built with sovereignty in mind.
β Support the project: Buy Me a Coffee
Modular A.I.M. (Actual Intelligent Memory) repositories. Flagship engine: aim-agy.
Active vessels (CLI hosts):
- aim-agy β Core engine / soul (Antigravity CLI). Flagship. Shared nested
aim-agy_os/ships here first. - aim-grok β Grok CLI vessel (hybrid memory, GitOps, wiki, fleet orchestration tooling).
- aim-opencode β OpenCode CLI vessel.
- aim-codex β OpenAI Codex CLI vessel (greenfield nested soul + Codex overlays; primary
main).
Tools & workspaces:
- aim-connect β Self-hosted remote workspace web UI.
- aim-tmux-dashboard β Terminal multi-session monitor.
- aim-browser β Headed Chromium CDP engine + browser skill suite.
- aim-google β Google Workspace CLI (Gmail, Drive, Calendar, β¦).
- aim-flight-recorder β Forensic Markdown session extractor.
- aim-boardroom β Multi-agent orchestration room (OS multiplexing + artifacts).
- aim-skills β Skills index / multi-CLI install registry (agy, grok, opencode, codex).
DNA, comms & lore:
- aim-coagents β DNA bank for sovereign co-agent blueprints.
- aim-knowledge β Public Obsidian vault / deep-lore archive.
- aim-chalkboard β Optional cross-host async git mailbox (PoC; default same-host comms = aim-communicate skill).
Deprecated / not maintained:
- aim β Original Gemini CLI framework. Deprecated after loss of practical subscription access; Great Migration β aim-agy.
- aim-swarm β Legacy Python swarm factory β use aim-coagents + aim-agy spawn.
- aim-claude / Anthropic-line vessels β Done. Operator does not develop against Anthropic. Use aim-agy / aim-grok / aim-opencode / aim-codex.
Full map: see aim-skills docs/AIM_ECOSYSTEM_MAP.md or Operator artifact AIM_ECOSYSTEM_MAP.md.
