Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Dockerfile linguist-vendored
# Exclude installer scripts from language statistics
scripts/*.sh linguist-vendored
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ test_*
*.sh
# Keep the sysmon eBPF build script tracked
!ghostscope-process/ebpf/build_sysmon_bpf.sh
# Keep installer script tracked
!scripts/install.sh
# Keep other C files in test fixtures but exclude random C files in root
/*.c
CLA*
Expand Down
21 changes: 21 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@

## Installation

### Quick Install Script (Recommended)

GhostScope ships with an install helper that downloads the latest release binary, copies a default configuration to `~/.ghostscope/config.toml`, and installs everything under `~/.ghostscope/bin` (no sudo required).

```bash
curl -fsSL https://raw.githubusercontent.com/swananan/ghostscope/main/scripts/install.sh | bash
```

**Prerequisites**

- `curl`, `tar`, `install` (usually provided by coreutils)
- `python3` (used to pick the correct release asset)

After the script finishes, add the binary path to your shell configuration:

- Bash: `echo 'export PATH="$HOME/.ghostscope/bin:$PATH"' >> ~/.bashrc`
- Zsh: `echo 'export PATH="$HOME/.ghostscope/bin:$PATH"' >> ~/.zshrc`
- Fish: `echo 'set -Ux PATH $HOME/.ghostscope/bin $PATH' >> ~/.config/fish/config.fish`

Restart the terminal and run `ghostscope --version` to verify.

### Download from GitHub Releases

1. Download the latest release from [GitHub Releases](https://github.com/swananan/ghostscope/releases)
Expand Down
23 changes: 22 additions & 1 deletion docs/zh/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@

## 安装

### 快速安装脚本(推荐)

GhostScope 提供了一个一键安装脚本,会自动下载最新的发布版二进制,复制默认配置到 `~/.ghostscope/config.toml`,并安装到 `~/.ghostscope/bin`(无需 sudo)。

```bash
curl -fsSL https://raw.githubusercontent.com/swananan/ghostscope/main/scripts/install.sh | bash
```

**环境要求**

- `curl`、`tar`、`install`
- `python3`(用于选择最新的 release 版本)

脚本执行完成后,请将以下 PATH 语句写入相应的 shell 配置文件:

- Bash:`echo 'export PATH="$HOME/.ghostscope/bin:$PATH"' >> ~/.bashrc`
- Zsh:`echo 'export PATH="$HOME/.ghostscope/bin:$PATH"' >> ~/.zshrc`
- Fish:`echo 'set -Ux PATH $HOME/.ghostscope/bin $PATH' >> ~/.config/fish/config.fish`

重新打开终端后运行 `ghostscope --version` 验证安装。

### 从 GitHub Releases 下载

1. 从 [GitHub Releases](https://github.com/swananan/ghostscope/releases) 下载最新版本
Expand Down Expand Up @@ -189,4 +210,4 @@ RUST_LOG=debug sudo ghostscope -p $(pidof your_program)

1. 查看[常见问题](faq.md)了解常见问题
2. 搜索[现有问题](https://github.com/swananan/ghostscope/issues)
3. 提交新问题并附上安装日志
3. 提交新问题并附上安装日志
Loading