@calamity-inc/slave

中文文档
0.4.4发布于 2026/11/01ES Module近 30 天下载 2204

Vibe coding without the kaboom factor.

原始使用文档
文档目录3 节
  1. Setup
  2. Usage
  3. Security

slave

Vibe coding without the kaboom factor.

Setup

  1. Install slave: npm i -g @calamity-inc/slave
  2. Create a profile, e.g.:
  • slave --create-profile luna openai gpt-6-luna --set-default
  • slave --create-profile haiku anthropic claude-haiku-5-5 --set-default

Usage

In any directory:

slave [options] [--] How do I use the 'slave' command?

You can also pipe text in:

cat yap.txt | slave Summarize this text

Options:

  • --long/--multiline — write a multiline prompt (mutually exclusive with piping text in)
  • -c/--cont/--continue — add your previous invocation to the context of this one
  • -a/--amend — retry the previous invocation, using the context from before it
  • -w/--web — allow the model to search the web
  • -n/--no-fs/--nofs — disable filesystem access
  • -r/--readonly — disable filesystem write access
  • -s/--sandbox — allow the model to use a docker container
  • -p/--profile <name> — use the specified profile

Single-character flags can be combined, so slave -cw prompt is equivalent to slave -c -w prompt.

Subcommands:

  • --create-profile <name> <provider> <model> [--set-default] — create a profile
    • provider can be openai, anthropic, or an OpenAI-compatible base URL like http://127.0.0.1:1234/v1 for LM Studio.
  • --update-profile <name> <provider> <model> [--set-default] — update a profile
  • --set-default <profile name> — set default profile
  • --list-profiles — list all profiles
  • --delete-profile <name> — delete a profile
  • --update-api-key <provider> — update an API Key
  • --set-system/--set-system-prompt [prompt] [--long|--multiline] — set or clear the system prompt
  • --get-system/--get-system-prompt — get the system prompt
  • --skills — get info about skills
  • --logs — get info about logs

Security

The model can't run commands on your system; it only gets limited access to your filesystem:

  • Restricted to the working directory and its subdirectories.
  • Can't read the .git folder, .env files, or any files excluded by .slaveignore. Although the model will still be able to know of their existence.
  • Files that are .gitignored can't be written to.

However, these restrictions are only as good as your practices; you should:

  • Only run slave in Git-tracked folders and be sure that anything you don't want to lose is committed or at least staged so you can always revert any changes made by the model.
  • Review changes to your code before running anything, including tests.

版本与发布记录

@calamity-inc/slave 共发布 12 个版本,首次发布于 2026/10/23;过去 12 个月发布了 12 个版本。

版本发布日期距今
0.4.4latest2026/11/018 天前
0.4.32026/10/2811 天前
0.4.22026/10/2713 天前
0.4.12026/10/2614 天前
0.4.02026/10/2614 天前
0.3.22026/10/2515 天前

关于 @calamity-inc/slave 的常见问题

@calamity-inc/slave 是什么?

Vibe coding without the kaboom factor.

如何安装 @calamity-inc/slave?

在项目目录运行 npm install @calamity-inc/slave,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 slave,可以用 npx slave 直接运行。

@calamity-inc/slave 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/calamity-inc__slave 是否存在。

@calamity-inc/slave 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@calamity-inc/slave 可以商用吗?

@calamity-inc/slave 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@calamity-inc/slave 的下载量有多少?

根据 npm 官方下载统计,@calamity-inc/slave 在 2026/10/09 – 2026/11/07 这 30 天内被下载 2,204 次,日均约 73 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@calamity-inc/slave 还在维护吗?

最新版本 0.4.4 发布于 2026/11/01(8 天前);至今共发布 12 个版本,其中过去 12 个月发布了 12 个;首次发布于 2026/10/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。