docs: README 改为中文
This commit is contained in:
68
README.md
68
README.md
@@ -1,72 +1,72 @@
|
||||
# XCTerminal
|
||||
|
||||
A headless Electron terminal application with a web-based UI. Run terminal sessions in the browser with a 3x2 grid layout.
|
||||
基于 Electron 的无头终端应用,通过浏览器访问,支持 3x2 网格布局。
|
||||
|
||||
## Features
|
||||
## 功能特性
|
||||
|
||||
- Multiple terminal panels in a grid layout (3 columns x 2 rows)
|
||||
- Real-time terminal output with PowerShell support
|
||||
- WebSocket and HTTP input support
|
||||
- Automatic port selection
|
||||
- Cross-platform (Windows, macOS, Linux)
|
||||
- 网格布局终端面板(3 列 x 2 行)
|
||||
- 实时终端输出,支持 PowerShell
|
||||
- 支持 WebSocket 和 HTTP 输入
|
||||
- 自动选择空闲端口
|
||||
- 跨平台(Windows、macOS、Linux)
|
||||
|
||||
## Quick Start
|
||||
## 快速开始
|
||||
|
||||
### Development
|
||||
### 开发
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Build
|
||||
### 构建
|
||||
|
||||
```bash
|
||||
npm run electron:build
|
||||
```
|
||||
|
||||
The built executable will be at `release/XCTerminal.exe`.
|
||||
构建产物位于 `release/XCTerminal.exe`。
|
||||
|
||||
### Usage
|
||||
### 使用
|
||||
|
||||
```bash
|
||||
# Run with default port (3002)
|
||||
# 使用默认端口(3002)
|
||||
./release/XCTerminal.exe
|
||||
|
||||
# Specify port
|
||||
# 指定端口
|
||||
./release/XCTerminal.exe --port=8080
|
||||
|
||||
# Or use environment variable
|
||||
# 或使用环境变量
|
||||
PORT=8080 ./release/XCTerminal.exe
|
||||
```
|
||||
|
||||
Then open `http://localhost:3002` (or your specified port) in your browser.
|
||||
启动后访问 `http://localhost:3002`(或你指定的端口)。
|
||||
|
||||
## Project Structure
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
XCTerminal/
|
||||
├── electron/ # Electron main process
|
||||
│ ├── main.js # Main entry point
|
||||
│ └── preload.js # Preload script
|
||||
├── src/ # React frontend
|
||||
│ ├── App.tsx # Main app component
|
||||
│ └── components/ # UI components
|
||||
├── server/ # Standalone server (optional)
|
||||
│ └── index.js # Server entry point
|
||||
└── release/ # Built executables
|
||||
├── electron/ # Electron 主进程
|
||||
│ ├── main.js # 入口文件
|
||||
│ └── preload.js # 预加载脚本
|
||||
├── src/ # React 前端
|
||||
│ ├── App.tsx # 主组件
|
||||
│ └── components/ # UI 组件
|
||||
├── server/ # 独立服务器(可选)
|
||||
│ └── index.js # 服务器入口
|
||||
└── release/ # 构建产物
|
||||
```
|
||||
|
||||
## Tech Stack
|
||||
## 技术栈
|
||||
|
||||
- Electron (headless mode)
|
||||
- Electron(无头模式)
|
||||
- React 19
|
||||
- Vite
|
||||
- Ghostty Web (terminal emulation)
|
||||
- node-pty (PTY management)
|
||||
- Express (HTTP server)
|
||||
- WebSocket (real-time I/O)
|
||||
- Ghostty Web(终端模拟)
|
||||
- node-pty(PTY 管理)
|
||||
- Express(HTTP 服务器)
|
||||
- WebSocket(实时 I/O)
|
||||
|
||||
## License
|
||||
## 许可证
|
||||
|
||||
Private - All rights reserved.
|
||||
私有项目 - 保留所有权利。
|
||||
|
||||
Reference in New Issue
Block a user