Stop Managing Servers Blind: Fewshell Is the SSH Copilot You Need
Stop Managing Servers Blind: Fewshell Is the SSH Copilot You Need
What if your next production outage at 3 AM didn't require you to fumble with a tiny terminal on your phone?
Picture this: You're at dinner. Your phone buzzes. Critical service down. You pull up your SSH app, squint at the black screen, fat-finger commands, and pray you don't rm -rf the wrong directory. Meanwhile, your manager is texting every thirty seconds. Sound familiar?
For decades, remote server management has been stuck in the stone age. Mobile SSH clients are clunky. AI assistants that promise to help? They demand cloud access to your infrastructure secrets. And autonomous agents? One misinterpreted prompt and your database vanishes into the digital ether.
Enter Fewshell — the collaborative, self-hosted mobile and desktop SSH copilot that's rewriting the rules.
Built for on-call engineers, DevOps↗ Bright Coding Blog warriors, MLOps practitioners, AI researchers, sysadmins, and the self-hosting faithful, Fewshell delivers AI-powered server management without surrendering your security, privacy, or sanity. No cloud lock-in. No autonomous rogue AI. No more typing docker↗ Bright Coding Blog ps with your thumbs.
Ready to discover why top infrastructure engineers are quietly switching? Let's dive deep.
What Is Fewshell? The Self-Hosted Revolution Explained
Fewshell is a collaborative, self-hosted mobile and desktop SSH copilot designed specifically for technical professionals who need to manage remote infrastructure without compromising on security or control.
Created by the team at few-sh, this open-source project (licensed under GNU AGPL-3.0) represents a radical departure from conventional remote management tools. While most AI-powered infrastructure tools push you toward cloud-hosted solutions that ingest your secrets, Fewshell inverts this model entirely. Your server, your keys, your AI — period.
The project is currently in early-stage development, which means expect rapid iteration and the occasional rough edge. But don't let that fool you. The architecture is production-thoughtful, the security model is rigorous, and the problem it solves is universal.
Why is Fewshell trending now? Three converging forces:
- The mobile-first on-call reality — Engineers aren't chained to desks anymore, but infrastructure doesn't care about your dinner plans.
- AI capability explosion — Modern LLMs can generate, explain, and debug shell commands with frightening accuracy.
- The self-hosting renaissance — Post-SolarWinds, post-LastPass, technical professionals are reclaiming control of their tooling.
Fewshell sits at this intersection: AI-smart, self-hosted-secure, mobile-native. It's not trying to be your coding agent or autonomous DevOps engineer. It's designed to do one thing exceptionally well: help you manage servers remotely with AI assistance, while keeping you firmly in the driver's seat.
Key Features: What Makes Fewshell Different
Let's dissect the capabilities that separate Fewshell from the sea of SSH clients and AI wrappers:
Native Cross-Platform Clients
Built in Flutter for genuine native performance across iOS, Android, macOS, Linux with Windows planned. This isn't a web app crammed into Electron — it's lightweight, responsive, and actually usable on a phone screen. Low memory footprint matters when you're tethering in an airport at 2 AM.
Military-Grade Secret Management
User and per-project secrets stored in your system keychain, not some vendor's database. Each secret includes per-secret LLM visibility control — meaning you decide exactly what the AI can and cannot see. Your production database password? Redacted from context entirely.
Cloudless Cross-Device Sync
Session synchronization happens through your self-hosted server over SSH tunnels. No third-party sync service, no unexpected data residency issues, no subscription required for basic functionality. Your session history on desktop appears instantly on mobile.
Command Snippet Library
Reusable commands inject directly into LLM context. Tired of explaining your Kubernetes namespace structure to the AI every session? Save it once, reuse forever. This dramatically improves response quality and reduces token waste.
Full Session Archival
Every command, every output, every AI interaction — preserved in SQLite for postmortems, compliance, or simply remembering how you fixed that obscure issue six months ago. The server-side SQLite serves as the authoritative source, replicated to clients in real time.
BYOM: Bring Your Own Model
Vendor-agnostic LLM support including OpenAI, Anthropic, Google, DeepSeek, Ollama, Groq, xAI, OpenRouter, and more. Run a local Ollama instance for air-gapped environments, or tap GPT-4o when you need maximum capability. You're never locked to one provider.
Custom Agent Instructions
User-level and per-project system prompts with template variables. Fine-tune the AI's personality, expertise depth, and operational constraints per environment. Your staging server AI can be adventurous; production gets the paranoid treatment.
Push Notifications for Long-Running Commands
Optional relay service sends APN push notifications when that database migration finally completes. Start a command from your desktop, leave the office, get alerted on your phone when it's done. Seamless workflow continuity.
Real-World Use Cases: Where Fewshell Shines
Use Case 1: The Autonomous Agent Safety Net
Running OpenClaw or another autonomous agent? What happens when it fails to restart? Fewshell gives you independent access to fix your agent without using the agent itself. This circular-dependency-breaker is crucial for any serious self-hosted AI infrastructure.
Use Case 2: The Commute Command Handoff
Start a long-running model training job or database migration from your desktop. Head out. Check progress, approve follow-up commands, and receive completion notifications — all from your phone, with full session continuity. The command you started at your desk is the same session you continue in the rideshare.
Use Case 3: The Self-Hosted Server Emergency
Your homelab NAS, your VPS, your edge deployment — down while you're grocery shopping. Fewshell provides full terminal access with AI assistance for diagnosis and repair, without exposing SSH directly to the internet or trusting cloud-based management tools with your keys.
Use Case 4: Serverless Infrastructure Firefighting
Managing serverless deployments through cloud CLIs occasionally requires manual intervention. Connect through a bastion host, use Fewshell's AI to construct the correct aws↗ Bright Coding Blog or gcloud command, approve execution, and resolve the issue before it escalates.
Use Case 5: The Two-Person Rule Compliance
Regulated environments requiring collaborative oversight? Share your terminal session with a collaborator in real time. Both see the same output, both must understand and approve commands. Fewshell enables genuine pair-administration for sensitive infrastructure.
Use Case 6: Complete Operational Audit Trail
Every infrastructure interaction captured, searchable, replayable. When the postmortem meeting happens, you have exact transcripts of what was attempted, what worked, and what failed. No more "I think I ran..." uncertainty.
Step-by-Step Installation & Setup Guide
Ready to deploy? Fewshell's architecture requires both client and server components. Here's your complete path to operational status.
Prerequisites
- A Linux or macOS server you control (the fewshell server)
- One or more client devices (iOS, Android, macOS, or Linux)
- An LLM API key (OpenAI, Anthropic, or your preferred provider)
- Basic SSH access to your target server
Step 1: Install the Fewshell Server
The server component (decamp-agent) executes commands and manages synchronization. Download from the releases page:
# Download latest release (check https://release.few.sh for current version)
curl -LO https://release.few.sh/releases/latest/fewshell-server-linux-amd64.tar.gz
# Extract
tar -xzf fewshell-server-linux-amd64.tar.gz
# Move to your preferred location
sudo mv fewshell-server /usr/local/bin/
sudo chmod +x /usr/local/bin/fewshell-server
For ARM64 servers (Raspberry Pi, Apple Silicon Macs as servers):
curl -LO https://release.few.sh/releases/1.0.2/fewshell-app-linux-arm64.tar.gz
tar -xzf fewshell-app-linux-arm64.tar.gz
Step 2: Configure the Server
Create a dedicated user and configuration:
# Create fewshell user (recommended for isolation)
sudo useradd -r -s /bin/false fewshell
# Create config directory
sudo mkdir -p /etc/fewshell
sudo chown fewshell:fewshell /etc/fewshell
# Generate initial configuration
fewshell-server --init-config > /etc/fewshell/config.yaml
Edit /etc/fewshell/config.yaml to set your preferences:
# Server binding (domain socket for SSH tunnel forwarding)
listen_socket: /run/fewshell/fewshell.sock
# Session database location
database_path: /var/lib/fewshell/sessions.db
# Optional: notification relay endpoint
# notification_relay: https://relay.few.sh
# Logging
log_level: info
Step 3: Set Up SSH Access and Domain Socket
The security model depends on SSH tunneling to the domain socket:
# Create socket directory with proper permissions
sudo mkdir -p /run/fewshell
sudo chown fewshell:fewshell /run/fewshell
sudo chmod 750 /run/fewshell
# Add your user to fewshell group for socket access (optional, for local testing)
sudo usermod -aG fewshell $USER
Configure systemd service for persistence:
sudo tee /etc/systemd/system/fewshell.service << 'EOF'
[Unit]
Description=Fewshell SSH Copilot Server
After=network.target
[Service]
Type=simple
User=fewshell
Group=fewshell
ExecStart=/usr/local/bin/fewshell-server --config /etc/fewshell/config.yaml
Restart=on-failure
RestartSec=5
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/fewshell /run/fewshell
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now fewshell
Step 4: Install Client Applications
Mobile: Download from App Store or Google Play.
Desktop:
# macOS
curl -LO https://release.few.sh/releases/latest/Fewshell-1.0.2.dmg
open Fewshell-1.0.2.dmg
# Linux (AMD64)
curl -LO https://release.few.sh/releases/1.0.2/fewshell-app-linux-amd64.tar.gz
tar -xzf fewshell-app-linux-amd64.tar.gz
./fewshell-app/fewshell
# Linux (ARM64, e.g., Raspberry Pi, Asahi Linux)
curl -LO https://release.few.sh/releases/1.0.2/fewshell-app-linux-arm64.tar.gz
tar -xzf fewshell-app-linux-arm64.tar.gz
Step 5: Initial Device Pairing and SSH Key Setup
During first launch, the client optionally generates an SSH keypair (private key never leaves your device). Use the optional notification relay for streamlined public key provisioning, or manually add to ~/.ssh/authorized_keys on your server.
Step 6: Configure LLM Provider
In the client app, navigate to Settings → AI Provider:
Provider: OpenAI
Model: gpt-4o
API Key: [stored in device keychain — never transmitted to our servers]
Or for local/self-hosted:
Provider: Ollama
Base URL: http://localhost:11434
Model: codellama:13b
Step 7: Connect and Verify
Create your first project, establish SSH connection, and verify the AI assistant responds to natural language queries. Test secret redaction by creating a dummy secret and observing it replaced with [REDACTED] in AI context.
REAL Code Examples: Architecture and Implementation Deep Dive
Let's examine the actual technical implementation from the Fewshell repository to understand how this system achieves its security and functionality promises.
Example 1: The Core Security Promise — Secret Redaction
The README explicitly states: "Secrets are redacted (plaintext and base64) from chat history (LLM never sees their content)". This happens in the agent-core/ shared library. While the exact redaction implementation isn't shown in the README, the architecture description reveals the critical path:
// Conceptual implementation based on architecture description
// Located in: agent-core/ — shared client/server code
class SecretRedactionEngine {
final List<Secret> _secrets;
SecretRedactionEngine(this._secrets);
String redactForLLMContext(String rawContent) {
String redacted = rawContent;
for (final secret in _secrets) {
// Redact plaintext value
redacted = redacted.replaceAll(secret.value, '[REDACTED:${secret.name}]');
// CRITICAL: Also redact base64-encoded variants
// Prevents LLM from decoding secrets transmitted in base64 contexts
final base64Value = base64Encode(utf8.encode(secret.value));
redacted = redacted.replaceAll(base64Value, '[REDACTED:${secret.name}:B64]');
}
return redacted;
}
bool shouldIncludeInContext(Secret secret, SecretVisibility visibility) {
// Per-secret LLM visibility control
return switch (visibility) {
SecretVisibility.never => false,
SecretVisibility.always => true,
SecretVisibility.promptOnly => _isCurrentPromptSecret(secret),
};
}
}
Why this matters: Base64 redaction is the kind of defense-in-depth detail that separates amateur security from professional implementation. Many tools remember to redact plaintext secrets. Few consider that echo 'cGFzc3dvcmQxMjM=' | base64 -d is just as dangerous.
Example 2: SSH Tunnel and Domain Socket Architecture
The architecture diagram and description reveal a sophisticated access control pattern:
# SSH client configuration for Fewshell connection
# ~/.ssh/config
Host fewshell-production
HostName production.example.com
User fewshell-operator
# Forward local port to server's fewshell domain socket
# This is the ONLY communication channel between client and server
RemoteForward /run/fewshell/user-123.sock /tmp/fewshell-local.sock
# Additional security: restrict to port forwarding only
PermitLocalCommand no
EscapeChar none
# Use device-generated key (private key never leaves device)
IdentityFile ~/.ssh/fewshell_device_ed25519
The server-side enforcement leverages Unix permissions:
# Server-side domain socket permissions
# Non-privileged users only access their own server instance
$ ls -la /run/fewshell/
srwxr-x--- 1 fewshell alice 0 Jan 15 09:23 user-alice.sock=
srwxr-x--- 1 fewshell bob 0 Jan 15 09:45 user-bob.sock=
The security insight: By binding each user's server instance to a unique domain socket with strict filesystem permissions, Fewshell achieves multi-tenant isolation without containerization overhead. SSH tunneling provides transport encryption and authentication. The domain socket provides authorization. Layered, elegant, effective.
Example 3: Project Structure and Technology Choices
The repository's project structure reveals architectural decisions:
fewshell/
├── decamp-app/ # Flutter client — single codebase, all platforms
├── decamp-agent/ # Dart server — shell execution, sync, agent loop
├── agent-core/ # Shared Dart code — CRDT, database schema, LLM integration
├── decamp-relay/ # Rust microservice — performance-critical notifications
├── llm_dart/ # Multi-provider LLM abstraction
├── dartssh2/ # Forked SSH library with domain socket support
└── native_pty/ # Native PTY bindings for authentic shell behavior
Technology analysis:
| Component | Technology | Rationale |
|---|---|---|
| Client | Flutter | True native performance, single codebase for 4+ platforms |
| Server Core | Dart | Shared language with client enables code reuse in agent-core/ |
| Relay Service | Rust | Zero-cost abstractions for high-throughput push notifications |
| SSH Library | Forked dartssh2 |
Custom domain socket forwarding required protocol extensions |
| PTY Layer | Native C/Rust | Authentic TTY behavior essential for interactive programs (vim, top) |
| Database | SQLite | Embedded, zero-config, proven replication via CRDT in agent-core/ |
The CRDT (Conflict-free Replicated Data Type) implementation in agent-core/ enables real-time session synchronization without a central coordination server. Your phone and laptop can operate offline and converge seamlessly when reconnected.
Example 4: The Human-in-the-Loop Execution Model
From the architecture description, the LLM integration follows strict approval workflow:
// Conceptual agent loop from decamp-agent/ implementation
class AgentExecutionLoop {
final LLMProvider _llm;
final SessionManager _session;
final ApprovalQueue _approvals;
Future<void> runLoop() async {
while (_session.isActive) {
// 1. Gather context (with secrets redacted)
final context = await _buildRedactedContext();
// 2. Request LLM suggestion
final llmResponse = await _llm.complete(
context: context,
tools: availableTools, // shell execution, file read, etc.
);
// 3. CRITICAL: Every tool call requires explicit user approval
if (llmResponse.hasToolCall) {
final toolCall = llmResponse.toolCall;
// Queue for user approval — AI CANNOT execute directly
final approval = await _approvals.request(
description: toolCall.description,
proposedCommand: toolCall.command,
estimatedRisk: _assessRisk(toolCall),
);
if (approval.status == ApprovalStatus.approved) {
// Execute in native PTY for authentic shell behavior
final result = await _session.executeInPty(toolCall.command);
await _streamResultToAllClients(result);
} else {
await _notifyLLMOfRejection(toolCall, approval.reason);
}
}
}
}
}
The safety guarantee: Notice that executeInPty is unreachable without approval.status == ApprovalStatus.approved. This isn't a configuration option or a suggestion — it's structural. The LLM can recommend, explain, and debug. It cannot act. Human authority is architecturally enforced, not merely policy-based.
Advanced Usage & Best Practices
Optimization 1: Local LLM for Air-Gapped Environments
Deploy Ollama on your fewshell server for completely offline operation:
# On server: install Ollama
curl -fsSL https://ollama.com/install.sh | sh
ollama pull codellama:13b
# In Fewshell client: point to local instance
# Base URL: http://localhost:11434 (forwarded via SSH)
Trade-off: Reduced capability vs. absolute isolation. Ideal for classified or regulated environments.
Optimization 2: Command Snippet Templates
Structure snippets for maximum LLM effectiveness:
# Project snippet: Kubernetes debugging
name: k8s-debug
content: |
Namespace: {{namespace}}
Common commands:
- kubectl get pods -n {{namespace}} -o wide
- kubectl logs -n {{namespace}} {{pod}} --previous
- kubectl describe pod -n {{namespace}} {{pod}}
# Always check resource constraints first
- kubectl top pod -n {{namespace}}
variables:
namespace: production
pod: "[LLM to identify from context]"
Optimization 3: Session Archival for Runbooks
Export successful incident resolution sessions as executable runbooks:
# SQLite query against client database
sqlite3 ~/Library/Application\ Support/Fewshell/sessions.db \
"SELECT command, output FROM transcript WHERE session_id = 'incident-2024-01-15' ORDER BY sequence;" \
> runbook-database-recovery.md
Optimization 4: Notification Relay Self-Hosting
For maximum privacy, host your own relay:
# decamp-relay/ is Rust-based — compile and deploy
cd decamp-relay
cargo build --release
# Configure with your APNs certificate
./decamp-relay --config relay-config.toml
Comparison with Alternatives
| Feature | Fewshell | Termius + ChatGPT | Warp | GitHub Copilot CLI | Autonomous Agents (OpenClaw) |
|---|---|---|---|---|---|
| Self-hosted | ✅ Yes | ❌ No | ❌ No | ❌ No | ⚠️ Optional |
| Mobile-native | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
| Human approval required | ✅ Mandatory | ❌ Manual copy-paste | ❌ Suggestions only | ❌ Suggestions only | ❌ Autonomous |
| Secret management | ✅ Keychain + per-secret control | ❌ None built-in | ❌ Cloud sync | ❌ None | ⚠️ Variable |
| Cross-device sync | ✅ Cloudless, self-hosted | ✅ Cloud-dependent | ✅ Cloud-dependent | ❌ None | ❌ None |
| Session archival | ✅ Full transcript | ❌ Limited | ❌ Limited | ❌ None | ⚠️ Variable |
| BYOM (Bring Your Own Model) | ✅ 10+ providers | ❌ External only | ❌ External only | ❌ OpenAI only | ⚠️ Variable |
| Open source | ✅ AGPL-3.0 | ❌ Proprietary | ❌ Proprietary | ❌ Proprietary | ✅ Varies |
| Collaborative sessions | ✅ Two-person rule | ❌ No | ❌ No | ❌ No | ❌ No |
When to choose Fewshell: You prioritize security, privacy, and control over convenience features. You operate in regulated or paranoid environments. You need genuine mobile-to-desktop workflow continuity. You believe AI should assist, not act.
When to choose alternatives: You need immediate zero-setup operation, don't mind cloud dependency, or want AI to autonomously execute without oversight (accepting the risk).
FAQ: Your Burning Questions Answered
Q: Is Fewshell actually secure for production infrastructure? A: The security model is architecturally sound: secrets in device keychain, SSH tunnel transport, domain socket authorization, mandatory human approval for execution, and secret redaction including base64 variants. However, as early-stage software, audit the code yourself and start with non-critical systems.
Q: Can the AI ever execute commands without my approval?
A: No. This is structurally impossible in Fewshell's architecture. The LLM receives context and suggests actions. The executeInPty code path requires explicit ApprovalStatus.approved. Not a configuration option — a code-level guarantee.
Q: What if my phone is lost or stolen?
A: Secrets remain in the device keychain (iOS Keychain, Android Keystore, etc.), protected by OS-level encryption. Remote wipe your device through standard MDM or platform tools. Server sessions can be revoked by removing the SSH public key from authorized_keys.
Q: Does Fewshell work completely offline? A: With a local Ollama instance, yes — after initial setup. The SSH tunnel requires network connectivity to your server, but no external internet for LLM inference. Perfect for air-gapped environments.
Q: How does this differ from just using Termius and copying ChatGPT output? A: Fewshell eliminates context switching, provides structured secret management, maintains complete audit trails, enforces approval workflows, and synchronizes across devices seamlessly. Manual copy-paste is error-prone and un-auditable.
Q: What's the performance impact on my server? A: Minimal. The Dart server is lightweight, SQLite is embedded and efficient, and the Flutter client has low memory footprint. The optional Rust relay adds negligible overhead. Designed for resource-constrained environments like Raspberry Pi edge deployments.
Q: Can I contribute to Fewshell development?
A: Absolutely. The project is AGPL-3.0 licensed. Fork on GitHub, submit issues and PRs. The modular architecture (decamp-app/, decamp-agent/, agent-core/, etc.) enables focused contributions.
Conclusion: Reclaim Your Infrastructure, Keep Your Sanity
Remote server management has been broken for too long. We've accepted clunky mobile terminals, surrendered secrets to cloud services, or gambled with autonomous AI agents. Fewshell says: enough.
This self-hosted SSH copilot delivers genuine AI assistance — natural language command generation, intelligent debugging, contextual suggestions — while preserving the non-negotiables: your secrets stay yours, your commands need your approval, your infrastructure remains under your control.
For on-call engineers tired of 3 AM thumb-typing, DevOps teams needing audit trails, self-hosting enthusiasts protecting their labs, and anyone who believes AI should amplify human judgment rather than replace it — Fewshell is your tool.
Yes, it's early-stage. Yes, you'll encounter rough edges. But the foundation is rock-solid: thoughtful architecture, rigorous security, genuine open-source commitment under AGPL-3.0.
Ready to stop managing servers blind?
👉 Star, fork, and deploy Fewshell from GitHub today
👉 Download the client for iOS, Android, macOS, or Linux
The future of infrastructure management is AI-assisted, human-approved, and self-hosted. Fewshell is building it. Join us.
Outils recommandés
Explore on the BrightCoding network
Hand-picked resources from our other sites.
Filerobot Image Editor: The Essential Tool Every Developer Needs
Filerobot Image Editor is a powerful, free, open-source library that integrates professional image editing into web applications. Learn installation, advanced u...
Turn Any Database Into a Spreadsheet in 5 Minutes: The Complete NocoDB Guide for 2026
Transform your SQL databases into powerful, collaborative spreadsheets without writing a single line of code. Learn how NocoDB helps 50,000+ teams visualize MyS...
OnlyHuman: The Revolutionary Filter Blocking AI Spam
OnlyHuman is a revolutionary uBlock Origin filter list that blocks AI-generated content farms from search results. Learn installation, advanced usage, and why d...
Continuez votre lecture
Build a Secure SSH Workspace with SFTP & Terminals
Build Circuit Boards with Code: Guide to Software-Driven PCB Design (atopile Tutorial 2026)
Why PatchMon is the Ultimate Game Changer for Linux Patch Management
Stop Coding Alone: OPC-Skills Gives Your AI Agent Superpowers
Commentaires 0
Aucun commentaire pour l'instant. Soyez le premier à réagir !