Pier-X
An IDE-style desktop workbench for terminal, Git, SSH, databases, and remote ops.
中文 ·
English
---
Pier-X is the cross-platform successor to [Pier](https://github.com/chenqi92/Pier) (macOS-only) — same name, same purpose, rebuilt for backend / SRE engineers who need one app instead of five. The stack is **Rust core + Tauri 2 + React + TypeScript**, targeting **macOS** and **Windows** first with Linux kept on the long-term path.
> The full product spec lives in [docs/PRODUCT-SPEC.md](docs/PRODUCT-SPEC.md) (Chinese, authoritative). Visual tokens are in [.agents/skills/pier-design-system/SKILL.md](.agents/skills/pier-design-system/SKILL.md). Code rules are in [CLAUDE.md](CLAUDE.md).
## Features
The UI is a three-pane IDE layout — **left Sidebar + center Tab workspace + right tool panel** — and every Tab carries its own "right tool" preference.
### Center workspace
- **Terminal** — xterm.js + `pier-core::terminal::PierTerminal`.
- Three backends: local PTY (forkpty / ConPTY), SSH shell, and saved SSH connections (passwords resolved from the OS keyring at connect time).
- 256 / RGB color, SGR, visual + audio bell, configurable scrollback, copy-on-select / clipboard paste, custom right-click menu.
- **Markdown** — auto-renders the `.md` file selected in the left Sidebar (pulldown-cmark, CommonMark + GFM).
- **Welcome** — shown when no Tab is open: new local terminal / new SSH / recent connections / settings / command palette.
### Left Sidebar
- **Files** — rooted at `~`, with breadcrumbs and a Places dropdown. Click a Markdown file to preview on the right; double-click a directory to open a local terminal there.
- **Servers** — every saved SSH connection (YAML file + OS keyring). Search, edit, delete; click to open an SSH Tab.
### Right tool panels (per-Tab)
| Tool | Scope | Highlights |
|---|---|---|
| **Git** | Any | Overview · diff · stage / unstage · commit · push / pull · branches · history graph (`git2` topology) · stash · tags · remotes · config · rebase · submodules · conflicts |
| **Server Monitor** | SSH | uptime · load · memory/swap · disk · CPU% · process list (user-triggered, no polling) |
| **Docker** | Local / SSH | Containers / Images / Volumes / Networks / Compose Projects; start · stop · restart · remove · inspect · pull · prune · registry proxy |
| **MySQL / PostgreSQL** | Any | Auto SSH tunnel; database / schema / table browser; CodeMirror SQL editor; result grid + TSV export; **read-only by default**, writes require explicit unlock + confirmation |
| **Redis** | Any | Pattern scan + TTL; string / list / hash / set / zset / stream detail; command editor; dangerous commands (FLUSHALL / KEYS \*) require confirmation |
| **SQLite** | Local | Pick a `.db` file; table/column metadata; queries; same read-only default |
| **Log** | SSH | File / System (syslog / nginx / dmesg / journald / docker) / Custom sources; frontend-driven drain model to avoid event storms |
| **SFTP** | SSH | Remote file browser, upload / download (progress events), chmod dialog, in-panel CodeMirror editor (≤ 5 MB, UTF-8 lossy substitution + warning bar) |
| **Firewall** | SSH | Auto-detected backend (firewalld / ufw / nft / iptables); Listening / Rules / Mappings / Traffic tabs; **writes are injected into the terminal** for the user to review, never executed silently |
| **Markdown** | Any | Renders the `.md` file selected on the left |
### Cross-cutting
- **Command palette** (`⌘K` / `Ctrl+K`), new terminal (`⌘T`), new SSH (`⌘N`), close Tab (`⌘W`), settings (`⌘,`), Git panel (`⌘⇧G`).
- **Theming** — `dark` / `light` / `system`, every visual value sourced from `src/styles/tokens.css`.
- **i18n** — English and Simplified Chinese.
- **Credentials** — SSH passwords and key passphrases go through `pier-core::credentials` → OS keyring (macOS Keychain / Windows Credential Manager / Linux secret-service). Never written to files or logs.
- **SSH tunnel manager** — `PortForwardDialog` lists every active local forward and lets you add / close them; tunnels auto-opened by DB / Log panels show up here too.
## Architecture
```
┌────────────────────────────────────────────────────┐
│ Tauri 2 + React 19 + TypeScript (shell) │ src/
├────────────────────────────────────────────────────┤
│ Tauri command layer (Rust) │ src-tauri/
├────────────────────────────────────────────────────┤
│ pier-core (Rust core) │ pier-core/
├────────────────────────────────────────────────────┤
│ PTY · SSH · SFTP · Git · MySQL · PG · SQLite · │
│ Redis · Docker · Server Monitor · Markdown · … │
└────────────────────────────────────────────────────┘
```
Hard rules (see [CLAUDE.md](CLAUDE.md) for the full list):
- `pier-core` depends on **no** UI crate (no `tauri`, no `gpui`, no `qt`).
- The frontend never bypasses Tauri to reach `pier-core`.
- Tauri commands stay thin; business logic lives in `pier-core`.
## Build & run
### Requirements
- Node.js 24+, npm 11+
- Rust 1.88+
- WebView2 runtime on Windows
### Commands
```bash
npm install # install frontend deps
npm run tauri dev # dev: vite + tauri dev
npm run tauri build # release build
npm run build:debug # debug build
cargo build -p pier-core # backend only
```
## Installation
The current primary install path is the platform bundle attached to
[GitHub Releases](https://github.com/chenqi92/Pier-X/releases). Each GitHub
Release also attaches package-manager metadata:
- Homebrew cask: `pier-x-homebrew-cask-v