@calamity-inc/slave 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,9 @@ Vibe coding without the kaboom factor.
5
5
  ## Setup
6
6
 
7
7
  1. Install slave: `npm i -g @calamity-inc/slave`
8
- 2. Create a default profile, e.g. `slave --create-profile default openai gpt-6-luna` or `slave --create-profile default anthropic claude-haiku-5-5`
8
+ 2. Create a profile, e.g.:
9
+ - `slave --create-profile luna openai gpt-6-luna --set-default`
10
+ - `slave --create-profile haiku anthropic claude-haiku-5-5 --set-default`
9
11
 
10
12
  ## Usage
11
13
 
@@ -30,30 +32,23 @@ Options:
30
32
  Single-character flags can be combined, so `slave -cw prompt` is equivalent to `slave -c -w prompt`.
31
33
 
32
34
  Subcommands:
33
- - `--create-profile <name> <provider> <model>` — create a profile
35
+ - `--create-profile <name> <provider> <model> [--set-default]` — create a profile
34
36
  - `provider` can be `openai`, `anthropic`, or an OpenAI-compatible base URL like `http://127.0.0.1:1234/v1` for [LM Studio](https://lmstudio.ai/developers).
37
+ - `--update-profile <name> <provider> <model> [--set-default]` — update a profile
38
+ - `--set-default <profile name>` — set default profile
35
39
  - `--list-profiles` — list all profiles
36
40
  - `--delete-profile <name>` — delete a profile
37
41
  - `--update-api-key <provider>` — update an API Key
42
+ - `--logs` — get info about logs
43
+ - `--skills` — get info about skills
38
44
 
39
45
  ## Security
40
46
 
41
47
  The model can't run commands on your system; it only gets limited access to your filesystem:
42
- - Within the working directory and subdirectories.
43
- - `.git` folder and `.env` file can't be accessed by the model, tho it knows they exist, if they do.
48
+ - Restricted to the working directory and its subdirectories.
49
+ - 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.
44
50
  - Files that are `.gitignore`d can't be written to.
45
- - You can provide a `.slaveignore` for files that the model should not be allowed to read or write. It will still be able to know of their existence.
46
51
 
47
52
  However, these restrictions are only as good as your practices; you should:
48
53
  - 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.
49
54
  - Review changes to your code before running anything, including tests.
50
-
51
- ## Logs
52
-
53
- Each invocation that prompts a model creates a log file:
54
-
55
- - Linux: `~/.local/state/slave-nodejs`, or `$XDG_STATE_HOME/slave-nodejs` if `XDG_STATE_HOME` is set
56
- - macOS: `~/Library/Logs/slave-nodejs`
57
- - Windows: `%LOCALAPPDATA%\slave-nodejs\Log`
58
-
59
- When a new log file is created, any log file older than 30 days is deleted.
package/package.json CHANGED
@@ -4,13 +4,14 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/calamity-inc/slave.git"
6
6
  },
7
- "version": "0.3.2",
8
- "type": "module",
7
+ "version": "0.4.1",
8
+ "type": "commonjs",
9
9
  "bin": {
10
- "slave": "index.js"
10
+ "slave": "src/main.js"
11
11
  },
12
12
  "dependencies": {
13
13
  "@anthropic-ai/sdk": "^1.3.0",
14
+ "chalk": "^5",
14
15
  "commander": "^15.0.0",
15
16
  "env-paths": "^4.0.0",
16
17
  "ignore": "^7.0.13",