@cryer/star-cli 0.2.0 → 0.2.2

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
@@ -73,7 +73,14 @@ apiKeyEnv = "OPENAI_API_KEY"
73
73
  name = "gpt"
74
74
  provider = "openai"
75
75
  model = "gpt-4o"
76
- # optional per-model pricing (USD per 1M tokens) — enables the $ estimate in /cost and /usage
76
+ # optional per-model context window — overrides the top-level contextMaxTokens
77
+ # for compaction and the ctx % in the status bar
78
+ # contextMaxTokens = 272000
79
+ # optional per-model pricing in USD per 1M tokens — enables the $ estimate in
80
+ # /cost and /usage. promptPrice prices input tokens (system prompt, history,
81
+ # @file contents, tool results — resent every turn, so the bulk of usage);
82
+ # completionPrice prices output tokens (the model's replies and tool calls —
83
+ # less volume, usually the pricier rate). BOTH fields are required together.
77
84
  promptPrice = 2.5
78
85
  completionPrice = 10
79
86
 
@@ -135,6 +142,7 @@ star --clear-sessions all delete every stored session
135
142
  | `/rewind [n]` | list file-change checkpoints, or rewind to just before checkpoint `n`: restore every file changed since then and retract the matching conversation messages (asks for confirmation first) |
136
143
  | `/init [force]` | scan the project and generate an AGENTS.md (LLM-polished when a model is available) |
137
144
  | `/doctor` | environment self-check (Node, shell, config, API key status, sessions dir writability) |
145
+ | `/skills` | list available skills (project scope overrides user scope) |
138
146
  | `/commit [instructions]` | analyze uncommitted changes and let the agent stage + commit them with a Conventional Commits message (git add/commit runs through the normal permission gate) |
139
147
  | `/diff` | show uncommitted changes client-side: `git status --short` plus a colored staged/unstaged diff (no model call; huge diffs are truncated at 2000 lines) |
140
148
  | `/copy [all]` | copy the last assistant reply to the clipboard (`all`: the whole conversation as plain text) |
@@ -146,7 +154,7 @@ Keys: `ESC` / `Ctrl+C` interrupts the current stream; on a permission prompt: `y
146
154
 
147
155
  While the model is working, a spinner (`- \ | /`) shows `star is thinking…`; reasoning models also stream a dimmed tail of their thinking (last ~200 chars), which collapses to a one-line summary once the answer starts.
148
156
 
149
- The status bar shows the working directory (full path on wide terminals), the git branch, the model, the permission mode, context usage as a percentage of `contextMaxTokens`, the session cost when the model has pricing configured, and total tokens.
157
+ The status bar shows the working directory (full path on wide terminals), the git branch, the model, the permission mode, context usage as a percentage of the model's context window (its own `contextMaxTokens` when set, else the top-level one), the session cost when the model has pricing configured, and total tokens.
150
158
 
151
159
  ## !shell passthrough
152
160
 
@@ -217,6 +225,19 @@ Review the following code and list concrete issues: $ARGUMENTS
217
225
 
218
226
  The REPL also checks npm for a newer release on startup (async, non-blocking; disable with `STAR_NO_UPDATE_CHECK=1`).
219
227
 
228
+ ## Skills
229
+
230
+ Skills are reusable instruction packs the agent loads on demand. Drop a `SKILL.md` into `.star/skills/<name>/` (project) or `~/.star-cli/skills/<name>/` (user); project skills override user skills of the same name. Each `SKILL.md` starts with frontmatter (`name` optional, defaults to the directory name; `description` required), followed by the instructions body:
231
+
232
+ ```markdown
233
+ ---
234
+ description: Review code for common issues
235
+ ---
236
+ Check error handling, naming, and test coverage. Report concrete findings with file:line references.
237
+ ```
238
+
239
+ Available skills are listed in the system prompt (name + description only, so they cost almost no tokens until used). When a request matches one, the agent calls the read-level `skill` tool to load the full body — supporting files next to the `SKILL.md` (scripts, templates, examples) are resolved relative to the skill's directory. Skills added mid-session are picked up on the next turn; `/skills` lists what's currently visible. Bodies are capped at 32KB.
240
+
220
241
  ## @file mentions
221
242
 
222
243
  Prefix a path with `@` in any prompt to attach its content (REPL and print mode alike):
@@ -237,7 +258,7 @@ Missing, binary, oversized (>100KB for text, >5MB for images), or sensitive file
237
258
 
238
259
  ## Built-in tools
239
260
 
240
- `read_file`, `write_file`, `edit_file`, `glob`, `grep`, `bash`, `web_fetch`, `web_search` (DuckDuckGo, no API key needed), `todo_read`, `todo_write`, `task_list`, `task_output`, `task_kill`, `subagent` — each declares a permission level (`read` / `write` / `exec`) enforced by the permission gate. Hard safety rules (dangerous shell commands, paths outside the working directory, secret files like `.env` / private keys) are denied in `ask` / `auto` / `readonly` and cannot be overridden by allow-rules.
261
+ `read_file`, `write_file`, `edit_file`, `glob`, `grep`, `bash`, `web_fetch`, `web_search` (DuckDuckGo, no API key needed), `todo_read`, `todo_write`, `task_list`, `task_output`, `task_kill`, `subagent`, `skill` — each declares a permission level (`read` / `write` / `exec`) enforced by the permission gate. Hard safety rules (dangerous shell commands, paths outside the working directory, secret files like `.env` / private keys) are denied in `ask` / `auto` / `readonly` and cannot be overridden by allow-rules.
241
262
 
242
263
  The `subagent` tool (`exec` level, so it is hidden in plan mode and denied in readonly) spawns a child agent loop with the same built-in tools to handle a focused, self-contained subtask — research, exploration, or an isolated change — and returns the child's final report as the tool result. Subagents run one level deep (a subagent cannot spawn further subagents), share the parent's permission mode and confirmation prompt, and their conversation is not persisted to the session.
243
264