@markusylisiurunen/tau 0.1.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.
Files changed (106) hide show
  1. package/README.md +228 -0
  2. package/dist/app.js +1140 -0
  3. package/dist/app.js.map +1 -0
  4. package/dist/bash_commands.js +81 -0
  5. package/dist/bash_commands.js.map +1 -0
  6. package/dist/cli.js +147 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/clipboard.js +16 -0
  9. package/dist/clipboard.js.map +1 -0
  10. package/dist/commands.js +76 -0
  11. package/dist/commands.js.map +1 -0
  12. package/dist/config.js +39 -0
  13. package/dist/config.js.map +1 -0
  14. package/dist/content_loader.js +241 -0
  15. package/dist/content_loader.js.map +1 -0
  16. package/dist/debug-ui.js +134 -0
  17. package/dist/debug-ui.js.map +1 -0
  18. package/dist/main.js +85 -0
  19. package/dist/main.js.map +1 -0
  20. package/dist/personas.js +227 -0
  21. package/dist/personas.js.map +1 -0
  22. package/dist/prompts.js +261 -0
  23. package/dist/prompts.js.map +1 -0
  24. package/dist/session/message_accumulator.js +56 -0
  25. package/dist/session/message_accumulator.js.map +1 -0
  26. package/dist/session/session_engine.js +290 -0
  27. package/dist/session/session_engine.js.map +1 -0
  28. package/dist/subagents/explore.js +42 -0
  29. package/dist/subagents/explore.js.map +1 -0
  30. package/dist/subagents/registry.js +30 -0
  31. package/dist/subagents/registry.js.map +1 -0
  32. package/dist/subagents/subagent_engine.js +147 -0
  33. package/dist/subagents/subagent_engine.js.map +1 -0
  34. package/dist/subagents/types.js +2 -0
  35. package/dist/subagents/types.js.map +1 -0
  36. package/dist/terminal.js +115 -0
  37. package/dist/terminal.js.map +1 -0
  38. package/dist/tools/bash.js +334 -0
  39. package/dist/tools/bash.js.map +1 -0
  40. package/dist/tools/edit.js +199 -0
  41. package/dist/tools/edit.js.map +1 -0
  42. package/dist/tools/registry.js +15 -0
  43. package/dist/tools/registry.js.map +1 -0
  44. package/dist/tools/task.js +202 -0
  45. package/dist/tools/task.js.map +1 -0
  46. package/dist/tools/write.js +89 -0
  47. package/dist/tools/write.js.map +1 -0
  48. package/dist/types.js +9 -0
  49. package/dist/types.js.map +1 -0
  50. package/dist/ui/assistant_message.js +87 -0
  51. package/dist/ui/assistant_message.js.map +1 -0
  52. package/dist/ui/bash_execution.js +127 -0
  53. package/dist/ui/bash_execution.js.map +1 -0
  54. package/dist/ui/chat_container.js +90 -0
  55. package/dist/ui/chat_container.js.map +1 -0
  56. package/dist/ui/components/dynamic_border.js +11 -0
  57. package/dist/ui/components/dynamic_border.js.map +1 -0
  58. package/dist/ui/components/one_line_segments.js +79 -0
  59. package/dist/ui/components/one_line_segments.js.map +1 -0
  60. package/dist/ui/components/padded_container.js +24 -0
  61. package/dist/ui/components/padded_container.js.map +1 -0
  62. package/dist/ui/custom_editor.js +53 -0
  63. package/dist/ui/custom_editor.js.map +1 -0
  64. package/dist/ui/file_execution.js +189 -0
  65. package/dist/ui/file_execution.js.map +1 -0
  66. package/dist/ui/footer.js +56 -0
  67. package/dist/ui/footer.js.map +1 -0
  68. package/dist/ui/queued_messages.js +31 -0
  69. package/dist/ui/queued_messages.js.map +1 -0
  70. package/dist/ui/session_divider.js +17 -0
  71. package/dist/ui/session_divider.js.map +1 -0
  72. package/dist/ui/session_summary.js +30 -0
  73. package/dist/ui/session_summary.js.map +1 -0
  74. package/dist/ui/slash_autocomplete.js +177 -0
  75. package/dist/ui/slash_autocomplete.js.map +1 -0
  76. package/dist/ui/system_message.js +8 -0
  77. package/dist/ui/system_message.js.map +1 -0
  78. package/dist/ui/task_execution.js +190 -0
  79. package/dist/ui/task_execution.js.map +1 -0
  80. package/dist/ui/theme.js +108 -0
  81. package/dist/ui/theme.js.map +1 -0
  82. package/dist/ui/tool_output.js +24 -0
  83. package/dist/ui/tool_output.js.map +1 -0
  84. package/dist/ui/user_message.js +14 -0
  85. package/dist/ui/user_message.js.map +1 -0
  86. package/dist/utils/color.js +13 -0
  87. package/dist/utils/color.js.map +1 -0
  88. package/dist/utils/context.js +108 -0
  89. package/dist/utils/context.js.map +1 -0
  90. package/dist/utils/fork.js +41 -0
  91. package/dist/utils/fork.js.map +1 -0
  92. package/dist/utils/format.js +35 -0
  93. package/dist/utils/format.js.map +1 -0
  94. package/dist/utils/fuzzy.js +48 -0
  95. package/dist/utils/fuzzy.js.map +1 -0
  96. package/dist/utils/git.js +21 -0
  97. package/dist/utils/git.js.map +1 -0
  98. package/dist/utils/messages.js +41 -0
  99. package/dist/utils/messages.js.map +1 -0
  100. package/dist/utils/never.js +4 -0
  101. package/dist/utils/never.js.map +1 -0
  102. package/dist/utils/project_files.js +96 -0
  103. package/dist/utils/project_files.js.map +1 -0
  104. package/dist/utils/truncate.js +299 -0
  105. package/dist/utils/truncate.js.map +1 -0
  106. package/package.json +37 -0
package/README.md ADDED
@@ -0,0 +1,228 @@
1
+ # tau
2
+
3
+ a terminal-based AI chat client for working with code. tau gives you access to Claude, GPT, and Gemini models, each equipped with tools to explore, write, and edit files in your project.
4
+
5
+ ## getting started
6
+
7
+ tau requires Node.js 20+ and runs on macOS.
8
+
9
+ ```sh
10
+ npm install
11
+ npm run build
12
+ npm start
13
+ ```
14
+
15
+ or run directly from source during development:
16
+
17
+ ```sh
18
+ npm run dev
19
+ ```
20
+
21
+ you'll need an API key from at least one provider. set it via environment variable:
22
+
23
+ ```sh
24
+ export ANTHROPIC_API_KEY=sk-ant-...
25
+ # or OPENAI_API_KEY, or GOOGLE_API_KEY
26
+ ```
27
+
28
+ or store keys in `~/.config/tau/config.json`:
29
+
30
+ ```json
31
+ {
32
+ "apiKeys": {
33
+ "anthropic": "sk-ant-...",
34
+ "openai": "sk-...",
35
+ "google": "..."
36
+ }
37
+ }
38
+ ```
39
+
40
+ environment variables take precedence over the config file.
41
+
42
+ ## risk levels
43
+
44
+ tau uses risk levels to control what the model can do. this lets you stay in control while working alongside AI.
45
+
46
+ - **none**: model can only chat, no tools available
47
+ - **read-only** (default): model can explore your codebase but can't modify anything
48
+ - **read-write**: model can create, edit, and delete files
49
+
50
+ start with a specific risk level:
51
+
52
+ ```sh
53
+ tau --risk read-write
54
+ ```
55
+
56
+ or change it during a session with `/risk:read-only` or `/risk:read-write`.
57
+
58
+ the default is read-only because it lets the model investigate your code and answer questions without risk of unintended changes. bump it to read-write when you're ready to let the model make edits.
59
+
60
+ ## personas
61
+
62
+ tau comes with several built-in personas across different models:
63
+
64
+ - **Claude Opus 4.5** and **Haiku 4.5** (Anthropic)
65
+ - **GPT-5.2** (OpenAI)
66
+ - **Gemini 3 Pro** and **Gemini 2.5 Flash** (Google)
67
+
68
+ each model has three variants: a general-purpose assistant, a coder variant optimized for software engineering, and a raw variant with minimal prompting.
69
+
70
+ switch personas at startup with `--persona` or mid-session with `/persona:<id>`:
71
+
72
+ ```sh
73
+ tau --persona opus-4.5-coder
74
+ ```
75
+
76
+ ## reasoning
77
+
78
+ some models support extended thinking, where they reason through problems before responding. cycle through reasoning levels with `Shift+Tab`, or set one at startup:
79
+
80
+ ```sh
81
+ tau --persona opus-4.5:high
82
+ ```
83
+
84
+ toggle visibility of the model's thinking with `Ctrl+T`.
85
+
86
+ ## working with files
87
+
88
+ reference files in your message by typing `@` followed by the filename. autocomplete helps you find the right path. press `Ctrl+F` to expand file contents into the conversation, letting the model see the actual code.
89
+
90
+ you can also pipe content directly:
91
+
92
+ ```sh
93
+ cat src/app.ts | tau --persona opus-4.5
94
+ ```
95
+
96
+ for project-aware sessions, use `--with-context` to inject your AGENTS.md (or similar project guidelines file) into the system prompt. run `tau --help` to see all available options.
97
+
98
+ ## memory mode
99
+
100
+ prefix a message with `#` to update your project's AGENTS.md file. this is useful for capturing decisions, conventions, and context as you work.
101
+
102
+ ```
103
+ # prefer explicit error messages with context about what operation failed
104
+ ```
105
+
106
+ tau will create or update AGENTS.md at your project root, integrating the new information into the existing structure. over time, this builds a knowledge base about your project. combine it with `--with-context` so future sessions understand your conventions without re-explaining them.
107
+
108
+ ## commands
109
+
110
+ tau supports slash commands for common actions:
111
+
112
+ | command | description |
113
+ | ---------------------- | -------------------------------------------- |
114
+ | `/help` | show available commands |
115
+ | `/new` | clear the session and start fresh |
116
+ | `/copy` | copy the last assistant message |
117
+ | `/copy:code` | copy just the code blocks |
118
+ | `/reload` | reload personas and prompts from disk |
119
+ | `/fork:only-summary` | compress history and continue with a summary |
120
+ | `/fork:with-last-turn` | compress history but keep the last exchange |
121
+ | `/persona:<id>` | switch to a different persona |
122
+ | `/prompt:<id>` | insert a saved prompt template |
123
+ | `/bash:<id>` | run a saved shell command |
124
+ | `/risk:<level>` | change the risk level |
125
+ | `!<cmd>` | run a shell command directly |
126
+
127
+ the fork commands are useful when conversations get long. they compress everything into a summary so the model retains context without the overhead of a full history.
128
+
129
+ ## keyboard shortcuts
130
+
131
+ | key | action |
132
+ | ----------- | --------------------------- |
133
+ | `Shift+Tab` | cycle reasoning effort |
134
+ | `Ctrl+T` | toggle thinking visibility |
135
+ | `Ctrl+O` | toggle compact tool display |
136
+ | `Ctrl+F` | expand @file mentions |
137
+ | `Escape` | interrupt generation |
138
+ | `Ctrl+C` | exit |
139
+
140
+ ## configuration
141
+
142
+ ### global config
143
+
144
+ store settings in `~/.config/tau/config.json`:
145
+
146
+ ```json
147
+ {
148
+ "apiKeys": {
149
+ "anthropic": "sk-ant-...",
150
+ "openai": "sk-...",
151
+ "google": "..."
152
+ },
153
+ "toolDisplayMode": "compact",
154
+ "userPreferences": "prefer concise responses. use TypeScript for examples."
155
+ }
156
+ ```
157
+
158
+ the `userPreferences` field lets you set guidance that applies to every conversation: preferred languages, response style, or domain context.
159
+
160
+ `toolDisplayMode` controls how tool calls appear: `"compact"` (default) shows one-line summaries, `"full"` shows detailed blocks.
161
+
162
+ ### project bash commands
163
+
164
+ define shortcuts for common shell commands in `.tau/config.json` at your project root (or `~/.tau/config.json` globally):
165
+
166
+ ```json
167
+ {
168
+ "bash": [
169
+ { "id": "check", "description": "lint + typecheck", "cmd": "npm run check" },
170
+ { "id": "test", "cmd": "npm test" }
171
+ ]
172
+ }
173
+ ```
174
+
175
+ run them with `/bash:check` or `/bash:test`.
176
+
177
+ ### custom personas
178
+
179
+ create your own personas by adding markdown files to `~/.config/tau/personas/`:
180
+
181
+ ```markdown
182
+ ---
183
+ id: my-assistant
184
+ provider: anthropic
185
+ model: claude-opus-4-5
186
+ ---
187
+
188
+ you are a helpful assistant specialized in my workflow.
189
+ focus on clarity and efficiency.
190
+ ```
191
+
192
+ the frontmatter defines the persona's id, provider, and model. the markdown body becomes the system prompt. use it with `--persona my-assistant` or `/persona:my-assistant`.
193
+
194
+ ### custom prompts
195
+
196
+ save reusable prompt templates in `~/.config/tau/prompts/`:
197
+
198
+ ```markdown
199
+ ---
200
+ id: review
201
+ ---
202
+
203
+ review this code for bugs, edge cases, and style issues.
204
+ suggest specific improvements with code examples.
205
+ ```
206
+
207
+ insert them with `/prompt:review`.
208
+
209
+ use `/reload` to pick up changes to personas and prompts without restarting.
210
+
211
+ ## how it works
212
+
213
+ tau connects your terminal to large language models, giving them tools to interact with your filesystem. when you ask the model to explore code or make changes, it decides which tools to use and executes them with your permission (based on risk level).
214
+
215
+ the model sees your messages, any file contents you've shared, and the results of tool calls. it doesn't have ambient access to your filesystem; it only sees what you show it or what it explicitly requests through tools.
216
+
217
+ tool calls are displayed in the UI so you can see exactly what the model is doing. use `Ctrl+O` to toggle between compact and detailed views.
218
+
219
+ ## creating a release
220
+
221
+ releases are published to npm automatically when a github release is published.
222
+
223
+ - make sure `package.json` has the correct version (e.g. `0.2.0`).
224
+ - run `npm run check` and `npm run build`.
225
+ - commit and push the version bump.
226
+ - create a github release with a tag matching the version (e.g. `v0.2.0`).
227
+
228
+ the workflow expects an npm token in `NPM_TOKEN` (repo settings → secrets and variables → actions).