@tempr/cli 0.9.21 → 0.9.23

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.
Files changed (2) hide show
  1. package/README.md +221 -71
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -6,7 +6,7 @@ Sign in, chat, and run agentic coding tasks against your Tempr license from the
6
6
 
7
7
  ## Install
8
8
 
9
- The standalone builds need nothing installed first -- no .NET, no Node.
9
+ The standalone builds need nothing installed first: no .NET, no Node.
10
10
 
11
11
  **macOS and Linux**
12
12
 
@@ -45,49 +45,58 @@ tempr # interactive session
45
45
 
46
46
  ## Usage
47
47
 
48
- - `tempr "<prompt>"` -- one-shot agent turn with real tool-calling (file read/write/edit, run_command, semantic search).
49
- - `tempr` -- interactive REPL with persistent history and tab-completion for `/commands` and `@personas`. The first run plays a short animated ASCII logo; `TEMPR_LOGO=1` plays it again, `TEMPR_NO_LOGO` skips it, and `NO_COLOR` shows a plain one-line name instead of the animation.
50
- - `<something> | tempr` -- headless/piped mode: with no prompt argument, stdin is the whole prompt (`{ echo "review this:"; git diff; } | tempr`). Given a prompt argument, the piped text follows it as context (`git diff | tempr "review this"`), as in Claude Code and Codex. If nothing arrives on stdin within 3 seconds, the prompt runs on its own and a note goes to stderr; redirect from `/dev/null` (`NUL` on Windows) to skip the wait.
51
- - `tempr --ask "<prompt>"` -- plain chat, no tools.
52
- - `tempr "@debugger why does this fail"` -- run a specialist persona. In the REPL, `/persona` opens a picker to switch personas for the rest of the session instead of typing `@name` every turn.
53
- - `@workspace`/`#codebase` anywhere in a message attaches a brief workspace overview; `@problems`/`@diagnostics` attaches current compiler errors/warnings (via `dotnet build`/`tsc --noEmit`); `@relative/path/to/file` attaches that file -- images (`.png`/`.jpg`/`.gif`/`.webp`/`.bmp`) go in as real image content, other files as inline text.
54
- - Workspace instructions: every agent turn carries `AGENTS.md` and `.github/copilot-instructions.md` from the current directory, other agents' files (`CLAUDE.md`, `GEMINI.md`, `.cursorrules` and Cursor rules in `.cursor/rules` that always apply; the others are listed with their description for the agent to read when relevant), then a global `~/.tempr/AGENTS.md` for every workspace, each under its own heading and 16 KB combined at most. Where they disagree, AGENTS.md wins. `--verbose` names the files it found.
55
- - `tempr auth` signs in through your browser: it shows a code, opens the Tempr portal, and you approve the sign-in there -- on any device, so it works over SSH too. `tempr auth --browser` skips the question; `tempr auth <key>` or `TEMPR_LICENSE_KEY` still sign in with a license key, for scripts and CI. Running `tempr` for the first time walks through signing in, adding a provider key and picking a model.
48
+ - `tempr "<prompt>"`: one-shot agent turn with real tool-calling (file read/write/edit, run_command, semantic search).
49
+ - `tempr`: interactive REPL with persistent history and tab-completion for `/commands` and `@personas`. The first run plays a short animated ASCII logo; `TEMPR_LOGO=1` plays it again, `TEMPR_NO_LOGO` skips it, and `NO_COLOR` shows a plain one-line name instead of the animation.
50
+ - `<something> | tempr`: headless/piped mode. With no prompt argument, stdin is the whole prompt (`{ echo "review this:"; git diff; } | tempr`). Given a prompt argument, the piped text follows it as context (`git diff | tempr "review this"`), as in Claude Code and Codex. If nothing arrives on stdin within 3 seconds, the prompt runs on its own and a note goes to stderr; redirect from `/dev/null` (`NUL` on Windows) to skip the wait.
51
+ - `tempr --ask "<prompt>"`: plain chat, no tools.
52
+ - `tempr "@debugger why does this fail"`: run a specialist persona. In the REPL, `/persona` opens a picker to switch personas for the rest of the session instead of typing `@name` every turn.
53
+ - `@workspace`/`#codebase` anywhere in a message attaches a brief workspace overview; `@problems`/`@diagnostics` attaches current compiler errors/warnings (via `dotnet build`/`tsc --noEmit`); `@relative/path/to/file` attaches that file. Images (`.png`/`.jpg`/`.gif`/`.webp`/`.bmp`) go in as real image content, other files as inline text.
54
+ - Workspace instructions: every agent turn carries `AGENTS.md` and `.github/copilot-instructions.md` from the current directory, Claude Code's memory files (see [Memory files](#memory-files)), other agents' files (`GEMINI.md`, `.cursorrules` and Cursor rules in `.cursor/rules` that always apply; the others are listed with their description for the agent to read when relevant), then a global `~/.tempr/AGENTS.md` for every workspace, each under its own heading. Where they disagree, AGENTS.md wins. `/memory` lists what a turn sends, and `--verbose` names the files it found.
55
+ - `tempr auth` signs in through your browser: it shows a code, opens the Tempr portal, and you approve the sign-in there, on any device, so it works over SSH too. `tempr auth --browser` skips the question; `tempr auth <key>` or `TEMPR_LICENSE_KEY` still sign in with a license key, for scripts and CI. Running `tempr` for the first time walks through signing in, adding a provider key and picking a model.
56
56
  - `tempr -c` resumes this folder's most recent session; `/resume` picks one from a list.
57
- - `!command` in the REPL runs a command yourself -- `!git status` -- in this folder, and its output goes in front of your next message. No approval: it's your own command.
57
+ - `!command` in the REPL runs a command yourself (`!git status`) in this folder, and its output goes in front of your next message. No approval: it's your own command.
58
58
  - A turn that runs 30 seconds or more rings the terminal bell when it's done or needs approval, with a desktop notification where the terminal shows one; `tempr config set-notifications off` or `TEMPR_NO_NOTIFY` turns it off.
59
- - `/diff` shows what the last turn changed on disk, and `/undo` puts it back -- skipping any file that has changed since, so an undo never overwrites work it didn't make. `/rewind` goes back to before any earlier message: its files, the conversation, or both.
59
+ - `/diff` shows what the last turn changed on disk, and `/undo` puts it back, skipping any file that has changed since, so an undo never overwrites work it didn't make. `/rewind` goes back to before any earlier message: its files, the conversation, or both.
60
60
  - `--plan` (or `/plan` in the REPL) starts in plan mode: the agent looks around with read-only tools and proposes a plan, and nothing changes until you approve it.
61
- - `/compact [focus]` summarizes the conversation so far so the session can go on inside the model's context; it also happens by itself near the limit.
62
- - The agent can start a command in the background (a dev server, a watcher) and read its output later; `/tasks` lists them and `/tasks stop <id>` ends one. They all stop when the session ends.
61
+ - `/compact [focus]` summarizes the conversation so far so the session can go on inside the model's context; it also happens by itself near the limit. With `tempr config set-idle-compaction on` (Claude Code's idle compaction, off by default), a conversation of 200K tokens or more left at the prompt is summarized just before its prompt cache runs out (about 5 minutes), and if you come back after that the next message starts from the summary instead of resending the whole conversation uncached.
62
+ - `/btw <question>` asks a quick question about the conversation so far: answered without tools, shown apart, and not kept in the conversation. `/btw` alone shows the last answer again.
63
+ - `/output-style [name]` picks how the agent works and answers: Default, Explanatory, Learning, Proactive, Concise, or your own (see [Output styles](#output-styles)).
64
+ - `/code-review [low|medium|high|xhigh|max] [target] [--fix] [--max-findings n|all|default]` is Claude Code's review command, built in: it reviews this branch's commits ahead of its upstream plus uncommitted changes, or a PR number, a branch, a range or a path, and prints the findings as a numbered list (severity, place, summary, how it fails). `--fix` then fixes the important ones. It works under a one-shot prompt too (`tempr "/code-review high"`). The level you type is remembered; `medium` is the default.
65
+ - The agent can start a command in the background (a dev server, a watcher) and read its output later, and start a sub-agent in the background and carry on. `/tasks` (or `/bashes`) lists both, `/tasks <id>` prints one's whole output, `/tasks stop <id>` stops one and `/tasks stop all` stops everything. A finished sub-agent's result goes to the agent before your next message (or press Enter alone to hand it over); a one-shot run waits for its sub-agents before it exits. They all stop when the session ends.
66
+ - Live preview (a project's `.claude/launch.json` dev servers and the agent's browser tools: screenshots, clicking, the console) is Tempr Code's: it needs a browser pane, which a terminal doesn't have, so the CLI doesn't offer those tools. Run the server in the background instead.
63
67
  - A model that reasons shows "✻ Thought for Ns" before each step; `--verbose` prints what it thought.
64
- - `-w/--worktree <name>` runs the session in a git worktree of its own, on a new branch, so it doesn't touch this folder.
68
+ - `-w/--worktree <name>` runs the session in a git worktree of its own, on a new branch, so it doesn't touch this folder. A `.worktreeinclude` at the repository's root (`.gitignore` syntax, as in Claude Code) names gitignored files a new worktree gets copied, such as `.env`. A `WorktreeCreate` hook, when there is one, makes the worktree instead of git.
69
+ - `--add-dir <dir>` (or `/add-dir <dir>` in the REPL) lets the agent read and edit files in another folder too, for the session; `permissions.additionalDirectories` in settings adds one for good.
65
70
  - `tempr history search <text>` finds past sessions by what was said in them; `tempr history export` (or `/export`) writes one out as Markdown.
66
- - `tempr keys` lists your provider keys -- Tempr calls every model with your own key for its provider. `tempr keys add [provider]` adds or replaces one (no provider opens a picker), and `tempr keys remove <provider>` removes one; `/keys` does the same inside the REPL. The key is typed at a hidden prompt, piped in on stdin, or read with `--from-env VARIABLE` -- never passed as an argument, where it would land in shell history. Tempr checks it with the provider before saving it; a key the provider rejects isn't saved unless you say so or pass `--force`, and one that couldn't be checked (the provider was down, or offers no way to check) is saved with a note. Azure OpenAI, Azure AI Foundry, AWS Bedrock and custom endpoints need more than a key, so they're set up on the Portal's Provider keys page; on a Team plan, your organization's admin manages keys.
71
+ - `tempr keys` lists your provider keys: Tempr calls every model with your own key for its provider. `tempr keys add [provider]` adds or replaces one (no provider opens a picker), and `tempr keys remove <provider>` removes one; `/keys` does the same inside the REPL. The key is typed at a hidden prompt, piped in on stdin, or read with `--from-env VARIABLE`, never passed as an argument, where it would land in shell history. Tempr checks it with the provider before saving it; a key the provider rejects isn't saved unless you say so or pass `--force`, and one that couldn't be checked (the provider was down, or offers no way to check) is saved with a note. Azure OpenAI, Azure AI Foundry, AWS Bedrock and custom endpoints need more than a key, so they're set up on the Portal's Provider keys page; on a Team plan, your organization's admin manages keys.
67
72
  - `tempr models` lists the models your licence can use, with prices and context sizes; `/model` with no argument opens a picker over the same list.
68
73
  - `tempr init` drafts an `AGENTS.md` for this workspace from a scan of what's in it.
69
74
  - `tempr usage` shows what this machine's turns have cost, by model.
70
75
  - `tempr completion bash|zsh|fish|powershell` prints a completion script.
71
- - `tempr config`, `tempr history`, `tempr mcp`, `tempr doctor` -- manage config, saved sessions, MCP servers, and connectivity. `tempr mcp browse` (or `/mcp browse` in the REPL) opens a picker over Tempr's curated MCP catalog.
76
+ - `tempr config`, `tempr history`, `tempr mcp`, `tempr doctor`: manage config, saved sessions, MCP servers, and connectivity. `tempr mcp browse` (or `/mcp browse` in the REPL) opens a picker over Tempr's curated MCP catalog.
77
+ - Remote MCP servers, as in Claude Code: `tempr mcp add --transport http <name> <url>` (or `sse`, the deprecated transport), with `--header "Name: value"`. One that uses OAuth signs in with `tempr mcp login <name>` or `/mcp login <name>` (`--no-browser` prints the address instead of opening it): the browser opens, comes back to `http://localhost:PORT/callback`, and the tokens are kept encrypted in `~/.tempr` and refreshed; `tempr mcp logout <name>` (or removing the server) deletes them. For an authorization server that can't register Tempr itself, add `--client-id` and `--callback-port`. `tempr mcp list` and `/mcp` show each server's sign-in state.
78
+ - A server's resources are mentioned as `@server:protocol://path` (completed after `@`) and attached to the message; its prompts are commands, `/mcp__server__prompt arg1 arg2`, in the REPL, in `tempr acp` and at the start of a one-shot prompt (`tempr "/mcp__github__review 42"`, piped input after it). A server that says its tools, resources or prompts changed is listed again.
72
79
  - Agent-mode tools also include `get_diagnostics`, `search_symbols` (where a name is defined, then where it's used, in C#, TypeScript and JavaScript, Python, Go, Rust, Java, Kotlin, C and C++, Swift, Ruby and PHP), `get_callers`/`get_callees` (lexical, not a real language server), and `get_solution`/`get_projects`/`get_project_references`/`get_tests`/`run_tests`/`get_test_results` for .NET workspaces.
73
80
  - Web search: on an Anthropic, OpenAI or xAI model, the agent can search the web with the provider's own search, shown as `Searching the web for "…"`. The provider runs the search and bills it to your key for that provider, on top of the tokens: $10 per 1,000 searches on Anthropic and OpenAI, and $5 per 1,000 on xAI, where opening a page counts as a search too; the cost `tempr usage` and the Portal show includes it. It's on in an interactive session and off in scripts (`--json`, piped input, `CI`); `--search` and `--no-search` decide for one run, and `tempr config set-web-search off` turns it off for interactive sessions too. The pages a search finds are ones the agent may then open with `web_fetch`.
74
81
  - Chat history (`~/.tempr/sessions/`) and auth tokens are both encrypted at rest (DPAPI on Windows, AES-256-GCM elsewhere).
75
82
 
76
83
  ## Approval modes
77
84
 
78
- Mutating tool calls -- file writes, patches, commands and MCP calls -- are gated by an approval
85
+ Mutating tool calls (file writes, patches, commands and MCP calls) are gated by an approval
79
86
  mode. `tempr config set-approval-mode <mode>` sets the default; `--yolo` uses `autopilot` for one
80
- run without changing it, and on Linux puts its commands in the sandbox (see below).
87
+ run without changing it, and on Linux and macOS puts its commands in the sandbox (see below).
81
88
 
82
89
  | Mode | File edits and MCP calls | Commands |
83
90
  |---|---|---|
84
91
  | `interactive` (default) | asks | asks |
85
92
  | `autopilot` | run | allow-listed commands run; ones that delete, publish, force-push, reset or reboot, and anything not allow-listed, ask |
86
- | `bypass` | run | always asks -- **stricter than `autopilot`**, despite the name |
93
+ | `bypass` | run | always asks: **stricter than `autopilot`**, despite the name |
87
94
 
88
95
  The mode names are shared with Tempr's IDE extensions, which is why `bypass` reads the way it does.
89
96
  `autopilot` is the one to use unattended. With no terminal to ask on (piped input, `--json`, CI), a
90
- call that would have asked is refused and the model is told why.
97
+ call that would have asked is refused and the model is told why. When any settings file sets
98
+ `permissions.disableBypassPermissionsMode` to `"disable"` (Claude Code's switch), `--yolo` and
99
+ `--approval-mode autopilot` are refused (exit code 2) and a saved `autopilot` asks first instead.
91
100
 
92
101
  The allow-list starts with read-only commands and each ecosystem's build, test, lint and type-check
93
102
  commands: `dotnet build`/`test`, `npm test` and `npm run build`/`test`/`lint`/`typecheck` (and
@@ -95,25 +104,27 @@ the pnpm, yarn and bun equivalents), `pytest`, `go build`/`test`/`vet`, `cargo
95
104
  build`/`check`/`test`/`clippy`, `mvn compile`/`test`, `gradle build`/`test` and their wrapper
96
105
  scripts, `git status`, `git log` and the like. Other `package.json` scripts (`npm run deploy`)
97
106
  aren't on it. A prefix covers whole words: `npm run build` doesn't cover `npm run build-and-deploy`.
107
+ A command with a line break or a redirection (`>`, `<`) is never allowed by the list.
98
108
  Add to it per machine with `tempr config allow-command <prefix>`, or per repository with an
99
109
  `.agentcommands.json` file at the workspace root: `{ "allowedPrefixes": ["docker build"] }`.
100
110
 
101
- Each turn tells the model which projects the workspace holds -- a few folders deep, so a monorepo's
102
- projects are listed with their folders -- and how each one builds and tests. A command runs in the
111
+ Each turn tells the model which projects the workspace holds (a few folders deep, so a monorepo's
112
+ projects are listed with their folders) and how each one builds and tests. A command runs in the
103
113
  workspace root or, with `working_directory`, a folder inside it (chaining `cd` is refused). It's
104
114
  stopped after 2 minutes unless the model asks for longer, up to 10, and long output keeps its start
105
115
  and its end. The .NET-only tools (projects, references, tests) are offered only where there's a .NET
106
116
  project.
107
117
 
108
- Every tool path is checked against the current directory, including through symbolic links and
109
- Windows junctions, so a link inside the workspace can't be used to read or write outside it.
118
+ Every tool path is checked against the current directory (and the folders added with `--add-dir` or
119
+ `additionalDirectories`), including through symbolic links and Windows junctions, so a link inside
120
+ the workspace can't be used to read or write outside it.
110
121
 
111
- ## Sandbox (Linux)
122
+ ## Sandbox (Linux and macOS)
112
123
 
113
124
  `--sandbox` runs the agent's commands inside a sandbox. They can change files only in the current
114
- folder, the temp folders and the package stores and caches builds write to (npm's, pip's, NuGet's,
115
- Go's, Cargo's, Gradle's and Maven's), and they can't open network connections. Reading is open.
116
- `tempr config set-sandbox on` turns it on for every run; `--no-sandbox` turns it off for one.
125
+ folder, the folders added to it and the temp folders, and they can't open network connections.
126
+ Package managers get a cache of their own. Reading is open. `tempr config set-sandbox on` turns it
127
+ on for every run; `--no-sandbox` turns it off for one.
117
128
 
118
129
  **On by default for `--yolo` and CI.** A run on autopilot with nobody deciding command by command
119
130
  (`--yolo`, `--approval-mode autopilot`, or autopilot in CI) runs its commands in the sandbox with the
@@ -125,33 +136,77 @@ unless asked: the sandbox would let their commands run without asking.
125
136
 
126
137
  Inside the sandbox any command runs without asking, in every approval mode, so an unattended run can
127
138
  build, test and try things it has no allow-list entry for. Commands that delete, publish or
128
- force-push still ask. When a command fails because the sandbox blocked it -- a download, say -- the
139
+ force-push still ask. When a command fails because the sandbox blocked it (a download, say), the
129
140
  agent can ask to run it outside the sandbox, which always asks you first; a run with nobody to ask
130
141
  refuses it.
131
142
 
132
- dotnet in the sandbox keeps its own per-user files in `~/.cache/tempr/sandbox-dotnet` rather than
133
- `~/.dotnet`, which holds global tools and stays read-only; it restores into your own
134
- `~/.nuget/packages` and reads your NuGet package sources.
135
-
136
143
  - **What it covers:** `run_command`, the .NET test tools and `get_diagnostics`. Not `!command`,
137
144
  which you type yourself, and not MCP servers.
138
- - **Git hooks:** a command may not keep changes to `.git/hooks`, `.git/config` or
139
- `.agentcommands.json`, which run or allow things later, outside the sandbox. Tempr puts back
140
- anything a command changed there and tells the agent.
145
+ - **Protected files:** a command may not keep changes to files that run or allow things later,
146
+ outside the sandbox, as Claude Code's sandbox guards them: `.git/hooks`, `.git/config`, the
147
+ `core.hooksPath` folder (Husky's `.husky/`), submodules' config and hooks, `.agentcommands.json`,
148
+ `.claude/settings.json` and `settings.local.json`, `.tempr/settings*.json`, `.mcp.json`,
149
+ `launch.json` under `.claude` and `.tempr`, the `.claude/agents`, `commands`, `hooks` and `skills`
150
+ folders, the scripts the folder's hooks run, `.vscode`, `.idea`, and the shell and git startup
151
+ files at the workspace root (`.bashrc`, `.zshrc`, `.profile`, `.gitconfig`, `.gitmodules` and the
152
+ like). On Linux, Tempr puts back anything a command changed there and tells the agent; on macOS
153
+ the sandbox refuses the write. The agent's own edits to these files always ask, in every approval
154
+ mode, as do `git config` writes of `core.*` and `include` keys. `CLAUDE.md` isn't among them.
155
+ - **One at a time:** one sandboxed command runs at a time per repository.
156
+ - **Package caches:** each package manager (npm, pip, NuGet, Go, Cargo, Gradle, Maven and others) is
157
+ pointed at Tempr's own cache in `~/.cache/tempr/sandbox-cache`. Your own caches are read-only from
158
+ the sandbox, since builds outside it load code from them; NuGet still reads your packages as a
159
+ fallback folder. dotnet keeps its per-user files in `~/.cache/tempr/sandbox-dotnet` rather than
160
+ `~/.dotnet`, which holds global tools and stays read-only.
141
161
  - **The network:** `--sandbox-network` (or `set-sandbox network`) keeps the file limits and leaves
142
- the network on. Cutting the network off blocks TCP only, so name lookups still work.
143
- - **Where it runs:** Linux 5.13 or later, and 6.7 or later to cut off the network, through the
144
- kernel's Landlock. It needs no install and no privileges, and works in a container and on
145
- Ubuntu 24.04. On macOS and Windows it isn't available yet (inside WSL2 it works). If you ask for
146
- the sandbox where it can't run, nothing runs: the CLI exits with code 7 rather than run your
147
- commands unsandboxed. `tempr doctor` says what this machine supports.
162
+ the network on. Cutting the network off blocks TCP on Linux, so name lookups still work, and TCP,
163
+ UDP and name lookups on macOS.
164
+ - **Unix sockets:** blocked whether the network is on or off, as in Claude Code's sandbox, so a
165
+ command can't reach Docker's socket, an ssh-agent or tmux, which would act for it outside the
166
+ sandbox (sockets in the command's own temp folder still work). `"sandbox": {"network":
167
+ {"allowAllUnixSockets": true}}` lifts the block; on macOS, `allowUnixSockets` lists single socket
168
+ paths to let through. Tempr reads them from managed settings, your own `~/.claude/settings.json`
169
+ and `~/.tempr/settings.json`, and the folder's `.claude/settings.local.json`, never from a
170
+ repository's committed `.claude/settings.json`. On Linux, `allowUnixSockets` can't let single
171
+ sockets through (as in Claude Code); only `allowAllUnixSockets` does. `tempr doctor` says which
172
+ applies.
173
+ - **Where it runs:** on Linux 5.13 or later, and 6.7 or later to cut off the network, through the
174
+ kernel's Landlock; it needs no install and no privileges, and works in a container and on Ubuntu
175
+ 24.04. On macOS through Seatbelt (`/usr/bin/sandbox-exec`), as Claude Code's sandbox does it
176
+ there. On Windows it isn't available yet (inside WSL2 it works), nor in a remote environment
177
+ (`--env`). If you ask for the sandbox where it can't run, nothing runs: the CLI exits with code 7
178
+ rather than run your commands unsandboxed. `tempr doctor` says what this machine supports.
179
+
180
+ ## Remote environments (WSL and SSH)
181
+
182
+ `--env` runs the session's workspace and every tool in another environment while the CLI runs here.
183
+ Files are read and written there, and commands, git, the folder's hooks and stdio MCP servers run
184
+ there. Nothing is installed or uploaded on the other side.
185
+
186
+ ```
187
+ tempr --env wsl:Ubuntu # this folder's /mnt path in the distro (Windows)
188
+ tempr --env ssh:devbox --env-dir ~/src/app # a Host from ~/.ssh/config, or user@host
189
+ ```
190
+
191
+ - `--env-dir <path>` names the folder over there; it's required for ssh, and WSL defaults to this
192
+ folder's `/mnt/<drive>` path. The home folder itself is refused unless you add `--env-allow-home`,
193
+ since its dotfiles (`.ssh`, `.aws`, shell profiles) would be in the agent's reach.
194
+ - ssh runs in batch mode with your own config, keys and agent, and never asks for a password.
195
+ `TEMPR_SSH_CONFIG` points it at another config file. A host may use only letters, digits and
196
+ `. _ @ : [ ] -`.
197
+ - Only the remote folder's own `.mcp.json` stdio servers start there, unless you add
198
+ `--env-user-mcp`; remote (HTTP) servers connect from here.
199
+ - Not available remotely yet: the sandbox (asking for it exits with code 7), `--worktree` and
200
+ `--add-dir` (refused), language servers, the symbol, project, test and semantic-search tools,
201
+ rewinding or reverting files, and the folder's own skills, commands and agents.
202
+ - The `--json` session line says which environment a run used (`environment`).
148
203
 
149
204
  ## Your own commands and agents
150
205
 
151
206
  Markdown files, shared with Tempr Code. Put them in `.tempr/` in a project to commit them with it,
152
207
  or in `~/.tempr/` to have them everywhere.
153
208
 
154
- `.tempr/commands/deploy.md` — invoked as `/deploy staging`:
209
+ `.tempr/commands/deploy.md`, invoked as `/deploy staging`:
155
210
 
156
211
  ```markdown
157
212
  ---
@@ -164,7 +219,7 @@ Deploy to $ARGUMENTS. Check the health endpoint afterwards and report what you s
164
219
 
165
220
  `$ARGUMENTS` is everything after the command name; `$1`…`$9` are its whitespace-separated words.
166
221
 
167
- `.tempr/agents/dba.md` — invoked as `@dba what's slow about this query`:
222
+ `.tempr/agents/dba.md`, invoked as `@dba what's slow about this query`:
168
223
 
169
224
  ```markdown
170
225
  ---
@@ -182,7 +237,63 @@ You know this schema inside out. Prefer an index over a rewrite, and always expl
182
237
 
183
238
  A repository set up for Claude Code works unchanged: commands in `.claude/commands` and
184
239
  `~/.claude/commands`, subagents in `.claude/agents` and `~/.claude/agents`, skills in
185
- `~/.claude/skills`, and the project's `.mcp.json` servers. Tempr's own file of the same name wins.
240
+ `~/.claude/skills`, the project's `.mcp.json` servers, its memory files and output styles, and its
241
+ settings. Tempr's own file of the same name wins.
242
+
243
+ ### Memory files
244
+
245
+ Every turn carries Claude Code's memory files, read the way Claude Code reads them: an
246
+ administrator's managed `CLAUDE.md` and `claudeMd` setting; your `~/.claude/CLAUDE.md` and
247
+ `~/.claude/rules`; `CLAUDE.md`, `.claude/CLAUDE.md` and `CLAUDE.local.md` in each folder from the
248
+ repository's root down to the workspace; the workspace's `.claude/rules` (a rule with `paths:` front
249
+ matter loads once the agent touches a file it matches); a subfolder's `CLAUDE.md` once the agent
250
+ works there; and `@path` imports, up to four hops. A file is cut at 40,000 characters and all of them
251
+ together at 64 KB, the least specific first, and the turn says what was cut. Links are followed only
252
+ while they stay inside the project (or `~/.claude`, for your own files), and a project's imports stay
253
+ inside the project. `/memory` lists what's sent and what was left out, and `tempr doctor` names the
254
+ files.
255
+
256
+ ### Output styles
257
+
258
+ Claude Code's output styles: the built-in Default, Explanatory, Learning, Proactive and Concise, and
259
+ your own Markdown files (`name`, `description`, `keep-coding-instructions` front matter) in
260
+ `~/.claude/output-styles`, `~/.tempr/output-styles`, `.claude/output-styles` (up to the repository's
261
+ root, the nearest winning), `.tempr/output-styles`, or a plugin. The `outputStyle` setting picks one;
262
+ `/output-style <name>` saves it to the folder's `.claude/settings.local.json`, as Claude Code does.
263
+
264
+ ### Settings
265
+
266
+ Settings are read in Claude Code's precedence: managed settings (`managed-settings.json` and
267
+ `managed-settings.d/` in `C:\Program Files\ClaudeCode`, `/Library/Application Support/ClaudeCode` or
268
+ `/etc/claude-code`), then the folder's `.claude/settings.local.json`, then its `.claude/settings.json`
269
+ and `.tempr/settings.json`, then your own `~/.claude/settings.json` and `~/.tempr/settings.json`.
270
+ Lists (rules, hooks, directories) combine; for a single value the file higher up wins.
271
+
272
+ - **`env`:** variables for the session and everything it starts (commands, hooks, MCP and language
273
+ servers).
274
+ - **Permission rules:** `permissions.allow`, `ask` and `deny` (`Read(./.env)`, `Bash(git push:*)`),
275
+ or `permissionsAllow` / `permissionsAsk` / `permissionsDeny` in `~/.tempr/config.json`. Deny beats
276
+ ask, and ask beats allow, whatever the file; an ask rule asks every time, in every mode.
277
+ `permissions.additionalDirectories` adds folders the agent may use. `/permissions` lists the rules
278
+ with their files and the calls refused lately; `/permissions check <tool> <arg>` says which rule
279
+ decides a call.
280
+ - **MCP servers:** `allowedMcpServers` / `deniedMcpServers` (by `serverName`, `serverCommand` or
281
+ `serverUrl`) apply to every server, whatever its source; `allowManagedMcpServersOnly` in managed
282
+ settings counts only the managed list. For a folder's `.mcp.json`, `disabledMcpjsonServers` keeps a
283
+ server off, and `enabledMcpjsonServers` / `enableAllProjectMcpServers` in your own or managed
284
+ settings start them without the folder's OK.
285
+ - **Managed settings** also take `allowManagedPermissionRulesOnly`, `allowManagedHooksOnly` and
286
+ `disableAllHooks`, and the sandbox's `network.allowUnixSockets` and `allowAllUnixSockets`. Keys
287
+ Tempr doesn't apply yet (such as `availableModels`, the other `sandbox` keys or `managed-mcp.json`)
288
+ get one warning at the start of a session.
289
+
290
+ A folder's hooks, allow rules, additional directories, `env` variables, its entries in
291
+ `allowedMcpServers`, `allowedHttpHookUrls` and `httpHookAllowedEnvVars`, and its `.mcp.json` servers
292
+ are things someone else may have written, so they wait until you allow them for that folder, once
293
+ (`tempr hooks allow`, or the prompt in a session), and again after any change. Its deny and ask
294
+ rules apply at once.
295
+
296
+ ### Plugins
186
297
 
187
298
  **Plugins** are Claude Code's: bundles of commands, agents, skills, hooks, MCP servers and language
188
299
  servers, installed from Claude Code's marketplaces.
@@ -196,16 +307,18 @@ tempr plugin install <name> # its commands are /<plugin>:<name>,
196
307
  `enable`, `disable` and `uninstall` do what they say; `/plugin` in the REPL takes the same words, and
197
308
  `--plugin-dir <dir>` loads one from a folder for a session, for trying a plugin you're writing.
198
309
 
199
- **Hooks** use Claude Code's settings format, in `~/.tempr/settings.json` and the folder's
200
- `.tempr/settings.json`, `.claude/settings.json` and `.claude/settings.local.json`: PreToolUse,
201
- PostToolUse, UserPromptSubmit, Stop, SessionStart, SessionEnd, Notification, PreCompact and
202
- PostCompact, as commands or as prompts the model judges. `tempr hooks list` shows them.
310
+ ### Hooks
203
311
 
204
- A folder's hooks, allow rules and `.mcp.json` servers are commands someone else may have written,
205
- so they wait until you allow them for that folder, once (`tempr hooks allow`, or the prompt in a
206
- session), and again after any change. Lasting allow and deny rules for tools and paths
207
- (`Read(./.env)`, `Bash(git push:*)`) go in the same settings files; `/permissions` lists the ones in
208
- force.
312
+ **Hooks** use Claude Code's settings format, in `~/.tempr/settings.json`, `~/.claude/settings.json`
313
+ and the folder's `.tempr/settings.json`, `.claude/settings.json` and `.claude/settings.local.json`.
314
+ Events: PreToolUse, PermissionRequest, PermissionDenied, PostToolUse, PostToolUseFailure,
315
+ UserPromptSubmit, UserPromptExpansion, Stop, StopFailure, SubagentStart, SubagentStop, SessionStart,
316
+ SessionEnd, Notification, PreCompact, PostCompact, InstructionsLoaded, ConfigChange,
317
+ DirectoryAdded, WorktreeCreate, WorktreeRemove, PreModelSwitch and PostModelSwitch. Handlers are
318
+ commands, prompts or agents the model judges, `http` (the event POSTed to a URL, limited by
319
+ `allowedHttpHookUrls` and `httpHookAllowedEnvVars`) and `mcp_tool` (a tool of one of the session's
320
+ MCP servers); `"onFailure": "block"` makes a failing hook block. `tempr hooks list` and `/hooks` show
321
+ them; `/hooks events` lists the events, and Claude Code's that Tempr doesn't raise, with why.
209
322
 
210
323
  **Code intelligence:** a language server from a plugin's `.lsp.json`, or under `"lspServers"` in
211
324
  `~/.tempr/settings.json`, starts the first time the agent edits a file it handles. The edit's result
@@ -214,8 +327,8 @@ carries the errors and warnings it reports, so the agent fixes them without a se
214
327
 
215
328
  ## Local models
216
329
 
217
- Models on your own machine or server -- Ollama, LM Studio, llama.cpp, vLLM or anything else that
218
- speaks OpenAI's chat API -- run here, talking to the server directly: nothing you send them goes
330
+ Models on your own machine or server (Ollama, LM Studio, llama.cpp, vLLM or anything else that
331
+ speaks OpenAI's chat API) run here, talking to the server directly: nothing you send them goes
219
332
  through Tempr's server, and they're free.
220
333
 
221
334
  Ollama (port 11434) and LM Studio (port 1234) are found when they're running; `tempr models` lists
@@ -257,7 +370,7 @@ tempr --json --yolo "fix the failing test" | tail -1 | jq '{status, summary, fil
257
370
  |---|---|
258
371
  | 0 | the turn finished |
259
372
  | 1 | something went wrong (server, network, tool, unhandled error) |
260
- | 2 | the command line didn't make sense |
373
+ | 2 | the command line didn't make sense, or asked for something settings forbid (`--yolo` with autopilot turned off) |
261
374
  | 3 | not signed in, session expired, or no active plan |
262
375
  | 4 | hit the step limit with work still to do |
263
376
  | 5 | a tool call was refused and the turn carried on without it |
@@ -268,11 +381,12 @@ tempr --json --yolo "fix the failing test" | tail -1 | jq '{status, summary, fil
268
381
  Useful flags for an unattended run: `--max-turns`, `--max-cost` (stop once the run's model calls
269
382
  have cost this many dollars), `--allowed-tools`, `--disallowed-tools`, `--approval-mode`,
270
383
  `--prompt-file`, and `--search` to let the model search the web, which a script doesn't do unless
271
- asked. The first `--json` line is a `session` object (session id, model, settings), and each tool the
272
- CLI runs locally adds a `tool-result` line with its output. Sign in with `TEMPR_LICENSE_KEY` rather than on a command line,
273
- where the key would land in shell history and in every process listing on the machine. Setting `CI`
274
- turns off the logo, the update check and crash reports, and makes any call that would have asked a
275
- question refuse instead of waiting.
384
+ asked. The first `--json` line is a `session` object (session id, model, environment, settings), and
385
+ each tool the CLI runs locally adds a `tool-result` line with its output. A one-shot run waits for
386
+ its background sub-agents and hands their results to the agent before it exits. Sign in with
387
+ `TEMPR_LICENSE_KEY` rather than on a command line, where the key would land in shell history and in
388
+ every process listing on the machine. Setting `CI` turns off the logo, the update check and crash
389
+ reports, and makes any call that would have asked a question refuse instead of waiting.
276
390
 
277
391
  There's a GitHub Action at the repository root; `docs/examples/tempr-agent-workflows.md` has a
278
392
  PR-review workflow and a fix-the-build workflow built on it.
@@ -295,9 +409,10 @@ In JetBrains IDEs, the same entry goes under `agent_servers` in `~/.jetbrains/ac
295
409
  full path to `tempr` as the command; AI Chat's ⋮ menu > Add Custom Agent opens that file.
296
410
 
297
411
  The editor shows Tempr's replies, its tool calls (edits as diffs) and its questions, and you answer
298
- them there. Tempr runs its tools itself, so the allow-list, the approval mode and, on Linux, the
299
- [sandbox](#sandbox-linux) work as they do here; autopilot in an editor counts like `--yolo`. Sign in
300
- with `tempr auth` first, or from the editor, which offers the browser sign-in.
412
+ them there. Tempr runs its tools itself, so the allow-list, the approval mode, your settings and, on
413
+ Linux and macOS, the [sandbox](#sandbox-linux-and-macos) work as they do here; autopilot in an
414
+ editor counts like `--yolo`. Sign in with `tempr auth` first, or from the editor, which offers the
415
+ browser sign-in.
301
416
 
302
417
  - **Sessions** are saved like any other, so `tempr history` lists them and `tempr -c` in the same
303
418
  folder carries one on. The editor's own session list shows them too, and opening one there
@@ -306,10 +421,11 @@ with `tempr auth` first, or from the editor, which offers the browser sign-in.
306
421
  A new session starts on the model last picked in an editor, or on your default until you pick one
307
422
  (`tempr config set-model` makes the default the starting model again). A reasoning level is kept
308
423
  per model, as `/reasoning` keeps it.
309
- - **Slash commands:** your command templates, plus `/undo`, `/diff`, `/agents` and `/compact`.
424
+ - **Slash commands:** your command templates, plus `/undo`, `/diff`, `/agents`, `/compact` and
425
+ `/code-review`, and each running MCP server's prompts as `/mcp__server__prompt`.
310
426
  - **Thinking:** a model's reasoning shows as the agent's thoughts, in editors that show them.
311
- - **MCP servers** the editor passes run beside yours from `~/.tempr/mcp.json`; one with the same name
312
- as one of yours takes its place for the session.
427
+ - **MCP servers** the editor passes (local, HTTP or SSE) run beside yours from `~/.tempr/mcp.json`;
428
+ one with the same name as one of yours takes its place for the session.
313
429
  - **Command output** streams into a terminal under the call, in editors that draw one (Zed); in
314
430
  others it shows when the command ends.
315
431
  - **Sub-agents** answer under the call that delegated to them, apart from the reply.
@@ -317,6 +433,38 @@ with `tempr auth` first, or from the editor, which offers the browser sign-in.
317
433
  It passes the ACP conformance kit ([acp-tck](https://github.com/agentclientprotocol/acp-tck)). The
318
434
  setup for each editor is at <https://temprhq.io/docs/cli-editors>.
319
435
 
436
+ ## Monitoring (OpenTelemetry)
437
+
438
+ Tempr exports metrics and events to your own OpenTelemetry collector, set up as Claude Code's
439
+ [monitoring](https://code.claude.com/docs/en/monitoring-usage) is, with the same variables, in the
440
+ environment or in `env` of `~/.tempr/settings.json` (a folder's settings can't turn it on). It's off
441
+ unless you set it up, and nothing of it goes to Tempr.
442
+
443
+ ```sh
444
+ export CLAUDE_CODE_ENABLE_TELEMETRY=1 # or TEMPR_ENABLE_TELEMETRY=1
445
+ export OTEL_METRICS_EXPORTER=otlp # otlp, console (stderr) or none
446
+ export OTEL_LOGS_EXPORTER=otlp
447
+ export OTEL_EXPORTER_OTLP_PROTOCOL=grpc # or http/protobuf (the default)
448
+ export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
449
+ export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer your-token"
450
+ ```
451
+
452
+ - **Metrics** (meter `io.temprhq.tempr`): `tempr.session.count`, `tempr.token.usage`,
453
+ `tempr.cost.usage`, `tempr.lines_of_code.count`, `tempr.commit.count`, `tempr.pull_request.count`,
454
+ `tempr.code_edit_tool.decision` and `tempr.active_time.total`, with Claude Code's attributes
455
+ (`claude_code.` becomes `tempr.`).
456
+ - **Events:** `tempr.user_prompt`, `tempr.tool_result`, `tempr.tool_decision`, `tempr.api_request`
457
+ and `tempr.api_error`. A prompt's text is `<REDACTED>` unless `OTEL_LOG_USER_PROMPTS=1`; tool
458
+ parameters and MCP tool names go only with `OTEL_LOG_TOOL_DETAILS=1`.
459
+ - Also read: the per-signal `OTEL_EXPORTER_OTLP_METRICS_*` and `_LOGS_*` endpoint, protocol and
460
+ headers, `OTEL_METRIC_EXPORT_INTERVAL` (60000 ms), `OTEL_LOGS_EXPORT_INTERVAL` (5000 ms),
461
+ `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` (delta), `OTEL_RESOURCE_ATTRIBUTES` and
462
+ `OTEL_METRICS_INCLUDE_SESSION_ID` / `_VERSION` / `_ACCOUNT_UUID`.
463
+ - Unlike Claude Code: no Prometheus exporter (have the collector serve one), `http/json` is sent as
464
+ `http/protobuf`, and there are no traces.
465
+
466
+ The same export works in `tempr acp` and in Tempr Code (`~/.tempr-code/settings.json`).
467
+
320
468
  ## What leaves your machine
321
469
 
322
470
  Everything below goes to your Tempr server (`api.temprhq.io` unless the `TEMPRAPP_SERVER_URL`
@@ -327,8 +475,9 @@ and Tempr's server doesn't see it.
327
475
  **Sent on every turn you send**
328
476
 
329
477
  - Your message, and the conversation so far in this session.
330
- - `AGENTS.md`, `.github/copilot-instructions.md`, `CLAUDE.md`, `GEMINI.md` and Cursor rules from the
331
- current directory, and `~/.tempr/AGENTS.md`, up to 16 KB combined.
478
+ - `AGENTS.md`, `.github/copilot-instructions.md`, Claude Code's memory files (`CLAUDE.md` at every
479
+ level, `.claude/rules` and their imports), `GEMINI.md` and Cursor rules, and `~/.tempr/AGENTS.md`,
480
+ up to 64 KB combined.
332
481
  - Files you attach with `@path`, including images, and anything `@workspace` or `@problems` pulls
333
482
  in (a workspace overview, or your current build errors).
334
483
  - The contents of files the agent reads or searches, as tool results.
@@ -352,7 +501,8 @@ and Tempr's server doesn't see it.
352
501
 
353
502
  - Your license key after sign-in (it is exchanged once for a session token).
354
503
  - Any file the agent didn't read, and any command output you didn't approve.
355
- - Telemetry: there is none beyond the requests above.
504
+ - Telemetry: none goes to Tempr beyond the requests above. The [OpenTelemetry export](#monitoring-opentelemetry),
505
+ when you turn it on, goes only to the collector you name.
356
506
 
357
507
  See `tempr --help` for the full command reference, and `docs/plans/plan-tempr-cli-v1-roadmap.md` in
358
508
  the Tempr repo for design notes.
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@tempr/cli",
3
- "version": "0.9.21",
3
+ "version": "0.9.23",
4
4
  "description": "Sign in, chat, and run agentic coding tasks against your Tempr license from the terminal.",
5
5
  "homepage": "https://temprhq.io",
6
6
  "license": "SEE LICENSE IN README.md",
7
7
  "bin": { "tempr": "bin/tempr.js" },
8
8
  "files": ["bin/"],
9
9
  "optionalDependencies": {
10
- "@tempr/cli-win32-x64": "0.9.21",
11
- "@tempr/cli-win32-arm64": "0.9.21",
12
- "@tempr/cli-linux-x64": "0.9.21",
13
- "@tempr/cli-linux-arm64": "0.9.21",
14
- "@tempr/cli-darwin-x64": "0.9.21",
15
- "@tempr/cli-darwin-arm64": "0.9.21"
10
+ "@tempr/cli-win32-x64": "0.9.23",
11
+ "@tempr/cli-win32-arm64": "0.9.23",
12
+ "@tempr/cli-linux-x64": "0.9.23",
13
+ "@tempr/cli-linux-arm64": "0.9.23",
14
+ "@tempr/cli-darwin-x64": "0.9.23",
15
+ "@tempr/cli-darwin-arm64": "0.9.23"
16
16
  }
17
17
  }