pixel-agents README

项目的 README,来自 github.com/pixel-agents-hq/pixel-agents。合并为一个 markdown 文件:README.md。

Pixel Agents

version marketplaces npm downloads stars license discord

🌐 Website • 🛒 VS Code • 🛒 Open VSX • 📦 npm • 👾 Discord • 🤝 Contributing • 📋 Changelog

Pixel Agents turns the AI coding agents running in your terminals into animated pixel-art characters working in a tiny office. They walk to their desks, sit down, type when they're editing files, read when they're searching, and flag you visually when they're stuck waiting for input. The office is also where you run them: launch an agent into a project, pick its character, and see how much context it has left.

It ships in two forms from the same codebase:

Claude Code is supported today; Codex, Gemini, Cursor, and others are on the roadmap. Want to add support for your favourite CLI? Join our Discord and let us know!

Pixel Agents screenshot

Features

Pixel Agents characters

Requirements

Getting Started

The VS Code extension and the standalone CLI can run side by side: both share the office layout but keep separate agents and settings.

VS Code extension

  1. Install Pixel Agents from the VS Code Marketplace or Open VSX.
  2. Open the Pixel Agents panel beside the terminal.
  3. Click + (bottom left) to open its drawer of Directories, then click one to launch Claude Code in it. The drawer is empty at first: turn on Settings → Show Workspace Folders, or add a folder with + Directory (see Directories below).

To use Claude with --dangerously-skip-permissions, turn on Settings → Skip Permissions. It stays on for every agent launched from that host until you turn it off. Only use this when you accept the security implications.

Pixel Agents also detects Claude sessions started outside the extension. Turn on Settings → Watch All Sessions to include sessions from other workspaces.

Standalone CLI

Run Pixel Agents from anywhere:

npx pixel-agents

The CLI prints a local URL. Click + to open the drawer of Directories: add one with + Directory, or turn on Settings → Show Start Directory to list the folder you started in. Pick a Directory to launch Claude Code in the browser's embedded terminal (on a phone, tap the + card). Sessions started in your own terminal show up too. To install globally:

npm install --global pixel-agents
pixel-agents

Use a fixed address or port when needed:

pixel-agents --port 3100
pixel-agents --host 127.0.0.1 --port 3100
pixel-agents --no-terminal
pixel-agents --help

The printed URL carries a ?token=. Without it you can watch the office in a sort of read-only mode: no agents can be launched, terminals are not shown, and layout and settings cannot be edited. The token is kept in ~/.pixel-agents/standalone-token, so a bookmark keeps working if you also fix --port. Treat the URL as a secret: whoever holds it can do all of the above.

On your phone, via Tailscale

  1. Install Tailscale on the computer running Pixel Agents and on your phone, both signed in to the same tailnet.

  2. Start the server on a fixed port, allowing the computer's tailnet name:

    pixel-agents --port 3100 --allowed-host my-computer.my-tailnet.ts.net
    
  3. Serve it to your tailnet over HTTPS:

    tailscale serve --bg 3100
    
  4. On your phone, open https://my-computer.my-tailnet.ts.net/?token=… (the ?token= from the URL the CLI printed) and add it to the home screen. The fixed port keeps that shortcut working across restarts.

Only devices on your tailnet can reach it.

Customizing the Office

Layout

Click Layout to edit the office: paint floors, walls and carpets, place and recolour furniture, add pets you can click on, and paint named Areas that a Directory's agents prefer to sit in. Layouts can be exported and imported as JSON.

Office assets

Use Settings → Add Asset Directory to load external characters, pets, and furniture. See docs/external-assets.md for furniture directory structure and manifest details. The visual asset manager at scripts/asset-manager.html helps create furniture manifests.

Directories

A Directory is a folder you launch agents into. Click + to open the drawer, then + Directory to add one: a name, a path (suggested from your past Claude Code sessions), and optionally the Areas its agents should sit in and the characters they wear by default. The pencil on a row you added edits or deletes it; on a phone, long-press the row.

Your workspace folders (VS Code) or the directory the CLI started in (standalone) are listed too once you turn on Settings → Show Workspace Folders or Show Start Directory.

Characters

Open the roster from the arrow beside + and press a character's pencil (or + New) to open the Characters view. Dress a character from the wardrobe tabs, recolour any piece, and touch up pixels in the editor; a piece you redraw can be saved as a custom item for the rest of the cast. Nothing changes in the office until you press Save. Characters export as a PNG or a config file, and the whole roster as a zip.

Picking a character in the roster and then a Directory launches an agent as that character. In a Directory's settings you can also list its default characters, so its agents are recognisable at a glance.

Where This Is Going

The vision is to play a game and build a product. Two goals follow from it: to build a familiar, intuitive interface for running and orchestrating a lot of agents; and to make the hours you spend doing it feel less like administration and more like play.

Three things get there, and they are happening in parallel, not in sequence:

Most of this is still ahead. See Issues and Discussions for what's open, and CONTRIBUTING.md to jump in.

How It Works

Pixel Agents uses two Claude Code detection paths:

Pixel Agents does not modify Claude Code. Its hook configuration and persistent data live under ~/.claude/ and ~/.pixel-agents/ respectively. The usage bars are opt-in (Settings → Usage Bars): Claude Code reports plan limits only to its status line, so turning them on wraps your statusLine command in ~/.claude/settings.json (yours keeps running unchanged), and turning them off restores it.

Development

To build from source, run the tests, or add support for another agent CLI, see CONTRIBUTING.md. It covers setup, the project structure, how an event reaches the office, the asset format, and the hosted test reports. The end-to-end suite is described in e2e/README.md.

Troubleshooting

Still stuck? Ask in Discord or open an issue.

Community & Contributing

Join the Discord to chat with other users and follow development. Use Issues to report bugs or request features, and Discussions for questions and ideas.

See CONTRIBUTING.md before opening a pull request and read our Code of Conduct before participating.

Supporting the Project

GitHub Sponsors Ko-fi

Star History

Star History Chart

License

Pixel Agents is available under the MIT License.

pixel-agents (pixel-agents-hq/pixel-agents)

正在搜索数据库…

这是什么?Pixel Agents 会把你终端里运行的 AI 编程代理变成在小办公室里工作的像素风动画角色。它们会走到办公桌前,编辑文件时敲键盘,搜索时阅读,遇到需要你输入而停下来等待时,会以视觉方式提醒你。
这是 VS Code 扩展还是独立应用?两者皆是,基于同一套代码:一个在面板区域渲染角色的 VS Code 扩展,以及一个独立的命令行工具(npx pixel-agents)。后者会运行本地服务器,并以浏览器应用的形式提供同一个办公室,适用于 tmux、远程或不使用 VS Code 的工作流程。
我该如何运行它?在 VS Code 中,从 Marketplace 或 Open VSX 安装,打开 Pixel Agents 面板,然后点击 '+ Agent' 启动 Claude Code。使用命令行时,在你想监控的工作区文件夹中运行 'npx pixel-agents',它会打印出一个带会话令牌的本地网址。
支持哪些编程代理?需要预先安装什么?你需要先安装并配置好 Claude Code 命令行工具。目前 Claude Code 是唯一的参考实现,Codex、Gemini、Cursor 在路线图中。VS Code 扩展需要 VS Code 1.105.0+,独立命令行工具需要 Node.js 20+。
独立命令行工具的网址有什么安全隐患吗?打印出的网址包含一个会话令牌,它相当于一种持有即可使用的凭证。任何拿到它的人都可以远程批准钩子安装,而且它还会未经脱敏地被记录在你的浏览器历史和服务器日志中。因此不要分享它,也不要在不可信的网络上绑定到 0.0.0.0。
它会修改 Claude Code 或访问我的文件吗?不会。Pixel Agents 不会修改 Claude Code 本身,它的钩子配置和持久化数据分别存放在 ~/.claude/ 和 ~/.pixel-agents/ 下。
它如何检测代理正在做什么?它使用两种途径:一种是钩子模式,由脚本接收 SessionStart、PreToolUse、Stop 等 Claude 事件;另一种是启发式备用方案,在钩子不可用时扫描 ~/.claude/projects/ 下 Claude 的 JSONL 会话记录。
我可以自定义办公室布局吗?可以。内置编辑器允许你涂刷地板和墙壁、放置和旋转家具、添加宠物、创建映射到工作区文件夹的命名区域,并将布局导入或导出为 JSON。布局最大可达 64x64 个方格。
同时运行多个代理或子代理时会怎样?每个代理终端都会拥有自己的动画角色。临时子代理以及持久的 Claude 队友(Agent Teams)也会以独立角色出现,各自拥有不同的职责和生命周期变化。
我能同时运行 VS Code 扩展和命令行工具吗?可以,两者能够同时运行。每个实例都会在 ~/.pixel-agents/servers/ 下注册,各自保留独立的代理、座位和设置,同时共享同一个办公室布局。
大小
4.6 MB
星标
10.3K
时长
9个月
提交 · 90 天