Skip to content

hanzhichao/zshell

Repository files navigation

ZShell

A modern, cross-platform SSH client built with Tauri 2, Next.js 15, and shadcn/ui. Inspired by Termius.

ZShell screenshot


Features

  • Multiple auth methods — password, private key, and key + passphrase
  • Smooth terminal — xterm.js with full color, scrollback, and resize support
  • SFTP file manager — browse, upload, download, create folders, delete files
  • Host groups — organize servers into color-coded groups
  • Table & Card views — switch between compact table and visual card layout
  • Theme support — light, dark, and system modes (default: light)
  • Encrypted storage — passwords and private keys encrypted with AES-256-GCM before being stored in SQLite
  • Native desktop — runs as a native app on macOS, Windows, and Linux via Tauri

Tech Stack

Layer Technology
Desktop shell Tauri 2
Frontend Next.js 15 (App Router, static export)
UI components shadcn/ui + Tailwind CSS v4 + lucide-react
Terminal xterm.js v5
State Zustand
Database SQLite via tauri-plugin-sql
SSH / SFTP ssh2 (Rust)
Encryption AES-256-GCM via aes-gcm (Rust)

Getting Started

Prerequisites

Development

# Install dependencies
pnpm install

# Start dev mode (Next.js + Tauri hot reload)
pnpm tauri dev

Production build

# macOS / Linux
pnpm tauri build

# macOS x86_64
pnpm tauri build --target x86_64-apple-darwin

# Windows (cross-compile)
pnpm tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc

# Android APK
pnpm tauri android init
pnpm tauri android build --apk

# iOS
pnpm tauri ios init
pnpm tauri ios build

Distributable bundles are written to src-tauri/target/release/bundle/.


Project Structure

zshell/
├── src/                        # Next.js frontend
│   ├── app/                    # App Router pages & layout
│   ├── components/
│   │   ├── layout/             # AppShell, Sidebar, TabBar, ThemeToggle
│   │   ├── hosts/              # HostList, HostCard, HostDialog, GroupDialog
│   │   ├── terminal/           # TerminalPane (xterm.js)
│   │   ├── sftp/               # FileManager (upload / download)
│   │   ├── providers/          # ThemeProvider
│   │   └── ui/                 # shadcn components
│   ├── lib/
│   │   ├── db.ts               # SQLite CRUD helpers
│   │   ├── store.ts            # Zustand global state
│   │   └── types.ts            # TypeScript types
│   └── styles/globals.css
└── src-tauri/                  # Rust backend
    ├── src/
    │   ├── lib.rs              # Tauri commands (SSH, SFTP, crypto)
    │   └── crypto.rs           # AES-256-GCM encryption
    └── capabilities/           # Tauri permission config

Security

  • Credentials are never stored in plain text. Passwords and private keys are encrypted with AES-256-GCM using a per-installation key stored in the OS app-data directory.
  • The encryption key is generated on first launch and stored locally — it never leaves your machine.
  • Network connections are made directly from Rust using the ssh2 crate; no credentials are transmitted through the web-view layer.

License

MIT

About

ssh client

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors