Show HN:Sprocket——面向软硬件开发的 AI Agent
英文标题:🔶 Show HN: Sprocket – The Best AI Agent for Hardware and Software Development
Sprocket 是一款轻量级 AI Agent,定位为软硬件开发平台,可检索网络上的高质量上下文来辅助生成硬件设计和代码。其宣称可使用 React 绘制原理图、生成 BOM(物料清单)及详细装配说明,并能够在用户授权指令下自行从网站购买硬件零件或 SaaS 订阅。项目支持通过浏览器、桌面应用和 CLI 运行,并提供本地服务器、开发环境及 Electron 打包流程。该 Show HN 帖子获得 117 分和 11 条评论,反映出开发者社区对具备软硬件工作流与采购能力的 Agent 的关注。
1.3 MB
63.9 KB
中文
目标:打造全球最佳的软硬件开发平台。
Sprocket 是一款能够创建硬件设计并编写代码的轻量级 Agent。
Sprocket 会为其执行的每项任务从网络检索一流的上下文,因此具备极高的可靠性。在硬件设计方面,Sprocket 可以使用 React 绘制美观的原理图、创建 BOM,并生成详细的装配说明。
更重要的是:当你要求它这样做时,Sprocket 可以(自行)从任何网站购买任何物品,包括硬件零件和 SaaS 订阅。
注意
你可以使用下文定义的任意方式运行 Sprocket,而不会影响其功能或性能。桌面应用相比通过浏览器使用 Sprocket,可能会占用更多内存。
除非你已安装桌面应用,否则上述方式会通过浏览器运行 Sprocket。
从最新的 GitHub Release Artifacts 下载适用于你的操作系统的版本并运行它。
npm i -g @spikonado/sprocket
sprocket
除非你已安装桌面应用,否则上述方式会通过浏览器运行 Sprocket。
要在使用 Sprocket 时始终在浏览器中打开一个标签页,请使用 --web 标志:
传入一个目录,以在新线程中打开该目录,或重新连接至该工作区:
sprocket .
sprocket --web ../my-robot
Sprocket 会在多次启动之间记住已附加的工作区和本地服务器会话。本地状态存储在 $HOME/.sprocket 中;在 Windows 上,如果未设置 HOME,则存储在 %USERPROFILE%\.sprocket 中。可通过 SPROCKET_DATA_DIR 覆盖该位置。
| 命令 | 行为 |
|---|---|
sprocket serve |
在前台运行本地服务器,但不启动客户端。 |
sprocket serve --api-only |
仅提供 /api;用于开发(见“开发”)。 |
运行 sprocket --help 或 sprocket serve --help 查看所有选项。
常用的 Sprocket 服务器覆盖项可通过环境变量设置:
| 变量 | 用途 |
|---|---|
SPROCKET_DATA_DIR |
用于保存配对、会话和工作区状态的目录。 |
SPROCKET_PORT |
本地服务器端口;安装版默认值为 17731。 |
SPROCKET_HOST |
绑定主机;默认值为 127.0.0.1。 |
SPROCKET_DESKTOP_EXECUTABLE |
供 Sprocket CLI 使用的桌面可执行文件完整路径。 |
PUBLIC_CONVEX_URL |
Agent 运行时使用的 Convex 部署。 |
SPROCKET_STATIC_DIR |
要提供服务的 Web 构建产物,用于替代捆绑版本。 |
- Bun 1.x,版本 1.3.9 或更高
- Node.js 24.x,版本 24.14 或更高
- 当前稳定版 Rust 工具链
安装依赖:
启动浏览器开发环境:
按照说明创建 Convex 部署并配置 authkit 后,为希望启用的每个模型提供商,使用其 API 密钥配置 Convex 部署。
这会在 http://localhost:5173 运行 Vite,并在 http://127.0.0.1:7731 运行 Rust API;开发状态保存在仓库内的 .sprocket-dev 目录中。若要改为针对 Electron 开发,请运行:
cargo test
bun run test
bun run build
prek run -a
使用以下方式创建本地 Electron 安装包:
构建产物将写入 apps/desktop/dist/,文件名为 sprocket-desktop-*(根据宿主操作系统分别为 .AppImage、.dmg 或 .exe)。发布的安装包来自 GitHub Releases;sprocket CLI 则单独发布在 npm。
- 如果端口
17731已被占用,请在启动前设置SPROCKET_PORT。 - 如果
sprocket打开的是浏览器而非桌面应用,请从 GitHub Releases 安装sprocket-desktop并将其加入PATH,或者设置SPROCKET_DESKTOP_EXECUTABLE。 - 未签名的 macOS 和 Windows 桌面构建版本首次打开时,可能需要绕过 Gatekeeper / SmartScreen。
- 如需帮助,请联系 aarav@spikonado.com。
English / 原文
Goal : To make the world's best platform for developing hardware and software.
Sprocket is a lightweight agent that can create hardware designs and write code.
Sprocket retrieves best-in-class context from the web for everything it does. It is therefore incredibly reliable. In terms of hardware design, Sprocket can make beautiful schematics in React, create your BOM, and create detailed assembly instructions.
And here's the best part: Sprocket can (on its own) buy anything from any website when you tell it to do so. From hardware parts to SaaS subscriptions.
Note
You can run Sprocket using any of the ways defined below with no impact on Sprocket's capabilities or performance. The desktop app may take more RAM than using Sprocket through your browser.
The above runs Sprocket through your browser unless you have the desktop app installed.
Install it for your OS from the latest GitHub Release Artifacts and run it.
npm i -g @spikonado/sprocket
sprocket
The above runs Sprocket through your browser unless you have the desktop app installed.
To always open a tab in your browser when using Sprocket, use the --web flag:
Pass a directory to open or reconnect that workspace in a new thread:
sprocket .
sprocket --web ../my-robot
Sprocket remembers attached workspaces and local server sessions between launches. Local state lives in $HOME/.sprocket (or %USERPROFILE%\.sprocket on Windows when HOME is unset). Override with SPROCKET_DATA_DIR.
| Command | Behavior |
|---|---|
sprocket serve |
Run the local server in the foreground without launching a client. |
sprocket serve --api-only |
Serve only /api; intended for development (see Development). |
Run sprocket --help or sprocket serve --help for all options.
Common Sprocket server overrides are available as environment variables:
| Variable | Purpose |
|---|---|
SPROCKET_DATA_DIR |
Directory for pairing, sessions, and workspace state. |
SPROCKET_PORT |
Local server port; defaults to 17731 for installed use. |
SPROCKET_HOST |
Bind host; defaults to 127.0.0.1. |
SPROCKET_DESKTOP_EXECUTABLE |
Full path to the desktop executable to be used by the Sprocket CLI. |
PUBLIC_CONVEX_URL |
Convex deployment used by the agent runtime. |
SPROCKET_STATIC_DIR |
Web build to serve instead of the bundled build. |
- Bun 1.x, version 1.3.9 or newer
- Node.js 24.x, version 24.14 or newer
- A current stable Rust toolchain
Install dependencies:
Start the browser development environment:
After creating a convex deployment and configuring authkit following the instructions, configure the Convex deployment with the API key for each model provider you want to enable.
This runs Vite at http://localhost:5173 and the Rust API at http://127.0.0.1:7731, with development state kept in .sprocket-dev inside the repository. To develop against Electron instead, run:
cargo test
bun run test
bun run build
prek run -a
Create a local Electron installer package with:
Artifacts are written to apps/desktop/dist/ as sprocket-desktop-* (.AppImage / .dmg / .exe depending on the host OS). Published installers come from GitHub Releases; the sprocket CLI is published separately on npm.
- If
17731is already occupied, setSPROCKET_PORTbefore launching. - If
sprocketopens the browser instead of the desktop app, installsprocket-desktopfrom GitHub Releases ontoPATH, or setSPROCKET_DESKTOP_EXECUTABLE. - Unsigned macOS and Windows desktop builds may need a Gatekeeper / SmartScreen override the first time you open them.
- Contact aarav@spikonado.com for help.
