@aeye/cletus 0.2.0 → 0.3.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 +221 -368
- package/dist/embed-worker.js +100 -0
- package/dist/index.js +27756 -9006
- package/package.json +114 -104
package/README.md
CHANGED
|
@@ -2,35 +2,84 @@
|
|
|
2
2
|
|
|
3
3
|
> **Interactive CLI demo showcasing @aeye capabilities - an AI-powered assistant with file management, data operations, and autonomous task execution.**
|
|
4
4
|
|
|
5
|
-
Cletus is a terminal-based AI assistant built with the @aeye library that demonstrates the power of multi-provider AI integration, tool calling, and context management. It features a beautiful TUI (Terminal User Interface) powered by React/Ink and provides specialized AI agents for different domains like file operations, data management, image generation, and web searching.
|
|
6
|
-
|
|
7
5
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
8
|
-
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @aeye/cletus
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
For the best experience, configure what models are used for each use case. Use openai/gpt-4o for chat, google/nano-banana for image generation and editing, anthropic/claude-sonnet-4 for file editing, etc! If you don't specify then a model will be dynamically chosen based on configured weights and what can handle the request.
|
|
9
12
|
|
|
10
13
|
## Features
|
|
11
14
|
|
|
12
|
-
###
|
|
15
|
+
### Adaptive Tooling
|
|
16
|
+
|
|
17
|
+
Cletus uses an intelligent tool selection system that automatically picks the most relevant tools based on your conversation context. Instead of having access to all 50+ tools at once (which can overwhelm the AI), Cletus:
|
|
18
|
+
|
|
19
|
+
1. **Analyzes your recent messages** - Uses embeddings to understand what you're asking about
|
|
20
|
+
2. **Selects relevant tools** - Picks the top 15-20 most semantically similar tools for the task
|
|
21
|
+
3. **Adapts over time** - As your conversation evolves, the available tools adjust automatically
|
|
22
|
+
|
|
23
|
+
You can also manually switch between specialized **toolsets** to focus on specific domains:
|
|
24
|
+
|
|
25
|
+
- **planner** - Task management and todo operations
|
|
26
|
+
- **librarian** - Knowledge base and semantic search
|
|
27
|
+
- **clerk** - File system operations and shell commands
|
|
28
|
+
- **secretary** - User memories and assistant management
|
|
29
|
+
- **architect** - Custom data type definitions and schema management
|
|
30
|
+
- **artist** - Image generation, editing, and analysis
|
|
31
|
+
- **internet** - Web search and API operations
|
|
32
|
+
- **dba** - Data record management and querying
|
|
33
|
+
|
|
34
|
+
Use the `retool` tool to switch between adaptive mode and specific toolsets
|
|
35
|
+
|
|
36
|
+
### Examples
|
|
37
|
+
|
|
38
|
+
Here are some examples of what you can do with Cletus:
|
|
39
|
+
|
|
40
|
+
**File Operations:**
|
|
41
|
+
- "Search for all TypeScript files in the src directory"
|
|
42
|
+
- "Read package.json and tell me what dependencies are outdated"
|
|
43
|
+
- "Create a new file called README.md with a project description"
|
|
44
|
+
- "Find all files containing the word 'TODO' and summarize them"
|
|
45
|
+
|
|
46
|
+
**Data Management:**
|
|
47
|
+
- "Create a 'Recipe' type with fields for ingredients, instructions, and cooking time"
|
|
48
|
+
- "Add a new recipe for chocolate chip cookies"
|
|
49
|
+
- "Find all recipes that contain chocolate"
|
|
50
|
+
|
|
51
|
+
**Task Planning:**
|
|
52
|
+
- "Add a todo to implement user authentication"
|
|
53
|
+
- "Show me all my pending todos"
|
|
54
|
+
- "Mark the first todo as done"
|
|
13
55
|
|
|
14
|
-
|
|
56
|
+
**Image Operations:**
|
|
57
|
+
- "Generate an image of a sunset over mountains"
|
|
58
|
+
- "Find all images I've generated that contain trees"
|
|
59
|
+
- "Analyze this screenshot and describe what you see"
|
|
15
60
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
61
|
+
**Web Research:**
|
|
62
|
+
- "Search the web for the latest TypeScript features"
|
|
63
|
+
- "Get the content from https://example.com and summarize it"
|
|
64
|
+
|
|
65
|
+
**Knowledge Base:**
|
|
66
|
+
- "Remember that I prefer tabs over spaces"
|
|
67
|
+
- "Index all files in my project for semantic search"
|
|
68
|
+
- "Search my knowledge base for information about authentication"
|
|
69
|
+
|
|
70
|
+
**Shell Commands:**
|
|
71
|
+
- "Run npm test and show me the results"
|
|
72
|
+
- "Execute git status and tell me what files have changed"
|
|
24
73
|
|
|
25
74
|
### 🎨 Interactive Terminal UI
|
|
26
75
|
|
|
27
76
|
- Beautiful React/Ink-based interface
|
|
28
|
-
- Automatic light/dark mode theme detection for optimal color visibility
|
|
29
77
|
- Chat history management
|
|
30
78
|
- Real-time streaming responses
|
|
31
|
-
-
|
|
79
|
+
- Markdown rendering
|
|
32
80
|
- Operation approval/rejection system
|
|
33
81
|
- Settings configuration wizard
|
|
82
|
+
- Automatic light/dark mode theme detection for optimal color visibility
|
|
34
83
|
|
|
35
84
|
### 💾 Persistent Storage
|
|
36
85
|
|
|
@@ -50,15 +99,50 @@ Cletus organizes its capabilities into specialized agents, each with domain-spec
|
|
|
50
99
|
- **Image Operations** - Generate, edit, analyze, and find images
|
|
51
100
|
- **Web Integration** - Search the web, scrape pages, make API calls
|
|
52
101
|
|
|
53
|
-
|
|
102
|
+
### 📝 Prompt File Support
|
|
54
103
|
|
|
55
|
-
|
|
104
|
+
Cletus supports three complementary ways to customize the AI's context and behavior:
|
|
56
105
|
|
|
57
|
-
|
|
58
|
-
|
|
106
|
+
- **User Prompts** - Configure via `config.user.globalPrompt` for persistent instructions across all chats
|
|
107
|
+
- **Chat Prompts** - Set per-chat custom prompts when creating or updating a chat
|
|
108
|
+
- **Prompt Files** - Automatically load contextual instructions from files in your current working directory
|
|
109
|
+
|
|
110
|
+
These prompt types work together: user prompts set global preferences, chat prompts provide conversation-specific context, and prompt files add project-specific instructions from your working directory.
|
|
111
|
+
|
|
112
|
+
#### Prompt File Loading
|
|
113
|
+
|
|
114
|
+
When starting a chat, Cletus searches for prompt files in your current working directory (case-insensitive):
|
|
115
|
+
|
|
116
|
+
1. **Default Files Checked** (in order):
|
|
117
|
+
- `cletus.md`
|
|
118
|
+
- `agents.md`
|
|
119
|
+
- `claude.md`
|
|
120
|
+
|
|
121
|
+
2. **Custom Files** - Configure via `config.user.promptFiles` to replace the default list with your own files
|
|
122
|
+
|
|
123
|
+
3. **Loading Behavior**:
|
|
124
|
+
- Files are searched in the order specified
|
|
125
|
+
- Only the **first file found** is loaded (not all matching files)
|
|
126
|
+
- Content is wrapped in `<prompt-file name="filename">` tags
|
|
127
|
+
- The content is incorporated into the system prompt for every AI request
|
|
128
|
+
|
|
129
|
+
**Example Usage:**
|
|
130
|
+
|
|
131
|
+
Create a `cletus.md` file in your project directory:
|
|
132
|
+
|
|
133
|
+
```markdown
|
|
134
|
+
# Project Context
|
|
135
|
+
|
|
136
|
+
This is a TypeScript project using React and Node.js.
|
|
137
|
+
Follow these coding standards:
|
|
138
|
+
- Use functional components
|
|
139
|
+
- Prefer async/await over promises
|
|
140
|
+
- Use descriptive variable names
|
|
59
141
|
```
|
|
60
142
|
|
|
61
|
-
|
|
143
|
+
When you run `cletus` from that directory, these instructions will automatically be included in the AI's context.
|
|
144
|
+
|
|
145
|
+
## Building from Source
|
|
62
146
|
|
|
63
147
|
```bash
|
|
64
148
|
# Clone the repository
|
|
@@ -76,16 +160,6 @@ npm link
|
|
|
76
160
|
cletus
|
|
77
161
|
```
|
|
78
162
|
|
|
79
|
-
### Development Mode
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
# Watch mode with hot reload
|
|
83
|
-
npm run dev
|
|
84
|
-
|
|
85
|
-
# Or run directly with tsx
|
|
86
|
-
npm start
|
|
87
|
-
```
|
|
88
|
-
|
|
89
163
|
## Quick Start
|
|
90
164
|
|
|
91
165
|
### First Launch
|
|
@@ -104,9 +178,6 @@ The configuration is saved to `~/.cletus/config.json` and can be modified later
|
|
|
104
178
|
# Start Cletus
|
|
105
179
|
cletus
|
|
106
180
|
|
|
107
|
-
# Start Cletus with split view settings menu
|
|
108
|
-
cletus --split-settings
|
|
109
|
-
|
|
110
181
|
# The main menu provides options to:
|
|
111
182
|
# - Start a new chat
|
|
112
183
|
# - Continue existing chats
|
|
@@ -116,7 +187,6 @@ cletus --split-settings
|
|
|
116
187
|
|
|
117
188
|
### Command Line Arguments
|
|
118
189
|
|
|
119
|
-
- `--split-settings` - Use split view settings interface instead of nested menu (keeps all settings on one screen)
|
|
120
190
|
- `--profile=NAME` or `--profile NAME` - Use a specific configuration profile
|
|
121
191
|
|
|
122
192
|
### Creating a Chat
|
|
@@ -126,6 +196,93 @@ cletus --split-settings
|
|
|
126
196
|
3. Optionally provide a custom system prompt
|
|
127
197
|
4. Start chatting!
|
|
128
198
|
|
|
199
|
+
## Tools
|
|
200
|
+
|
|
201
|
+
Cletus provides 50+ tools organized into specialized toolsets. Here's what each toolset offers:
|
|
202
|
+
|
|
203
|
+
### 🗂️ Planner (`planner`)
|
|
204
|
+
Task management and todo operations:
|
|
205
|
+
- `todosList` - View all todos
|
|
206
|
+
- `todosAdd` - Add a new todo
|
|
207
|
+
- `todosDone` - Mark a todo as complete
|
|
208
|
+
- `todosGet` - Get a specific todo by ID
|
|
209
|
+
- `todosRemove` - Remove a todo
|
|
210
|
+
- `todosReplace` - Replace/update a todo
|
|
211
|
+
- `todosClear` - Clear all todos
|
|
212
|
+
|
|
213
|
+
### 📚 Librarian (`librarian`)
|
|
214
|
+
Knowledge base with semantic search:
|
|
215
|
+
- `knowledgeSearch` - Search knowledge base semantically
|
|
216
|
+
- `knowledgeSources` - List all knowledge sources
|
|
217
|
+
- `knowledgeAdd` - Add user memories to knowledge base
|
|
218
|
+
- `knowledgeDelete` - Delete knowledge source
|
|
219
|
+
|
|
220
|
+
### 📁 Clerk (`clerk`)
|
|
221
|
+
File system operations and shell commands:
|
|
222
|
+
- `fileSearch` - Search files by glob pattern
|
|
223
|
+
- `fileSummary` - Get AI summary of file content
|
|
224
|
+
- `fileIndex` - Index files into knowledge base
|
|
225
|
+
- `fileRead` - Read file contents
|
|
226
|
+
- `fileEdit` - Edit file with find/replace
|
|
227
|
+
- `fileCreate` - Create new file
|
|
228
|
+
- `fileCopy` - Copy file
|
|
229
|
+
- `fileMove` - Move/rename file
|
|
230
|
+
- `fileDelete` - Delete file
|
|
231
|
+
- `fileStats` - Get file metadata
|
|
232
|
+
- `fileAttach` - Attach file to message
|
|
233
|
+
- `textSearch` - Search file contents with regex
|
|
234
|
+
- `dirCreate` - Create directory
|
|
235
|
+
- `dirSummary` - Summarize directory contents
|
|
236
|
+
- `shell` - Execute shell commands
|
|
237
|
+
|
|
238
|
+
### 👤 Secretary (`secretary`)
|
|
239
|
+
User preferences and assistant management:
|
|
240
|
+
- `assistantSwitch` - Switch to different assistant
|
|
241
|
+
- `assistantUpdate` - Update assistant prompt
|
|
242
|
+
- `assistantAdd` - Create new assistant
|
|
243
|
+
- `memoryList` - List user memories
|
|
244
|
+
- `memoryUpdate` - Update user memories
|
|
245
|
+
|
|
246
|
+
### 🏗️ Architect (`architect`)
|
|
247
|
+
Custom data type system:
|
|
248
|
+
- `typeList` - List all custom types
|
|
249
|
+
- `typeInfo` - Get type definition
|
|
250
|
+
- `typeCreate` - Define new data type
|
|
251
|
+
- `typeUpdate` - Update type definition
|
|
252
|
+
- `typeDelete` - Delete type
|
|
253
|
+
- `typeImport` - Import type from JSON schema
|
|
254
|
+
|
|
255
|
+
### 🎨 Artist (`artist`)
|
|
256
|
+
Image generation and analysis:
|
|
257
|
+
- `imageGenerate` - Generate images from text
|
|
258
|
+
- `imageEdit` - Edit existing images
|
|
259
|
+
- `imageAnalyze` - Analyze image with vision AI
|
|
260
|
+
- `imageDescribe` - Get detailed image description
|
|
261
|
+
- `imageFind` - Search generated images
|
|
262
|
+
- `imageAttach` - Attach image to message
|
|
263
|
+
|
|
264
|
+
### 🌐 Internet (`internet`)
|
|
265
|
+
Web operations:
|
|
266
|
+
- `webSearch` - Search the web (via Tavily)
|
|
267
|
+
- `webGetPage` - Fetch and extract page content
|
|
268
|
+
- `webApiCall` - Make HTTP API requests
|
|
269
|
+
|
|
270
|
+
### 💾 DBA (`dba`)
|
|
271
|
+
Data record management:
|
|
272
|
+
- `dataIndex` - Index data records into knowledge base
|
|
273
|
+
- `dataImport` - Import data from files
|
|
274
|
+
- `dataSearch` - Semantic search over data records
|
|
275
|
+
- `dataGet` - Get specific data record
|
|
276
|
+
- `dbaQuery` - Query data with filters and sorting
|
|
277
|
+
|
|
278
|
+
### 🔧 Utility (always available)
|
|
279
|
+
Core system tools:
|
|
280
|
+
- `getOperationOutput` - Retrieve truncated operation output
|
|
281
|
+
- `about` - Information about Cletus
|
|
282
|
+
- `retool` - Switch toolsets or enable adaptive mode
|
|
283
|
+
- `hypothetical` - Switch to restrictive mode for exploration
|
|
284
|
+
- `ask` - Ask user multiple-choice questions with special UI
|
|
285
|
+
|
|
129
286
|
## Configuration
|
|
130
287
|
|
|
131
288
|
Cletus stores its data in `~/.cletus/`:
|
|
@@ -146,277 +303,21 @@ Cletus stores its data in `~/.cletus/`:
|
|
|
146
303
|
### Provider Configuration
|
|
147
304
|
|
|
148
305
|
Cletus supports multiple AI providers:
|
|
306
|
+
- OpenAI (For all model types)
|
|
307
|
+
- OpenRouter (For chat models)
|
|
308
|
+
- Replicate (For image generation & editing primarily)
|
|
309
|
+
- AWS (For chat models)
|
|
310
|
+
- Tavily (For web search)
|
|
149
311
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
```json
|
|
153
|
-
{
|
|
154
|
-
"providers": {
|
|
155
|
-
"openai": {
|
|
156
|
-
"apiKey": "sk-...",
|
|
157
|
-
"organization": "org-...", // Optional
|
|
158
|
-
"project": "proj_...", // Optional
|
|
159
|
-
"defaultModels": {
|
|
160
|
-
"chat": "gpt-4o",
|
|
161
|
-
"imageGenerate": "dall-e-3",
|
|
162
|
-
"transcription": "whisper-1",
|
|
163
|
-
"embedding": "text-embedding-3-large"
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
#### OpenRouter
|
|
171
|
-
|
|
172
|
-
```json
|
|
173
|
-
{
|
|
174
|
-
"providers": {
|
|
175
|
-
"openrouter": {
|
|
176
|
-
"apiKey": "sk-or-...",
|
|
177
|
-
"defaultParams": {
|
|
178
|
-
"siteUrl": "https://yoursite.com",
|
|
179
|
-
"appName": "Cletus",
|
|
180
|
-
"providers": {
|
|
181
|
-
"order": ["openai", "anthropic"],
|
|
182
|
-
"allowFallbacks": true
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
#### Replicate
|
|
191
|
-
|
|
192
|
-
```json
|
|
193
|
-
{
|
|
194
|
-
"providers": {
|
|
195
|
-
"replicate": {
|
|
196
|
-
"apiKey": "r8_..."
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
#### AWS Bedrock
|
|
203
|
-
|
|
204
|
-
Access to Claude, Llama, Mistral, and other models via AWS Bedrock. Supports credential auto-discovery from environment variables or IAM roles.
|
|
205
|
-
|
|
206
|
-
```json
|
|
207
|
-
{
|
|
208
|
-
"providers": {
|
|
209
|
-
"aws": {
|
|
210
|
-
"region": "us-east-1",
|
|
211
|
-
"credentials": {
|
|
212
|
-
"accessKeyId": "AKIA...",
|
|
213
|
-
"secretAccessKey": "..."
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Alternatively, set environment variables (recommended):
|
|
221
|
-
```bash
|
|
222
|
-
export AWS_REGION=us-east-1
|
|
223
|
-
export AWS_ACCESS_KEY_ID=AKIA...
|
|
224
|
-
export AWS_SECRET_ACCESS_KEY=...
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
#### Tavily (Web Search)
|
|
228
|
-
|
|
229
|
-
```json
|
|
230
|
-
{
|
|
231
|
-
"tavily": {
|
|
232
|
-
"apiKey": "tvly-..."
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
```
|
|
312
|
+
Common environment variables & AWS profiles are auto-detected
|
|
236
313
|
|
|
237
314
|
### Model Selection
|
|
238
315
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
```json
|
|
242
|
-
{
|
|
243
|
-
"user": {
|
|
244
|
-
"models": {
|
|
245
|
-
"chat": "gpt-4o-mini",
|
|
246
|
-
"imageGenerate": "dall-e-3",
|
|
247
|
-
"imageAnalyze": "gpt-4o",
|
|
248
|
-
"embedding": "text-embedding-3-small",
|
|
249
|
-
"summary": "gpt-4o-mini"
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
```
|
|
316
|
+
In the settings you can configure what models you want to use for each behavior.
|
|
254
317
|
|
|
255
318
|
### Autonomous Mode
|
|
256
319
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
```json
|
|
260
|
-
{
|
|
261
|
-
"user": {
|
|
262
|
-
"autonomous": {
|
|
263
|
-
"maxIterations": 10, // Max tool calls without approval
|
|
264
|
-
"timeout": 300000 // 5 minutes in milliseconds
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
## Tool Categories
|
|
271
|
-
|
|
272
|
-
### Architect Tools
|
|
273
|
-
|
|
274
|
-
Manage custom data type definitions:
|
|
275
|
-
|
|
276
|
-
- `type_info` - View type schema and fields
|
|
277
|
-
- `type_create` - Create new type definitions
|
|
278
|
-
- `type_update` - Update types (backwards compatible)
|
|
279
|
-
|
|
280
|
-
### Artist Tools
|
|
281
|
-
|
|
282
|
-
Image operations:
|
|
283
|
-
|
|
284
|
-
- `image_generate` - Generate images from prompts
|
|
285
|
-
- `image_edit` - Edit existing images
|
|
286
|
-
- `image_analyze` - Ask questions about images
|
|
287
|
-
- `image_describe` - Get detailed image descriptions
|
|
288
|
-
- `image_find` - Semantic search over images
|
|
289
|
-
|
|
290
|
-
### Clerk Tools
|
|
291
|
-
|
|
292
|
-
File management:
|
|
293
|
-
|
|
294
|
-
- `file_search` - Find files with glob patterns
|
|
295
|
-
- `file_summary` - AI-generated file summaries
|
|
296
|
-
- `file_index` - Index files for semantic search
|
|
297
|
-
- `file_create` - Create new files
|
|
298
|
-
- `file_read` - Read file contents
|
|
299
|
-
- `file_edit` - Edit file contents
|
|
300
|
-
- `file_copy` - Copy files
|
|
301
|
-
- `file_move` - Move/rename files
|
|
302
|
-
- `file_delete` - Delete files
|
|
303
|
-
- `file_stats` - Get file metadata
|
|
304
|
-
- `text_search` - Search text content with regex
|
|
305
|
-
- `dir_create` - Create directories
|
|
306
|
-
|
|
307
|
-
### DBA Tools
|
|
308
|
-
|
|
309
|
-
Data operations (dynamically generated for each custom type):
|
|
310
|
-
|
|
311
|
-
- `data_create` - Create new records
|
|
312
|
-
- `data_update` - Update records by ID
|
|
313
|
-
- `data_delete` - Delete records by ID
|
|
314
|
-
- `data_select` - Query records with filters
|
|
315
|
-
- `data_update_many` - Bulk update operations
|
|
316
|
-
- `data_delete_many` - Bulk delete operations
|
|
317
|
-
- `data_aggregate` - Count and aggregate data
|
|
318
|
-
- `data_index` - Reindex knowledge base
|
|
319
|
-
- `data_import` - Import from files (CSV, JSON, etc.)
|
|
320
|
-
- `data_search` - Semantic search over records
|
|
321
|
-
|
|
322
|
-
### Internet Tools
|
|
323
|
-
|
|
324
|
-
Web operations:
|
|
325
|
-
|
|
326
|
-
- `web_search` - Search the web (via Tavily)
|
|
327
|
-
- `web_get_page` - Scrape web pages
|
|
328
|
-
- `web_api_call` - Make REST API requests
|
|
329
|
-
|
|
330
|
-
### Librarian Tools
|
|
331
|
-
|
|
332
|
-
Knowledge base management:
|
|
333
|
-
|
|
334
|
-
- `knowledge_search` - Semantic search
|
|
335
|
-
- `knowledge_sources` - List knowledge sources
|
|
336
|
-
- `knowledge_add` - Add user memories
|
|
337
|
-
- `knowledge_delete` - Remove knowledge entries
|
|
338
|
-
|
|
339
|
-
### Planner Tools
|
|
340
|
-
|
|
341
|
-
Task management:
|
|
342
|
-
|
|
343
|
-
- `todos_list` - List all todos
|
|
344
|
-
- `todos_add` - Add new todo
|
|
345
|
-
- `todos_done` - Mark todo complete
|
|
346
|
-
- `todos_get` - Get todo details
|
|
347
|
-
- `todos_remove` - Delete todo
|
|
348
|
-
- `todos_clear` - Clear all todos
|
|
349
|
-
- `todos_replace` - Replace entire todo list
|
|
350
|
-
|
|
351
|
-
### Secretary Tools
|
|
352
|
-
|
|
353
|
-
Assistant and memory management:
|
|
354
|
-
|
|
355
|
-
- `assistant_switch` - Change assistant persona
|
|
356
|
-
- `assistant_update` - Modify assistant prompt
|
|
357
|
-
- `assistant_add` - Create new assistant
|
|
358
|
-
- `memory_list` - View user memories
|
|
359
|
-
- `memory_update` - Add/update memories
|
|
360
|
-
|
|
361
|
-
## Examples
|
|
362
|
-
|
|
363
|
-
### File Operations
|
|
364
|
-
|
|
365
|
-
```
|
|
366
|
-
You: Summarize all TypeScript files in the src directory
|
|
367
|
-
|
|
368
|
-
Cletus: I'll search for TypeScript files and summarize them...
|
|
369
|
-
[Uses file_search and file_summary tools]
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
### Data Management
|
|
373
|
-
|
|
374
|
-
```
|
|
375
|
-
You: Create a new type for tracking books with title, author, and year
|
|
376
|
-
|
|
377
|
-
Cletus: I'll create a book type definition...
|
|
378
|
-
[Uses type_create tool]
|
|
379
|
-
|
|
380
|
-
You: Add "1984" by George Orwell published in 1949
|
|
381
|
-
|
|
382
|
-
Cletus: I'll create a new book record...
|
|
383
|
-
[Uses data_create tool with the book type]
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
### Image Generation
|
|
387
|
-
|
|
388
|
-
```
|
|
389
|
-
You: Generate an image of a sunset over mountains
|
|
390
|
-
|
|
391
|
-
Cletus: I'll generate that image for you...
|
|
392
|
-
[Uses image_generate tool, saves to .cletus/images/]
|
|
393
|
-
[Generated image: sunset_mountains_abc123.png](~/.cletus/images/sunset_mountains_abc123.png)
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
### Web Research
|
|
397
|
-
|
|
398
|
-
```
|
|
399
|
-
You: Search for recent TypeScript 5.0 features and summarize them
|
|
400
|
-
|
|
401
|
-
Cletus: Let me search for that information...
|
|
402
|
-
[Uses web_search tool]
|
|
403
|
-
[Summarizes findings from multiple sources]
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
### Knowledge Base
|
|
407
|
-
|
|
408
|
-
```
|
|
409
|
-
You: Remember that I prefer using async/await over promises
|
|
410
|
-
|
|
411
|
-
Cletus: I'll add that to your memories...
|
|
412
|
-
[Uses knowledge_add tool]
|
|
413
|
-
|
|
414
|
-
You: What are my coding preferences?
|
|
415
|
-
|
|
416
|
-
Cletus: Let me search your memories...
|
|
417
|
-
[Uses knowledge_search tool]
|
|
418
|
-
You prefer using async/await over promises...
|
|
419
|
-
```
|
|
320
|
+
You choose how autonomous Cletus is - either automatically performing certain operations or asking for approval.
|
|
420
321
|
|
|
421
322
|
## Custom Assistants
|
|
422
323
|
|
|
@@ -451,38 +352,6 @@ Cletus: Switching assistant...
|
|
|
451
352
|
|
|
452
353
|
Define structured data with validation:
|
|
453
354
|
|
|
454
|
-
```typescript
|
|
455
|
-
// Example type definition
|
|
456
|
-
{
|
|
457
|
-
name: "project",
|
|
458
|
-
friendlyName: "Project",
|
|
459
|
-
description: "Software project tracking",
|
|
460
|
-
knowledgeTemplate: "Project: {{name}}\nStatus: {{status}}\n{{#if description}}Description: {{description}}{{/if}}",
|
|
461
|
-
fields: [
|
|
462
|
-
{
|
|
463
|
-
name: "name",
|
|
464
|
-
friendlyName: "Name",
|
|
465
|
-
type: "string",
|
|
466
|
-
required: true
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
name: "status",
|
|
470
|
-
friendlyName: "Status",
|
|
471
|
-
type: "enum",
|
|
472
|
-
enumOptions: ["planning", "active", "completed"],
|
|
473
|
-
required: true,
|
|
474
|
-
default: "planning"
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
name: "description",
|
|
478
|
-
friendlyName: "Description",
|
|
479
|
-
type: "string",
|
|
480
|
-
required: false
|
|
481
|
-
}
|
|
482
|
-
]
|
|
483
|
-
}
|
|
484
|
-
```
|
|
485
|
-
|
|
486
355
|
### Semantic Search
|
|
487
356
|
|
|
488
357
|
Files, data records, and user memories are automatically embedded and searchable:
|
|
@@ -508,40 +377,6 @@ Operations:
|
|
|
508
377
|
- OCR for images in documents
|
|
509
378
|
- Image description and analysis
|
|
510
379
|
|
|
511
|
-
## Settings Interface
|
|
512
|
-
|
|
513
|
-
Cletus provides two interfaces for managing settings:
|
|
514
|
-
|
|
515
|
-
### Traditional Settings Menu (default)
|
|
516
|
-
- Navigate through nested menus with deep navigation
|
|
517
|
-
- Each setting category is accessed by drilling down through screens
|
|
518
|
-
- Good for focused, sequential configuration
|
|
519
|
-
|
|
520
|
-
### Split View Settings (use `--split-settings` flag)
|
|
521
|
-
- All settings accessible from a single screen
|
|
522
|
-
- Left panel shows categories, right panel shows configuration
|
|
523
|
-
- Reduced navigation and screen transitions
|
|
524
|
-
- Ideal for quick settings adjustments
|
|
525
|
-
|
|
526
|
-
Both interfaces provide the same functionality:
|
|
527
|
-
- User profile (name, pronouns, global prompt)
|
|
528
|
-
- Prompt file management
|
|
529
|
-
- Memory management
|
|
530
|
-
- Provider configuration (OpenAI, OpenRouter, Replicate, AWS)
|
|
531
|
-
- Tavily web search setup
|
|
532
|
-
- Model selection for different capabilities
|
|
533
|
-
- Autonomous operation settings
|
|
534
|
-
- Debug mode toggle
|
|
535
|
-
|
|
536
|
-
## Keyboard Shortcuts
|
|
537
|
-
|
|
538
|
-
- **Ctrl+C** - Exit current view (returns to main menu)
|
|
539
|
-
- **Arrow Keys** - Navigate menus
|
|
540
|
-
- **Enter** - Select menu item
|
|
541
|
-
- **Type** - In chat view, type messages
|
|
542
|
-
|
|
543
|
-
## Troubleshooting
|
|
544
|
-
|
|
545
380
|
### "No provider configured"
|
|
546
381
|
|
|
547
382
|
Add at least one provider in settings or edit `~/.cletus/config.json` to include API keys.
|
|
@@ -616,10 +451,28 @@ const myNewTool = ai.tool({
|
|
|
616
451
|
});
|
|
617
452
|
|
|
618
453
|
// 3. operations/clerk.tsx
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
454
|
+
export const myNewTool = operationOf<
|
|
455
|
+
{ input: string },
|
|
456
|
+
{ result: string }
|
|
457
|
+
>({
|
|
458
|
+
mode: 'read',
|
|
459
|
+
signature: 'my_new_tool(input: string)',
|
|
460
|
+
status: (input) => `Processing: ${input.input}`,
|
|
461
|
+
analyze: async ({ input }, { cwd }) => ({
|
|
462
|
+
analysis: `This will process: ${input.input}`,
|
|
463
|
+
doable: true,
|
|
464
|
+
}),
|
|
465
|
+
do: async ({ input }, ctx) => {
|
|
466
|
+
const result = await doSomething(input.input);
|
|
467
|
+
return { result };
|
|
468
|
+
},
|
|
469
|
+
render: (op, ai, showInput, showOutput) => renderOperation(
|
|
470
|
+
op,
|
|
471
|
+
`MyNewTool("${op.input.input}")`,
|
|
472
|
+
(op) => op.output ? `Result: ${op.output.result}` : null,
|
|
473
|
+
showInput, showOutput
|
|
474
|
+
),
|
|
475
|
+
});
|
|
623
476
|
```
|
|
624
477
|
|
|
625
478
|
### Building
|