diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..290a2f3 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,23 @@ +# Code of Conduct + +Pebrel welcomes contributors and users with different backgrounds and levels of experience. + +## Participation + +- Treat other people with respect. Discuss code and ideas without personal attacks. +- Give constructive feedback and make space for questions and differing perspectives. +- Do not harass, threaten, discriminate against, or publish private information about others. +- Keep issues, pull requests, and project discussions relevant and free of spam. + +## Reporting + +Report conduct concerns privately to **fickleheartedkeys@163.com**. Include links +and enough context for the maintainers to review the situation. Do not include +unrelated private information. + +Maintainers may remove inappropriate content or restrict participation when needed +to protect project discussions. Reports will be handled with respect for the +privacy of those involved. + +This policy applies to the project's issues, pull requests, discussions, and other +spaces administered by the Pebrel maintainers. diff --git a/INSTALL.md b/INSTALL.md index a31eabf..a486cbf 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -5,23 +5,22 @@ Older releases keep their original filenames. Use the new installer to migrate an existing Nebula installation; configuration migration is handled by the application at startup. -## Linux Preview +## Linux -Cross-platform Preview runs provide three Linux x86_64 assets. They are test -builds rather than stable releases. +Stable releases provide three Linux x64 packages. - Debian/Ubuntu: install - `Pebrel-v-preview.-linux-x86_64.deb` with - `sudo apt install ./Pebrel-v-preview.-linux-x86_64.deb`. - Remove it with `sudo apt remove pebrel-preview`. + `Pebrel-v-linux-x64.deb` with + `sudo apt install ./Pebrel-v-linux-x64.deb`. + Remove it with `sudo apt remove pebrel`. - AppImage: make - `Pebrel-v-preview.-linux-x86_64.AppImage` executable and + `Pebrel-v-linux-x64.AppImage` executable and run it directly. It does not register itself with the system package manager. - Portable archive: extract the `tar.gz` and run its `AppRun` launcher. Keep the AppDir layout intact so bundled libraries are found correctly. -The initial Preview target is Linux x86_64 with glibc 2.35 or newer. The -Preview workflow is configured to build on Ubuntu 22.04 and run the same +The Linux target is x86_64 with glibc 2.35 or newer. The +release workflow builds on Ubuntu 22.04 and runs the same Runtime API conformance suite against the final AppImage under X11 and Wayland, and against the installed Debian package under X11. @@ -31,19 +30,19 @@ passphrases requires `libsecret-tools` and an unlocked Secret Service keyring recommends these dependencies. If storage is unavailable, enter the secret for the current connection instead; Pebrel does not silently claim to save it. -## macOS Preview +## macOS Download the DMG matching the Mac architecture: -- `macos-aarch64.dmg` for Apple Silicon Macs. -- `macos-x86_64.dmg` for Intel Macs. +- `Pebrel-v-macos-arm64.dmg` for Apple Silicon Macs. +- `Pebrel-v-macos-x64.dmg` for Intel Macs. -Open the DMG and drag **Pebrel Preview** into Applications. These -Preview builds default to ad-hoc signing, without Apple notarization. For a +Open the DMG and drag **Pebrel** into Applications. The 1.6.0 +packages use ad-hoc signing, without Apple notarization. For a download you have verified and trust, macOS may require **System Settings → Privacy & Security → Open Anyway** after an initial launch is blocked. Do not disable Gatekeeper globally. Developer ID/notarized builds are explicitly -identified in their Preview notes; that mode requires the maintainer's Apple +identified in their release notes; that mode requires the maintainer's Apple credentials and fails rather than falling back to ad-hoc signing. The workflow builds both architectures on native macOS 15 runners. It checks @@ -57,16 +56,20 @@ a UTF-8 locale and starts from the home directory when launched from `/`, while an explicit working directory is preserved. Both platforms use the embedded Maple Mono terminal font without requiring a system font installation. -Preview is not full Windows feature parity: tray/close-to-background residency, +Linux/macOS do not yet provide full Windows feature parity: tray/close-to-background residency, global quick-terminal hotkeys, automatic update installation, and automatic local AI-hook configuration are not enabled on Linux/macOS. Native IME, display scaling, notification permissions, and interactive SSH/SFTP still need native user testing. The release procedure and acceptance checklist are in [`docs/preview-release-checklist.md`](docs/preview-release-checklist.md). +Preview builds remain separate from stable releases. Their filenames contain +`-preview.` and use `x86_64` / `aarch64`; the Debian package is +`pebrel-preview` and the macOS bundle is **Pebrel Preview**. + ## Windows installer (recommended) -1. Download `Pebrel--windows-x64-setup.exe` from the +1. Download `Pebrel-v-windows-x64-setup.exe` from the [Releases](https://github.com/Kuddev/pebrel/releases/latest) page. 2. Follow the wizard to choose the installation directory and optional desktop or Windows sign-in shortcuts. The default per-user installation does not @@ -121,8 +124,10 @@ Keep the extracted directory structure intact: ## Build from source -Requirements: Windows 10 1809+ / 11 and [rustup](https://rustup.rs). The -repository pins Rust 1.97.1 in `rust-toolchain.toml`. +Install [rustup](https://rustup.rs) and the build dependencies for your platform. +The repository pins Rust 1.97.1 in `rust-toolchain.toml`. Linux dependency packages +are listed in `.github/workflows/release.yml`; macOS requires Xcode command-line +tools. Windows requires Windows 10 1809+ / 11 and a supported Rust linker toolchain. ```powershell git clone https://github.com/Kuddev/pebrel diff --git a/README.md b/README.md index 5525d8b..c192418 100644 --- a/README.md +++ b/README.md @@ -1,513 +1,148 @@

- Pebrel — 钛银 / Titanium + Pebrel Titanium icon

Pebrel

-Repository / 仓库:[Kuddev/pebrel](https://github.com/Kuddev/pebrel)。 -Existing `Kuddev/nebula` repository and Git links redirect here. -旧 `Kuddev/nebula` 仓库与 Git 链接会自动跳转到新地址。 - -Contributing / 参与贡献:[Guide / 指南](CONTRIBUTING.md) · [Architecture / 架构](docs/architecture.md) · [Engineering contracts / 工程规范](docs/project-constraints.md) -

- A GPU-accelerated terminal for Windows that keeps your sessions alive — close the window, your claude conversation survives.
- 一款 GPU 加速的 Windows 终端:关闭窗口不杀会话,重新打开,你的 claude 对话原样回来。 + A GPU-accelerated terminal, SSH workspace, and home for your AI CLI sessions.

- Rust - OpenGL - Windows - PowerShell - License + Built with Rust and GPUI for Windows, macOS, and Linux.
+ Split terminals · SSH & SFTP · Claude Code & Codex workflows · Native document reader

- Stars - Forks - Last commit - linux.do + Latest release + Windows, macOS, and Linux + GPL-3.0 license

- English · 简体中文 + Download the latest release

- Pebrel horizontal title-bar tabs and translucent background -

- -

- Claude Code running in Pebrel -

- -

- - Pebrel with OpenCode, Claude Code, and Codex in split panes + English · 简体中文

--- -## English - -### ✨ About - -Pebrel (formerly Nebula) is a terminal emulator for Windows, built in Rust on a -GPU-accelerated rendering core and designed around one idea: **your terminal -sessions are too valuable to die with a window**. It pairs a tmux-style -resident session model with a glass UI, an AI-CLI-aware sidebar, and a shell -experience that works without extra setup. - -### 🚀 Features - -**Sessions that survive** - -- **Session residency** — closing the window *detaches* instead of killing: - every PTY (your running `claude`, builds, SSH sessions) keeps running in a - resident process. Launch Pebrel again and the window re-attaches — same - processes, same scrollback, mid-conversation. -- **Cold session restore** — if the resident process is gone (reboot, crash), - the next launch still restores your tab layout and per-tab working - directories from a continuously autosaved snapshot, with a crash-loop - breaker. -- **Single instance** — a second launch hands over to the running instance - instead of piling up windows. - -**Built for AI-CLI workflows** -

- - AI-aware sidebar + Terminal tabs in Pebrel

-- **Real brand marks in the sidebar** — a tab running `claude` shows the - actual Anthropic starburst; `codex` shows the OpenAI blossom, tinted to the - theme. Other programs get Nerd Font icons (`gemini`, `copilot`, `git`, - `vim`, `cargo`, …). -- **Live turn state, wired to the source** — Pebrel installs Claude Code - hooks (and Codex notify) pointing at a bundled bridge - (`pebrel-hook.exe`, dependency-free): prompt submitted → spinner; turn - finished → dot + toast; Claude needs your input → toast carrying the actual - message text. Delivered over a local named pipe, with no shell integration - required. -- **Click-to-focus notifications** — every toast knows which pane raised it: - click one and Pebrel comes to the foreground, switches to that tab and - focuses that split. -- **Zero setup, self-healing** — the hook entries install on first boot and - re-install themselves if a config switcher rewrites the file (a watcher on - the config directory re-applies them). Scoped by environment: claude - running in any other terminal is untouched. `pebrel setup-ai --remove` - undoes everything. -- **Plays nice with existing notifiers** — codex has a single notify slot; - Pebrel wraps it (`--chain`) instead of stealing it, so a pre-existing - notifier keeps firing. -- **Fallback signals** — OSC 133 command tracking + BEL still cover every - other CLI: long builds toast on completion, with their duration. -- **Native SSH sessions** — saved hosts open directly through Pebrel's Rust SSH - transport: no wrapper shell and no external console window. Host aliases, - usernames, ports and identity files are resolved from `~/.ssh/config`; - authentication supports standard private keys and certificates, encrypted-key - passphrases, Windows Credential Manager passwords, and keyboard-interactive/MFA. - Accepted host keys use the standard `known_hosts` store, and additional tabs - reuse an already authenticated - connection to the same `user@host:port` for a faster second shell. -- **Built-in SFTP transfers** — open a remote file drawer from any saved SSH - host and reuse its authenticated connection. Browse or type remote paths, - filter entries, upload and download files or folders, create and rename - folders, recursively delete, follow symlink targets, and cancel transfers - with visible progress and errors. -- **AI-aware over SSH** — remote Hook envelopes can return through a - per-channel, randomly authenticated private OSC bridge. Pebrel validates the - channel token, replaces any remote pane identifier with the local pane, and - routes the event through the existing sidebar and Windows notification path. - The `pebrel ssh` compatibility command remains available for forwarding, - query and explicit-command forms that need the system SSH client. +## One Workspace -

- Pebrel native SSH session -

+Pebrel (formerly Nebula) brings local shells, remote hosts, files, and AI command-line +tools into a native desktop workspace. Arrange terminals in tabs and splits, follow +each agent's activity, and read its output without leaving the application. -**Performance & correctness** +### Terminals and Sessions -- **Instrumented startup** — the boot path is fully traceable - (`PEBREL_BOOT_TRACE=1`); no shell profile is loaded and history loads - lazily. -- **Modern ConPTY host** — ships the side-by-side ConPTY host for correct - resize behavior, with its startup handshake (DA1) pre-primed so a new tab - doesn't stall on that round-trip. -- **Coalesced resizing** — interactive drags resize the grid only; the PTY - learns its final size once, so full-screen TUIs don't smear redraws into - scrollback. +- Sidebar or top tabs, draggable split panes, and per-pane working directories. +- Saved workspace layouts and optional AI conversation restoration. On WSL and + Linux, Codex session metadata can supply an ID when its hook has not reported one. +- On Windows, optional background residency keeps running sessions alive when you + close the window. Restoring a conversation after the process exits is a separate + feature and requires a supported CLI and a usable session identity. +- History and path completions, configurable keybindings, and integrated shell prompts. -**Shell experience** +### SSH and Files -- **Inline ghost-text completions** — fish-style dim suggestions from command - history and filesystem paths; accept with `→` or `Tab`. -- **Persistent indexed history** — commands stored as JSONL under - `%APPDATA%\Pebrel`, shared across sessions, with prefix hints. -- **Powerline prompt built in** — themed gradient prompt with git branch and - clock, for PowerShell and Git Bash, no plugins to install. -- **Quality-of-life fixes** — unquoted `cd D:/Program Files` just works, bare - `$env:KEY=value` assignments are auto-quoted, `ls` gets colors and - clickable OSC 8 hyperlinks. +- Saved hosts, SSH config aliases, proxy and jump-host options, private-key and + keyboard-interactive authentication, and host-key verification. +- SFTP browsing, uploads and downloads, folder transfers, progress, and cancellation. +- Local file browsing and Git actions alongside your terminals. +- Duplicated WSL and SSH tabs retain their known working directory. -**Markdown that renders like GitHub** +### AI CLI Workflows -

- Pebrel rendering its own README: centred logo, badge row, and an embedded screenshot -

+- Claude Code, Codex, and other recognized CLIs have their own icons and activity + states. Supported hook events provide more precise progress and attention signals. +- Notifications follow their source pane; clicking one returns you to that terminal. +- Captured Claude Code and Codex answers open in a reader with Markdown, formulas, + source text, and local image previews. +- Clipboard images are saved as PNG files and their paths inserted into local, + WSL, or SSH sessions. Inline terminal images require the CLI to emit the supported + OSC 1337 protocol; image attachment previews depend on the CLI itself. -- **Markdown/GFM document tabs** — open Markdown, JSON, and plain-text files - directly from the file drawer with headings, lists, tables, code blocks, - links, quotes, word wrapping, and virtualized scrolling. -- **Images from anywhere** — remote `http(s)` URLs, `data:` URIs, absolute - paths, and paths relative to the document all resolve, so badge rows, logos, - and embedded screenshots land exactly where the file puts them. The - screenshot above is Pebrel rendering its own README. -- **The HTML that real READMEs use** — `

` centres its - content, several `` badges in one paragraph stay on a single row instead - of breaking into separate blocks, `
` breaks in document order, and - `` link badges survive as clickable images. -- **CJK-correct soft wraps** — CommonMark soft line breaks join as spaces, but - adjacent CJK characters join directly, so Chinese paragraphs don't pick up - the stray gaps other viewers insert. +### A Native, Configurable Interface -**Documents & native mathematics** +- GPU-accelerated GPUI interface, light and dark themes, backgrounds, and opacity controls. +- Application icon palettes and eleven UI language choices with English fallback + for untranslated text. +- Searchable settings, a command palette, and Lua configuration with validation and + live reload. Existing TOML configuration remains supported. +- Markdown document tabs and native mathematical typesetting without a WebView. -

- Native mathematics rendered in a Pebrel Markdown document -

+
+More screenshots -- **Native TeX mathematics** — inline `$...$` and display `$$...$$` formulas - are parsed and laid out entirely in Rust, then drawn through cached Latin - Modern Math glyphs and GPU rule quads. Fractions, radicals, scripts, limits, - integrals, matrices, scalable delimiters, Greek letters, and common symbols - render without a WebView, JavaScript runtime, or external TeX process. -- **Bounded document rendering** — oversized formulas fit the reading column, - long prose and failed formulas wrap, and parser, layout, cache, atlas, and - per-frame work all have explicit limits. See the - [math rendering fixture](docs/math-rendering-test.md) for the screenshot and - regression set. +

Claude Code session

+

AI CLI split panes

+

AI activity sidebar

+

Native SSH session

+

Native formula rendering

+

Application themes

-**Interface** +
-

- - Themes -

+## Download -- **Glass chrome & seven themes** — Pebrel plus three matched light/dark - pairs: Silver Light / Steel Dark, Limestone / Coal Dark, Linen Light / - Moss Dark. One skin system drives chrome, prompt and dialogs; every theme - persists across restarts. -- **Tabs & splits** — sidebar tabs with drag-to-reorder and drag-to-dock into - splits; unfocused panes dim instead of growing borders. -- **Files, Git and SFTP drawers** — browse local or remote files without - leaving the terminal. The Git drawer can stage, commit, pull fast-forward - updates, and push. -- **Quick terminal** — global Ctrl+` drops a Quake-style - terminal from the top edge. -- **Settings tab & command palette** — settings opens as a normal reusable tab, - with themes, language, background image/opacity, shell choice and completion - behavior; all persisted. -- **Inline images** — OSC 1337 image protocol support, lazily anchored to - scrollback rows. +Choose a package from the **[latest release](https://github.com/Kuddev/pebrel/releases/latest)**. -### 📥 Install +| System | Architecture | Packages | +| --- | --- | --- | +| Windows 10 1809+ / 11 | x64 | Installer `.exe`, portable `.zip` | +| Linux, glibc 2.35+ | x64 | `.AppImage`, `.deb`, portable `.tar.gz` | +| macOS, deployment target 14+ | Apple Silicon / arm64 | `.dmg` | +| macOS, deployment target 14+ | Intel / x64 | `.dmg` | -Pebrel embeds **Maple Mono Normal NF CN** for terminal text, powerline symbols, -and icons. The Windows installer also offers system font installation. -The font is licensed under SIL OFL 1.1. +Package names follow `Pebrel-v--`. Windows installers +end in `-setup.exe`. A legacy-named installer is also supplied for older automatic +update clients. -**Windows packages** are listed on -[Releases](https://github.com/Kuddev/pebrel/releases/latest). Pebrel 1.6 uses -`Pebrel--windows-x64-setup.exe` for installation and -`Pebrel-v-windows-x64.zip` for portable use. Extract the ZIP and run -`pebrel.exe`; keep `runtime/`, `docs/`, `skills/`, and `licenses/` in place. -Older releases retain their original asset names. See the -[installation guide](INSTALL.md) for upgrade and configuration migration details. +On Windows, run the installer or extract the ZIP and launch `pebrel.exe`, keeping +the bundled directories together. On Linux, install the DEB or make the AppImage +executable. On macOS, open the matching DMG and drag Pebrel into Applications. +Ad-hoc-signed macOS builds may require **Open Anyway** in **System Settings > +Privacy & Security** on first launch. Native macOS CI runs on macOS 15; the +deployment target alone does not establish validation on every older OS version. -**From source** +Windows currently also provides tray residency, the global quick-terminal hotkey, +automatic local AI-hook setup, and automatic update installation. These integrations +are not yet available on Linux or macOS. See [installation details](INSTALL.md) for +platform requirements and upgrading an existing Nebula installation. -```powershell +## Configure + +```sh +pebrel config init --language en-US +pebrel config check +``` + +The generated Lua configuration uses `require 'pebrel'` and +`pebrel.config_builder()`. Invalid reloads retain the last valid configuration. +See the [Lua configuration guide](docs/lua-configuration.md) for settings and examples. + +## Build + +With the pinned Rust toolchain and the platform dependencies installed: + +```sh cargo build --release --locked -p nebula --bin pebrel --features gpui-shell ``` -### Lua Configuration +The internal Cargo package is still named `nebula`; the application and command +are `pebrel`. GPUI is the product interface. The older renderer is available only +through the explicit `legacy-shell` feature. -Pebrel ships a vendored Lua 5.4 runtime with `require 'pebrel'` and -`pebrel.config_builder()`. Generate an annotated template with -`pebrel config init --language system|zh-CN|en-US`, then validate it without -opening the GUI using `pebrel config check`. Module `require` paths participate -in live reload; invalid edits keep the last-known-good configuration active. -Existing TOML files remain supported. See the -[Lua configuration guide](docs/lua-configuration.md) for APIs, discovery order, -Windows/Linux paths, arrays, modules, and reload behavior. +## Acknowledgements -### 🧩 Tech Stack - -| Layer | Tech | -| --- | --- | -| Language | Rust (2024 edition) | -| Rendering | OpenGL / OpenGL ES 2.0+, custom glyph & UI quad renderers | -| Terminal core | GPU-resident grid + VTE escape-sequence parsing, on an Alacritty-derived foundation | -| Session model | Resident mux process, loopback attach protocol | -| Shell integration | PowerShell + PSReadLine, Git Bash; OSC 7/8/9/133/1337 | -| Document math | pulldown-cmark + pulldown-latex + OpenType MATH (Latin Modern Math) | -| Fonts | Maple Mono Normal NF CN (Nerd Font glyphs, CJK-aware) | - -### 📦 Requirements - -- At least OpenGL ES 2.0 -- Windows 10 (1809+) / 11 with ConPTY support - -### Contact - -Questions and feedback: [fickleheartedkeys@163.com](mailto:fickleheartedkeys@163.com) - -### 🙏 Acknowledgements - -Pebrel's terminal core — the grid, the VTE escape-sequence parsing, and the PTY -plumbing — is derived from -**[Alacritty](https://github.com/alacritty/alacritty)**, a masterpiece of -terminal engineering. Sincere thanks to its maintainers and contributors; -Pebrel would not exist without their work. - -Pebrel's shell is built on **[GPUI](https://github.com/zed-industries/zed)** — the -GPU-accelerated UI framework developed by the [Zed](https://zed.dev) team — together with -**[gpui-component](https://github.com/longbridge/gpui-component)** from -[Longbridge](https://github.com/longbridge), which supplies the widget library. Both are -Apache-2.0 licensed and are used through lightly patched forks pinned in the workspace -manifest. Thank you for releasing this work as open source — Pebrel's interface would not -look the way it does without it. - -### 📜 License - -Released under the [GNU General Public License v3.0](LICENSE). - -Parts of Pebrel are derived from upstream open-source projects; their original -license and copyright notices are preserved in -[THIRD-PARTY-NOTICES](THIRD-PARTY-NOTICES). The work as a whole is distributed -under GPL-3.0. - ---- - -## 简体中文 - -### ✨ 简介 - -Pebrel(原名 Nebula)是一款 Windows 上的终端模拟器,以 Rust 编写,构建在 GPU 加速渲染 -内核之上,并围绕一个理念设计:**终端会话太宝贵,不该随窗口一起消失**。它 -把 tmux 式的常驻会话模型、玻璃质感界面、AI CLI 感知侧边栏和无需额外配置 -的 shell 体验组合在一起。 - -### 🚀 功能特性 - -**会话永生** - -- **会话驻留** — 关闭窗口是*分离*而不是杀死:所有 PTY(正在跑的 - `claude`、构建、SSH)继续在常驻进程里运行。再次启动 Pebrel,窗口原样接回 - —— 同样的进程、同样的回滚缓冲、对话进行到一半也不丢。 -- **冷恢复** — 常驻进程不在了(重启、崩溃)也没关系:下次启动从持续自动保 - 存的快照恢复标签布局和每个标签的工作目录,并带崩溃循环保护。 -- **单实例** — 重复启动会交棒给运行中的实例,不会堆一堆窗口。 - -**为 AI CLI 工作流而生** - -

- - AI 感知侧边栏 -

- -- **侧栏显示真品牌标识** — 跑 `claude` 的标签显示 Anthropic 珊瑚星芒, - `codex` 显示 OpenAI 花结(贴图渲染、跟随主题染色);其余程序用 - Nerd Font 图标(`gemini`、`copilot`、`git`、`vim`、`cargo`……)。 -- **回合状态实时直连** — Pebrel 自动安装 Claude Code hooks(及 Codex - notify),指向随包的桥接器 `pebrel-hook.exe`(无第三方依赖): - 提交 prompt → 转圈;回合完成 → 圆点 + 通知;claude 要你确认 → 通知里 - 带消息原文。经本地命名管道传递,无需任何 shell 集成。 -- **通知点击直达** — 每条 toast 都知道自己来自哪个 pane:点一下,Pebrel - 前置、切到那个标签、聚焦那个分屏。 -- **零配置、自愈合** — hook 条目首次启动自动写入;被配置切换工具覆盖后 - 会自动补回(配置目录上有监视器重新写入)。作用域由环境变量限定:其他 - 终端里的 claude 完全不受影响。`pebrel setup-ai --remove` 一键撤销。 -- **不抢占已有 notifier** — codex 只有一个 notify 槽位,Pebrel 用 - `--chain` 包装而非顶掉:原有通知程序照常触发。 -- **兜底信号** — OSC 133 命令跟踪 + BEL 覆盖其余所有 CLI:长构建完成也 - 弹通知,并带耗时。 -- **原生 SSH 会话** — 保存的主机现在直接通过 Pebrel 的 Rust SSH 传输连接, - 不再经过包装 Shell,也不会弹出外部控制台窗口。主机别名、用户名、端口和 - IdentityFile 会从 `~/.ssh/config` 解析;认证覆盖标准私钥与证书、加密密钥 - 口令、Windows 凭据管理器密码以及 keyboard-interactive/MFA。主机密钥写入 - 标准 `known_hosts`;同一 `user@host:port` 再开标签页会复用已认证连接,让第二个 - Shell 更快出现。 -- **内置 SFTP 传输** — 从已保存 SSH 主机即可打开远端文件抽屉,并复用已认证 - 连接。支持浏览或手动输入远端路径、筛选、上传/下载文件与文件夹、新建与重命名 - 文件夹、递归删除、跟随符号链接目标,以及带进度、取消和错误提示的后台传输。 -- **SSH 里也 AI 感知** — 远端 Hook 信封可通过每通道随机认证的私有 OSC 桥 - 返回。Pebrel 会校验通道令牌,用本地 Pane 身份覆盖远端字段,再复用现有侧栏 - 状态和 Windows 通知链路。需要端口转发、配置查询或显式远程命令时,仍可使用 - `pebrel ssh` 兼容命令交给系统 SSH 客户端处理。 - -

- Pebrel 原生 SSH 会话 -

- -**性能与正确性** - -- **启动全程可观测** — 启动路径全程打点(`PEBREL_BOOT_TRACE=1`),不加载 - shell profile,历史惰性加载。 -- **现代 ConPTY 宿主** — 内置 side-by-side ConPTY 宿主保证 resize 行为正确, - 并预热其启动握手(DA1),让新标签不必卡在这一次往返上。 -- **合并式 resize** — 拖动窗口时只调整网格,PTY 在拖动结束后一次性获知最终 - 尺寸,全屏 TUI 不会把重绘刷进历史。 - -**Shell 体验** - -- **行内幽灵补全** — fish 风格暗色建议,来自命令历史与文件路径, - `→` 或 `Tab` 接受。 -- **持久化索引历史** — 命令以 JSONL 存于 `%APPDATA%\Pebrel`,跨会话共享, - 提供前缀提示。 -- **内置 powerline 提示符** — 主题化渐变提示符,含 git 分支与时钟, - PowerShell 与 Git Bash 皆可用,无需安装任何插件。 -- **顺手的小修正** — 不带引号的 `cd D:/Program Files` 直接可用,裸 - `$env:KEY=value` 自动加引号,`ls` 带颜色和可点击的 OSC 8 超链接。 - -**Markdown 解析:照着 GitHub 的样子显示** - -

- Pebrel 正在渲染自己的 README:居中 logo、徽章横排、内嵌截图 -

- -- **Markdown/GFM 文档标签页** — 可以从文件抽屉直接打开 Markdown、JSON 和 - 纯文本文件,原生显示标题、列表、表格、代码块、链接、引用、自动换行和虚拟滚动。 -- **图片来源不挑** — 远程 `http(s)` 链接、`data:` URI、绝对路径,以及相对文档 - 自身位置的路径都能解析,徽章行、logo 和内嵌截图都落在文件让它们出现的地方。 - 上面这张图就是 Pebrel 在渲染自己的 README。 -- **真实 README 会用到的那些 HTML** — `

` 居中生效,同一段里 - 的多枚 `` 徽章横排显示而不会被拆成若干块,`
` 按文档顺序断行, - `` 形式的链接徽章不会整个丢失。 -- **中文软换行不留空隙** — CommonMark 的软换行按规范并作空格,但相邻中日韩 - 字符直接相连,中文段落不会出现别的阅读器常见的那些多余空格。 - -**文档与原生数学公式** - -

- Pebrel Markdown 文档中的原生数学公式 -

- -- **原生 TeX 数学排版** — 行内 `$...$` 与块级 `$$...$$` 公式全部由 Rust - 解析和布局,再使用缓存的 Latin Modern Math 字形与 GPU 规则线 quad 绘制。 - 分式、根式、上下标、极限、积分、矩阵、伸缩括号、希腊字母和常用符号均不经过 - WebView、JavaScript 运行时或外部 TeX 进程。 -- **有界文档渲染** — 超宽公式会收敛到阅读列,长文本和失败公式会继续换行; - 解析、布局、缓存、字形图集和每帧工作量均有明确上限。截图与回归内容见 - [数学渲染测试文档](docs/math-rendering-test.md)。 - -**界面** - -

- - 七套主题 -

- -- **玻璃质感与七套主题** — Pebrel + 三对明暗成组主题:Silver Light / - Steel Dark、Limestone / Coal Dark、Linen Light / Moss Dark。一套皮肤 - 系统驱动 chrome、提示符与弹窗,主题选择跨重启持久化。 -- **标签与分屏** — 侧边栏标签支持拖拽排序、拖入终端区四方位分屏;非焦点 - 面板压暗而非描边。 -- **文件、Git 与 SFTP 抽屉** — 不离开终端即可浏览本地或远端文件;Git 抽屉 - 支持暂存、提交、仅快进拉取和推送。 -- **快速终端** — 全局 Ctrl+` 从屏幕顶部滑出 - Quake 式终端。 -- **设置标签页与命令面板** — 设置像普通标签页一样打开和复用,支持主题、 - 跟随系统/简体中文/English、背景图/透明度、Shell 与补全行为,并跨重启持久化。 -- **行内图片** — 支持 OSC 1337 图片协议,惰性锚定到回滚行。 - -### 📥 安装 - -Pebrel 内嵌 **Maple Mono Normal NF CN**,用于终端文字、powerline 符号与图标。 -Windows 安装器同时提供可选的系统字体安装。字体使用 SIL OFL 1.1 许可。 - -**Windows 安装包**见 -[Releases](https://github.com/Kuddev/pebrel/releases/latest)。Pebrel 1.6 的安装器命名为 -`Pebrel--windows-x64-setup.exe`,便携包命名为 -`Pebrel-v-windows-x64.zip`。解压 ZIP 后运行 `pebrel.exe`,保留 -`runtime/`、`docs/`、`skills/` 与 `licenses/` 目录。旧版本资产保留原文件名。 -升级与配置迁移详见[安装指南](INSTALL.md)。 - -**从源码构建** - -```powershell -cargo build --release --locked -p nebula --bin pebrel --features gpui-shell -``` - -### Lua 配置 - -Pebrel 内置 Lua 5.4,使用 `require 'pebrel'` 与 -`pebrel.config_builder()`。运行 -`pebrel config init --language system|zh-CN|en-US` 可生成带完整注释的模板, -`pebrel config check` 可在不启动 GUI 的情况下检查语法与字段。通过 `require` -载入的模块会参与热重载;配置错误时继续使用上一份有效配置。已有 TOML 仍兼容。 -路径优先级、Windows/Linux 位置、数组、模块与重载说明见 -[Lua 配置指南](docs/lua-configuration.md)。 - -### 🧩 技术栈 - -| 层级 | 技术 | -| --- | --- | -| 语言 | Rust(2024 edition) | -| 渲染 | OpenGL / OpenGL ES 2.0+,自定义字形与 UI 四边形渲染器 | -| 终端内核 | GPU 常驻网格 + VTE 转义序列解析,基于 Alacritty 衍生的地基 | -| 会话模型 | 常驻 mux 进程,环回 attach 协议 | -| Shell 集成 | PowerShell + PSReadLine、Git Bash;OSC 7/8/9/133/1337 | -| 文档数学 | pulldown-cmark + pulldown-latex + OpenType MATH(Latin Modern Math) | -| 字体 | Maple Mono Normal NF CN(Nerd Font 图标,支持 CJK) | - -### 📦 环境要求 - -- 至少 OpenGL ES 2.0 -- Windows 10(1809+)/ 11,需 ConPTY 支持 - -### 联系方式 - -问题与反馈:[fickleheartedkeys@163.com](mailto:fickleheartedkeys@163.com) - -### 🙏 致谢 - -Pebrel 的终端内核——网格、VTE 转义序列解析与 PTY 管路——衍生自 -**[Alacritty](https://github.com/alacritty/alacritty)**,终端工程的杰作。 -衷心感谢它的维护者与贡献者们;没有他们的工作就没有 Pebrel。 - -Pebrel 的界面层构建在 **[GPUI](https://github.com/zed-industries/zed)** 之上——由 -[Zed](https://zed.dev) 团队开发的 GPU 加速 UI 框架——并使用 -[Longbridge](https://github.com/longbridge) 的 -**[gpui-component](https://github.com/longbridge/gpui-component)** 作为组件库。两者均以 -Apache-2.0 许可发布,Pebrel 通过带少量补丁的 fork 使用,版本在 workspace 清单中精确锁定。 -感谢把这些工作开源——没有它,Pebrel 现在的界面不会是这个样子。 - -### 📜 许可证 - -基于 [GNU 通用公共许可证 v3.0(GPL-3.0)](LICENSE) 发布。 - -Pebrel 的部分代码衍生自上游开源项目,其原始许可与版权声明保留于 -[THIRD-PARTY-NOTICES](THIRD-PARTY-NOTICES)。整体作品以 GPL-3.0 分发。 - ---- - -## 🔗 友情链接 / Community - -- **[linux.do](https://linux.do)** — 新的理想型社区 / a thriving developer community. - ---- - -## ⭐ Star History - - - - - - Star History Chart - - +Pebrel builds on [Alacritty](https://github.com/alacritty/alacritty), +[GPUI](https://github.com/zed-industries/zed), and +[gpui-component](https://github.com/longbridge/gpui-component). Terminal text uses +Maple Mono, and native formulas use Latin Modern Math. Upstream copyright and +license notices are preserved in `THIRD-PARTY-NOTICES` and `licenses/`. diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 0000000..beb6c8c --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,133 @@ +

+ Pebrel 钛银图标 +

+ +

Pebrel

+ +

+ GPU 加速终端、SSH 工作区,以及你的 AI CLI 会话空间。 +

+ +

+ 使用 Rust 与 GPUI 构建,面向 Windows、macOS 和 Linux。
+ 分屏终端 · SSH 与 SFTP · Claude Code 与 Codex 工作流 · 原生文档阅读 +

+ +

+ 最新版本 + Windows、macOS 与 Linux + GPL-3.0 许可证 +

+ +

+ 下载最新版本 +

+ +

+ English · 简体中文 +

+ +--- + +

+ Pebrel 终端标签 +

+ +## 一个工作区 + +Pebrel(原名 Nebula)把本地 Shell、远程主机、文件和 AI 命令行工具放进同一个原生桌面工作区。 +通过标签和分屏组织终端,关注各个 Agent 的活动,并直接在应用中阅读输出。 + +### 终端与会话 + +- 侧栏或顶部标签、可拖拽分屏,以及各窗格独立的工作目录。 +- 保存工作区布局,可选恢复 AI 对话。在 WSL 与 Linux 中,Codex 的 hook 未上报 ID 时, + 可从当前会话元数据补全身份。 +- Windows 下可选择后台驻留,让关窗后的会话继续运行。进程退出后重新接续已保存的对话 + 是另一项功能,需要 CLI 支持恢复,并且有可用的会话身份。 +- 历史记录与路径补全、自定义快捷键,以及集成的 Shell 提示符。 + +### SSH 与文件 + +- 保存主机、读取 SSH 配置别名、设置代理与跳板,支持私钥和交互式认证,并验证主机密钥。 +- SFTP 文件浏览、上传下载、文件夹传输、进度显示与取消。 +- 在终端旁浏览本地文件并执行 Git 操作。 +- 复制 WSL 与 SSH 标签时保留已知工作目录。 + +### AI CLI 工作流 + +- Claude Code、Codex 等可识别的 CLI 显示各自图标与活动状态;受支持的 hook 事件提供更准确的进度和待处理信号。 +- 通知跟随来源窗格,点击即可返回对应终端。 +- 已捕获的 Claude Code 与 Codex 回答可在阅读器中打开,支持 Markdown、公式、原文和本地图片预览。 +- 剪贴板图片会保存为 PNG,并把路径插入本地、WSL 或 SSH 会话。终端内直接显示图片需要 CLI + 输出受支持的 OSC 1337 协议;附件缩略图取决于 CLI 自身。 + +### 原生、可配置的界面 + +- GPU 加速的 GPUI 界面、浅色与深色主题、背景及不透明度设置。 +- 应用图标配色与十一种界面语言,未翻译内容回退英文。 +- 可搜索的设置、命令面板,以及支持检查和热重载的 Lua 配置;已有 TOML 配置仍可使用。 +- Markdown 文档标签与原生数学公式排版,不依赖 WebView。 + +
+更多截图 + +

Claude Code 会话

+

AI CLI 分屏

+

AI 活动侧栏

+

原生 SSH 会话

+

原生公式排版

+

应用主题

+ +
+ +## 下载 + +从 **[最新发布](https://github.com/Kuddev/pebrel/releases/latest)** 选择对应安装包。 + +| 系统 | 架构 | 安装包 | +| --- | --- | --- | +| Windows 10 1809+ / 11 | x64 | `.exe` 安装器、`.zip` 便携包 | +| Linux,glibc 2.35+ | x64 | `.AppImage`、`.deb`、`.tar.gz` 便携包 | +| macOS,部署目标为 14+ | Apple Silicon / arm64 | `.dmg` | +| macOS,部署目标为 14+ | Intel / x64 | `.dmg` | + +安装包统一采用 `Pebrel-v<版本>-<系统>-<架构>` 命名,Windows 安装器以 `-setup.exe` 结尾。 +同时提供旧名称的兼容安装器,供旧版自动更新客户端使用。 + +Windows 可运行安装器,或解压 ZIP 后启动 `pebrel.exe`,保留随包目录结构。 +Linux 可安装 DEB,或为 AppImage 添加执行权限。macOS 打开对应 DMG,把 Pebrel 拖入“应用程序”。 +采用临时签名的 macOS 包首次启动可能需要在“系统设置 > 隐私与安全性”中选择“仍要打开”。 +原生 macOS CI 运行在 macOS 15 上,部署目标并不代表每个较早系统版本都已通过运行验证。 + +系统托盘驻留、全局快速终端热键、自动配置本地 AI hook 和自动安装更新目前由 Windows 提供, +Linux 与 macOS 尚未提供这些集成。平台要求和旧版 Nebula 升级步骤见[安装说明](INSTALL.md)。 + +## 配置 + +```sh +pebrel config init --language zh-CN +pebrel config check +``` + +生成的 Lua 配置使用 `require 'pebrel'` 与 `pebrel.config_builder()`。 +重载失败时继续使用上一份有效配置。设置与示例见 [Lua 配置指南](docs/lua-configuration.md)。 + +## 构建 + +安装项目固定的 Rust 工具链与对应平台依赖后运行: + +```sh +cargo build --release --locked -p nebula --bin pebrel --features gpui-shell +``` + +内部 Cargo 包名仍为 `nebula`,应用与命令名为 `pebrel`。GPUI 是正式产品界面, +旧渲染器仅在显式启用 `legacy-shell` 时使用。 + +## 致谢 + +Pebrel 基于 [Alacritty](https://github.com/alacritty/alacritty)、 +[GPUI](https://github.com/zed-industries/zed) 与 +[gpui-component](https://github.com/longbridge/gpui-component) 构建。 +终端使用 Maple Mono 字体,原生公式使用 Latin Modern Math。 +上游版权与许可证声明保留在 `THIRD-PARTY-NOTICES` 和 `licenses/` 中。 diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..2f2bccf --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,25 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report suspected security vulnerabilities privately to +**fickleheartedkeys@163.com** before posting technical details in a public issue. + +Include the affected Pebrel version, operating system, reproduction steps, expected +and observed behavior, and the potential impact. A small reproduction using test +data is preferable to logs containing real credentials or private conversations. + +Do not send passwords, access tokens, private keys, or unrelated personal data. +Use public issues for ordinary bugs that do not expose a security vulnerability. + +## Versions + +Use the latest stable release when checking whether a problem is still present. +Mention if it also affects a Preview build or the current `main` branch. +Older releases remain available for reference; availability does not imply +that every older version receives fixes. + +## Follow-up + +The maintainers will review the report and coordinate any necessary fix and public +disclosure. This policy does not promise a response deadline or a bug bounty. diff --git a/scripts/build-installer.ps1 b/scripts/build-installer.ps1 index 600cb71..2d3040c 100644 --- a/scripts/build-installer.ps1 +++ b/scripts/build-installer.ps1 @@ -65,6 +65,7 @@ $requiredFiles = @( (Join-Path $targetRoot 'conpty.dll'), (Join-Path $targetRoot 'OpenConsole.exe'), (Join-Path $repo 'README.md'), + (Join-Path $repo 'README.zh-CN.md'), (Join-Path $repo 'CHANGELOG.md'), (Join-Path $repo 'INSTALL.md'), (Join-Path $repo 'docs\lua-configuration.md'), diff --git a/scripts/installer.iss b/scripts/installer.iss index 5d83dc4..c2e09e4 100644 --- a/scripts/installer.iss +++ b/scripts/installer.iss @@ -98,6 +98,7 @@ Name: "autostart"; Description: "{cm:AutoStart}"; GroupDescription: "{cm:Additio [Files] Source: "{#BuildRoot}\pebrel.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "{#RepoRoot}\README.md"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#RepoRoot}\README.zh-CN.md"; DestDir: "{app}"; Flags: ignoreversion Source: "{#BuildRoot}\pebrel-hook.exe"; DestDir: "{app}\runtime"; Flags: ignoreversion Source: "{#BuildRoot}\conpty.dll"; DestDir: "{app}\runtime"; Flags: ignoreversion Source: "{#BuildRoot}\OpenConsole.exe"; DestDir: "{app}\runtime"; Flags: ignoreversion diff --git a/scripts/package-linux.sh b/scripts/package-linux.sh index 854ff75..66ace7a 100644 --- a/scripts/package-linux.sh +++ b/scripts/package-linux.sh @@ -141,7 +141,7 @@ else fi icon_source="$repo/extra/logo/nebula.png" for required in "$desktop_source" "$metainfo_source" "$icon_source" \ - "$repo/README.md" "$repo/CHANGELOG.md" "$repo/INSTALL.md" \ + "$repo/README.md" "$repo/README.zh-CN.md" "$repo/CHANGELOG.md" "$repo/INSTALL.md" \ "$repo/LICENSE" "$repo/THIRD-PARTY-NOTICES" \ "$repo/licenses/LICENSE-LUA" "$repo/licenses/LICENSE-MLUA" \ "$repo/licenses/LICENSE-LATIN-MODERN-MATH" \ @@ -233,6 +233,7 @@ install -m 0644 "$metainfo_source" \ convert "$icon_source" -resize 256x256 \ "$common_root/usr/share/icons/hicolor/256x256/apps/$desktop_id.png" install -m 0644 "$repo/README.md" "$common_root/usr/share/doc/$package_name/README.md" +install -m 0644 "$repo/README.zh-CN.md" "$common_root/usr/share/doc/$package_name/README.zh-CN.md" install -m 0644 "$repo/CHANGELOG.md" "$common_root/usr/share/doc/$package_name/CHANGELOG.md" install -m 0644 "$repo/INSTALL.md" "$common_root/usr/share/doc/$package_name/INSTALL.md" install -m 0644 "$repo/LICENSE" "$common_root/usr/share/doc/$package_name/licenses/LICENSE" diff --git a/scripts/package-macos.sh b/scripts/package-macos.sh index 0aa8c6c..a01068b 100644 --- a/scripts/package-macos.sh +++ b/scripts/package-macos.sh @@ -154,6 +154,7 @@ output_directory="$(cd "$output_directory" && pwd -P)" plist_source="$repo/packaging/macos/Info.plist" icon_source="$repo/extra/logo/nebula.png" for required in "$plist_source" "$icon_source" "$repo/README.md" \ + "$repo/README.zh-CN.md" \ "$repo/CHANGELOG.md" "$repo/INSTALL.md" "$repo/LICENSE" \ "$repo/THIRD-PARTY-NOTICES" "$repo/licenses/LICENSE-LUA" \ "$repo/licenses/LICENSE-MLUA" "$repo/licenses/LICENSE-LATIN-MODERN-MATH"; do @@ -254,6 +255,7 @@ EOF iconutil -c icns "$iconset" -o "$resources/pebrel.icns" install -m 0644 "$repo/README.md" "$resources/docs/README.md" +install -m 0644 "$repo/README.zh-CN.md" "$resources/docs/README.zh-CN.md" install -m 0644 "$repo/CHANGELOG.md" "$resources/docs/CHANGELOG.md" install -m 0644 "$repo/INSTALL.md" "$resources/docs/INSTALL.md" install -m 0644 "$repo/LICENSE" "$resources/licenses/LICENSE" diff --git a/scripts/package-release.ps1 b/scripts/package-release.ps1 index ca30b18..400d7b8 100644 --- a/scripts/package-release.ps1 +++ b/scripts/package-release.ps1 @@ -51,6 +51,7 @@ $temporaryZip = Join-Path $outputRoot ".$PackageBrand-v$Version-windows-x64-$PID $manifest = [ordered]@{ 'pebrel.exe' = Join-Path $targetRoot 'pebrel.exe' 'README.md' = Join-Path $repo 'README.md' + 'README.zh-CN.md' = Join-Path $repo 'README.zh-CN.md' 'runtime/pebrel-hook.exe' = Join-Path $targetRoot 'pebrel-hook.exe' 'runtime/conpty.dll' = Join-Path $targetRoot 'conpty.dll' 'runtime/OpenConsole.exe' = Join-Path $targetRoot 'OpenConsole.exe' diff --git a/scripts/tests/package-release.tests.ps1 b/scripts/tests/package-release.tests.ps1 index 2f063bf..6226ccb 100644 --- a/scripts/tests/package-release.tests.ps1 +++ b/scripts/tests/package-release.tests.ps1 @@ -71,6 +71,7 @@ try { $expected = @( 'README.md' + 'README.zh-CN.md' 'docs/CHANGELOG.md' 'docs/INSTALL.md' 'docs/lua-configuration.md' @@ -94,8 +95,8 @@ try { } $rootFiles = @($actual | Where-Object { -not $_.Contains('/') }) - if (@(Compare-Object -ReferenceObject @('README.md', 'pebrel.exe') -DifferenceObject $rootFiles).Count -ne 0) { - throw "ZIP root must contain only README.md and pebrel.exe" + if (@(Compare-Object -ReferenceObject @('README.md', 'README.zh-CN.md', 'pebrel.exe') -DifferenceObject $rootFiles).Count -ne 0) { + throw "ZIP root must contain the English and Chinese READMEs and pebrel.exe" } & $packageScript -Version 'unreleased' -PackageBrand NebulaTerminal -SkipBuild -AllowStale -OutputDirectory $resolvedOutput -TargetDirectory $TargetDirectory