zp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou are helping the user manage development projects with , a Zed project launcher that works across local macOS, Apple Containers, and Fly.io Sprites.
zp你正在协助用户使用管理开发项目,是一款Zed项目启动器,可在本地macOS、Apple容器和Fly.io Sprites上运行。
zpzpWhat zp Does
zp的功能
zp- local — on macOS
~/github/owner/name - container — Apple Container (macOS 26+), projects at
/home/klundstedt/github/owner/name - sprite — Fly.io Sprite (remote VM), projects at
/home/klundstedt/github/owner/name
All backends use the path convention. New machines are bootstrapped with dotfiles automatically.
~/github/owner/namezp- local(本地) — macOS上的路径
~/github/owner/name - container(容器) — Apple容器(macOS 26+),项目位于
/home/klundstedt/github/owner/name - sprite(精灵实例) — Fly.io Sprite(远程虚拟机),项目位于
/home/klundstedt/github/owner/name
所有后端均遵循路径约定。新机器会自动通过dotfiles完成初始化配置。
~/github/owner/nameUsage
使用方法
zp [owner/name | name] [--backend local|container|sprite] [--machine <name>] [--org <org>]zp [owner/name | name] [--backend local|container|sprite] [--machine <name>] [--org <org>]Non-Interactive Commands (Use These)
非交互式命令(推荐使用)
When calling programmatically, always provide all arguments to avoid TTY prompts:
zpbash
undefined以编程方式调用时,请始终提供所有参数以避免TTY提示:
zpbash
undefinedOpen an existing project (fully specified)
打开现有项目(完整指定参数)
zp owner/name --backend container --machine dev
zp owner/name --backend container --machine dev
Create a new container, bootstrap it, clone repo, open in Zed
创建新容器、完成初始化、克隆仓库并在Zed中打开
zp owner/name --backend container --machine new-machine-name
zp owner/name --backend container --machine new-machine-name
Open locally
在本地打开
zp owner/name --backend local
zp owner/name --backend local
Open on a sprite
在Sprite上打开
zp owner/name --backend sprite --machine mysprite
When `--machine` names a machine that doesn't exist, `zp` creates it, bootstraps dotfiles, and clones the project — all non-interactively.zp owner/name --backend sprite --machine mysprite
当`--machine`指定的机器不存在时,`zp`会自动创建该机器、初始化dotfiles并克隆项目——全程无需交互。Interactive Commands (Require TTY)
交互式命令(需要TTY终端)
These invoke fzf and are only usable when the user is at a terminal:
bash
undefined这些命令会调用fzf,仅在用户处于终端环境时可用:
bash
undefinedBrowse all projects across all backends
浏览所有后端的所有项目
zp
zp
Search by repo name (fzf if multiple matches)
按仓库名称搜索(多个匹配项时使用fzf)
zp gitlake
zp gitlake
Search by owner/name (offers to clone if not found)
按owner/name搜索(未找到时会提示克隆)
zp owner/name
zp owner/name
Browse projects on a specific backend
浏览指定后端的项目
zp --backend container
zp --backend container --machine dev
undefinedzp --backend container
zp --backend container --machine dev
undefinedBackends
后端
Backends are plug-in shell scripts in . Each implements:
~/.local/bin/zp-backends/| Function | Purpose |
|---|---|
| Check if CLI is installed |
| List machines |
| Create a machine |
| Start/wake a machine |
| Set up SSH, return |
| Run a command via native transport |
后端是位于中的可插拔shell脚本。每个后端需实现以下功能:
~/.local/bin/zp-backends/| 函数 | 用途 |
|---|---|
| 检查CLI是否已安装 |
| 列出所有机器 |
| 创建机器 |
| 启动/唤醒机器 |
| 配置SSH,返回 |
| 通过原生传输方式运行命令 |
Common Agent Tasks
Agent常见任务
Open a project the user asks about
打开用户询问的项目
bash
undefinedbash
undefinedDetermine where it lives, then open it
确定项目位置后打开
zp owner/name --backend container --machine dev
undefinedzp owner/name --backend container --machine dev
undefinedCheck what projects exist on a machine
检查某台机器上存在的项目
bash
undefinedbash
undefinedList projects via backend_exec (no SSH needed)
通过backend_exec列出项目(无需SSH)
container exec dev bash -c "find /home/klundstedt/github -mindepth 2 -maxdepth 2 -type d 2>/dev/null"
undefinedcontainer exec dev bash -c "find /home/klundstedt/github -mindepth 2 -maxdepth 2 -type d 2>/dev/null"
undefinedClone a new repo onto an existing machine
将新仓库克隆到现有机器
bash
undefinedbash
undefinedzp handles clone automatically if the project doesn't exist on the target
如果目标机器上不存在该项目,zp会自动处理克隆操作
zp owner/name --backend container --machine dev
undefinedzp owner/name --backend container --machine dev
undefinedCreate a fresh environment for a project
为项目创建全新环境
bash
undefinedbash
undefinedNew machine name → creates machine, bootstraps, clones, opens
指定新机器名称→创建机器、完成初始化、克隆项目并打开
zp owner/name --backend container --machine fresh-env
undefinedzp owner/name --backend container --machine fresh-env
undefinedAfter Opening a New Project
打开新项目后
When clones a repo that doesn't have an , suggest using the skill to set up agent context. This gives Claude Code and other agents the project-specific instructions they need to be effective.
zpAGENTS.md/bootstrap-project当克隆的仓库中没有文件时,建议使用 Skill来设置Agent上下文。这能让Claude Code及其他Agent获得项目专属指令,从而更高效地工作。
zpAGENTS.md/bootstrap-projectImportant Notes
重要说明
- GitHub owner in the path (e.g. ) is separate from the OS user (
kylelundstedt).klundstedt - is an error — local backend has no machines.
--backend local --machine X - Stopped containers are started automatically. Sprites auto-wake on connection.
- Bootstrap runs from the dotfiles repo on new machines.
install.sh --no-prompt
- 路径中的GitHub所有者(例如)与系统用户(
kylelundstedt)是分开的。klundstedt - 使用是错误的——本地后端没有机器概念。
--backend local --machine X - 已停止的容器会自动启动。Sprite会在连接时自动唤醒。
- 新机器初始化时会运行dotfiles仓库中的脚本。
install.sh --no-prompt