安装
sivtr 以 Cargo 包发布,源码位于 github.com/Ariestar/sivtr。
完整的人 + Agent 工作流需要安装两部分:
- CLI/TUI:负责捕获和取回本地 workspace memory;
- 内置
sivtr-memoryskill:负责教 Agent 怎么使用这些记忆。
只给人浏览时,单独安装 CLI 也可以;要让 Agent 复用本地上下文,建议两个都装。
AI 助手快速安装
Section titled “AI 助手快速安装”如果你是 AI 编码助手(Claude Code、Codex 等)替用户安装 sivtr:
sivtr --version # 是否已安装?sivtr doctor # 完整环境检查如果 sivtr --version 成功,不要重新安装。运行 sivtr doctor 检查环境,然后跳到下面的 skill 安装。
# 1. 安装二进制(选一个)cargo install sivtr # 从源码编译(需要 Rust)curl -fsSL https://raw.githubusercontent.com/Ariestar/sivtr/main/install.sh | sh # 预编译二进制
# 2. 验证sivtr --version
# 3. Shell hook(选一个)sivtr init bash # Linux 默认sivtr init zsh # macOS 默认sivtr init powershell # Windowssivtr init nushell
# 4. 配置sivtr config init
# 5. Skill(用于 Agent 工作流)npx skills add Ariestar/sivtr --skill sivtr-memory -gsivtr doctor预期:所有检查通过。若 shell hooks 显示 “not installed”,运行对应的 sivtr init 命令。若 session log directory 显示 “missing”,用户需在 sivtr init 后重启终端。
查看当前状态
Section titled “查看当前状态”sivtr init show # 查看已安装的 shell hooksivtr doctor # 完整诊断sivtr init uninstall # 移除所有 shell hookcargo uninstall sivtr # 移除二进制- Rust 和 Cargo
- 一个受支持的终端
- 当前平台可用的剪贴板能力
可选:
nvim、vim或vi,用于部分 copy 工作流中的 Vim picker view- 可修改 PowerShell、Bash、Zsh 或 Nushell profile,用于会话记录
用 Cargo 安装
Section titled “用 Cargo 安装”从 crates.io 安装最新发布版本:
cargo install sivtr验证二进制:
sivtr --versionsivtr --help快速安装(Linux/macOS)
Section titled “快速安装(Linux/macOS)”下载预编译二进制,无需编译:
curl -fsSL https://raw.githubusercontent.com/Ariestar/sivtr/main/install.sh | sh指定版本:
SIVTR_VERSION=v0.1.3 curl -fsSL https://raw.githubusercontent.com/Ariestar/sivtr/main/install.sh | sh安装到 ~/.local/bin/sivtr(或 $SIVTR_INSTALL_DIR)。无需 Rust 工具链。
克隆仓库:
git clone https://github.com/Ariestar/sivtr.gitcd sivtr在仓库根目录运行:
cargo install --path .安装内置 skill
Section titled “安装内置 skill”用 Skills CLI 全局安装 sivtr-memory skill:
npx skills add Ariestar/sivtr --skill sivtr-memory -g安装后,当本地上下文可能已经存在时,可以要求 Agent 先用 sivtr:
解决最近的终端报错,先用 sivtr 查。更新已发布包:
cargo install sivtr --force或在本地 checkout 拉取后重新安装:
git pullcargo install --path . --forceCargo 会替换之前安装的二进制。
Shell 集成
Section titled “Shell 集成”Shell 集成会记录最近的命令块,让 sivtr copy、sivtr import 和命令块导航有结构化数据可用。
为你的 shell 安装 hook:
sivtr init powershellsivtr init bashsivtr init zshsivtr init nushell查看已安装的 hook:
sivtr init show卸载所有 hook:
sivtr init uninstall安装或卸载后重启终端。
Hook 会写入按进程区分的 session log:
- Windows PowerShell 和 PowerShell 7 使用
%APPDATA%\sivtr\session_<pid>.log。 - Bash 和 Zsh 使用
$XDG_STATE_HOME/sivtr/session_<pid>.log或~/.local/state/sivtr/session_<pid>.log。 - Nushell 使用自己的 config/state 区域中的
sivtrsession 文件。
创建默认配置:
sivtr config init查看路径和当前内容:
sivtr config show用配置的编辑器打开:
sivtr config edit完整配置项见配置文件。