@menasehk/sera 1.0.2 → 1.0.4

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
@@ -1,376 +1,192 @@
1
- # SERA / ስራ — Your AI-Powered Work Command Center
2
-
3
- > **ስራ** means *work* in Amharic. Manage tasks, appointments, notes, calendar, contacts, and system automation through natural language — directly from your terminal.
1
+ # SERA
4
2
 
5
3
  ```
6
- ╔══════════════════════════════════════════════════╗
7
-
8
- ███████╗███████╗██████╗ █████╗
9
- ██╔════╝██╔════╝██╔══██╗██╔══██╗
10
- ██╔████║██║ ██║██║ ██║ ███████║
11
- ██║╚███║██║ ██║╚██╗ ██╔╝ ██╔══██║
12
- ██║ ╚██║╚██████╔╝ ╚████╔╝ ██║ ██║
13
- ╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝
14
-
15
- Your AI-Powered Daily Command Center v1.0.0
16
- ╚═════════════════════════════════════════════════╝
4
+ ╔══════════════════ SERA ══════════════════╗
5
+
6
+ ███████╗███████╗██████╗ █████╗
7
+ ██╔════╝██╔════╝██╔══██╗██╔══██╗
8
+ ███████╗█████╗ ██████╔╝███████║
9
+ ╚════██║██╔══╝ ██╔══██╗██╔══██║
10
+ ███████║███████╗██║ ██║██║ ██║
11
+ ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
12
+
13
+ ስ ራ ‹ AI-Powered Work Command Center
14
+ ╚══════════════════════════════════════════╝
17
15
  ```
18
16
 
19
- ---
20
-
21
- ## What is SERA?
22
-
23
- SERA is a CLI productivity assistant powered by your choice of AI model. You talk to it in plain English and it acts — creating tasks, scheduling appointments, running shell commands, querying your custom databases, and more. It runs entirely on your machine with full access to your filesystem, controlled by a granular permission system.
24
-
25
- **Supported AI providers:** OpenAI · Anthropic (Claude) · Ollama (local) · Groq
17
+ > **ስራ** means *work* in Amharic. Manage tasks, calendar, contacts, notes, and automate your computer through natural conversation — right from your terminal.
26
18
 
27
19
  ---
28
20
 
29
- ## Installation
30
-
31
- **Prerequisites:** Node.js 18 or higher
21
+ ## Install
32
22
 
33
23
  ```bash
34
- # 1. Clone and enter the project
35
- git clone <repo-url>
36
- cd sera
37
-
38
- # 2. Install dependencies
39
- npm install
40
-
41
- # 3. Build
42
- npm run build
43
-
44
- # 4. Install globally
45
- npm install -g .
24
+ npm install -g @menasehk/sera
46
25
  ```
47
26
 
48
- After installation, run `sera` from any directory.
49
-
50
- ---
51
-
52
- ## Quick Start
27
+ Then run setup once to connect your AI provider:
53
28
 
54
29
  ```bash
55
- sera setup # Configure your AI provider and preferences (run this first)
56
- sera # Launch interactive AI chat
57
- sera today # See today's tasks and appointments
58
- sera how # Full usage guide
30
+ sera setup
59
31
  ```
60
32
 
61
33
  ---
62
34
 
63
- ## Configuration
64
-
65
- Run `sera setup` to configure SERA interactively. Settings are saved to `~/.sera/config.json`.
35
+ ## What you can do
66
36
 
67
- | Setting | Description |
68
- |---|---|
69
- | **AI Provider** | OpenAI, Anthropic, Ollama, or Groq |
70
- | **Model** | e.g. `gpt-4o`, `claude-sonnet-4-20250514`, `llama3.1` |
71
- | **API Key** | Your provider API key (not needed for Ollama) |
72
- | **Storage** | JSON (default) or SQLite |
73
- | **Permissions** | How strictly to ask before running tools |
37
+ Just open SERA and talk to it naturally. No special syntax needed.
74
38
 
75
39
  ```bash
76
- sera config # View current settings
77
- sera config --reset # Reset and re-run setup
40
+ sera # open and start chatting
78
41
  ```
79
42
 
80
- ---
81
-
82
- ## Commands
83
-
84
- ### Core
85
-
86
- | Command | Description |
87
- |---|---|
88
- | `sera` | Start interactive AI chat session |
89
- | `sera setup` | Run the interactive setup wizard |
90
- | `sera today` | Today's summary: tasks, appointments, overdue items |
91
- | `sera how` | Full usage guide with examples |
92
-
93
- ### Tasks
94
-
95
- ```bash
96
- sera add "Fix the login bug" # Quick-add (AI infers priority)
97
- sera add "Submit report" -p high -d friday # With priority and due date
98
- sera done "Fix the login bug" # Mark done by name
99
- sera tasks # View active tasks
100
- sera tasks --all # Include done & cancelled
101
- sera tasks --priority urgent # Filter by priority
102
- sera tasks --status in_progress # Filter by status
43
+ ```
44
+ "Show my tasks for today"
45
+ "Add a meeting tomorrow at 2pm with the design team"
46
+ "Remind me to take my meds at 8pm"
47
+ "I finished the login bug fix, mark it done"
48
+ "Add Sarah Connor to my contacts, phone 555-0123"
49
+ "What do I have on Friday?"
50
+ "Remember that I prefer short responses"
51
+ "Create a collection to track my expenses"
52
+ "Show all expenses over $50 this month"
103
53
  ```
104
54
 
105
- **Priority levels:** `low` · `medium` · `high` · `urgent`
55
+ SERA figures out what you mean and does it — including creating tasks, scheduling calendar events, saving contacts, running shell commands, reading files, and more.
106
56
 
107
- **In chat:**
108
- ```
109
- "Mark all overdue tasks as cancelled"
110
- "Show me everything due this week"
111
- "What's still in progress?"
112
- ```
57
+ ---
113
58
 
114
- ### Appointments & Reminders
59
+ ## Quick commands
115
60
 
116
61
  ```bash
117
- sera cal # Upcoming appointments (next 7 days)
118
- sera cal --days 30 # Next 30 days
119
- sera remind 30 "Take meds" # Desktop notification in 30 minutes
62
+ sera # Start chatting with your AI
63
+ sera setup # First-time setup (AI provider, API key, preferences)
64
+ sera today # Today's tasks and appointments at a glance
65
+ sera tasks # View all active tasks
66
+ sera add "Buy groceries" -p low # Quick-add a task
67
+ sera done "Buy groceries" # Mark a task done
68
+ sera cal # Upcoming appointments
69
+ sera remind 15 "Stand up call" # Desktop notification in 15 minutes
70
+ sera note "Great idea I had" # Save a quick note
71
+ sera notes # View all notes
72
+ sera memory # See what SERA remembers about you
73
+ sera daemon start # Run in the background (notifications when not open)
74
+ sera daemon install # Auto-start at login
75
+ sera export # Back up all your data
120
76
  ```
121
77
 
122
- **In chat:**
123
- ```
124
- "Add dentist appointment next Tuesday 2pm"
125
- "Reschedule my 3pm meeting to 4:30pm"
126
- "Remind me to call mom at 6pm"
127
- "What do I have this week?"
128
- ```
78
+ ---
129
79
 
130
- ### Notes
80
+ ## Supported AI providers
131
81
 
132
- ```bash
133
- sera note "Buy oat milk" # Quick capture
134
- sera note "Meeting notes" -t work,q2 # With tags
135
- sera notes # View all notes
136
- ```
82
+ | Provider | Models |
83
+ |---|---|
84
+ | **OpenAI** | gpt-4o, gpt-4o-mini, gpt-4-turbo, |
85
+ | **Anthropic** | claude-opus-4, claude-sonnet-4, … |
86
+ | **Ollama** | llama3.1, mistral, gemma3 (runs locally, free) |
87
+ | **Groq** | llama-3.3-70b, mixtral, … |
137
88
 
138
- **In chat:**
139
- ```
140
- "Search my notes for anything about the Q2 launch"
141
- "Summarise my work notes from this week"
142
- ```
89
+ Run `sera setup` to choose your provider and paste in your API key. For Ollama no API key is needed.
143
90
 
144
- ### Custom Database Collections
91
+ ---
145
92
 
146
- SERA can create and manage custom data collections for anything you want to track — expenses, contacts, gym logs, medications, habits, reading lists, and more.
93
+ ## AI Memory
147
94
 
148
- ```bash
149
- sera db # List all collections
150
- sera db --show expenses # View records in a collection
151
- sera db --schema expenses # View the schema (fields and types)
152
- ```
95
+ SERA remembers things about you across sessions automatically — no prompting needed. Just chat normally.
153
96
 
154
- **In chat:**
155
97
  ```
156
- "Create a collection to track my expenses with: amount, category, description, date"
157
- "Add an expense: $45 lunch, category: food"
158
- "Show all expenses over $100 this month"
159
- "Add a 'notes' field to my expenses collection"
160
- "Create a contacts table: name, email, phone, company"
161
- "Delete the old habits collection"
162
- "Back up all my data"
98
+ "My name is Kassu and I live in Helsinki"
99
+ "I prefer bullet points in answers"
100
+ "I'm working on a mobile app called Fana"
163
101
  ```
164
102
 
165
- **Field types:** `string` · `number` · `boolean` · `date` · `json`
166
-
167
- ### AI Memory
168
-
169
- SERA remembers facts about you across sessions — name, timezone, preferences, work context, goals, and more. No prompting needed; it picks things up naturally from your conversations.
103
+ Next time you open SERA it already knows all of this. View or clear memories any time:
170
104
 
171
105
  ```bash
172
- sera memory # View all stored memories
173
- sera memory --category work # Filter by category
174
- sera memory --forget "timezone" # Delete a specific memory
175
- sera memory --forget-all # Clear everything
176
- ```
177
-
178
- **In chat:**
106
+ sera memory # See everything SERA remembers
107
+ sera memory --forget "timezone" # Remove one memory
108
+ sera memory --forget-all # Start fresh
179
109
  ```
180
- "Remember that I prefer concise answers"
181
- "My timezone is CET"
182
- "Forget that I work at Acme"
183
- ```
184
- **Slash command (interactive mode):** `/memory`
185
110
 
186
- **Categories:** `personal` · `work` · `preferences` · `health` · `goals` · `context`
111
+ Or type `/memory` while chatting.
187
112
 
188
- ### Calendar & Contacts
113
+ ---
189
114
 
190
- SERA can add events to your calendar and contacts to your address book directly from chat.
115
+ ## Calendar & Contacts
191
116
 
192
- **macOS** uses Calendar.app and Contacts.app natively (no extra setup).
193
- **Other platforms** — creates an `.ics` or `.vcf` file and opens it with your default app.
117
+ On macOS SERA talks directly to Calendar.app and Contacts.app. On other platforms it creates `.ics` / `.vcf` files that open in whatever app you use.
194
118
 
195
119
  ```
196
- "Add a dentist appointment on Friday at 3pm"
197
- "Create an event: Team standup every Monday 9am"
198
- "Add John Smith to my contacts, phone 555-1234, email john@acme.com"
120
+ "Add dentist appointment Friday 3pm, set a 30 minute reminder"
121
+ "Add John Smith to my contacts, email john@acme.com, phone 555-1234"
199
122
  "Look up Alice in my contacts"
200
- "Add this to Google Calendar: product launch party, Saturday 7pm"
123
+ "Put this on my Google Calendar: team lunch, Thursday noon"
201
124
  ```
202
125
 
203
- SERA will always ask your permission before touching your calendar or contacts.
204
-
205
- ### Background Daemon
126
+ SERA always asks your permission before touching your calendar or contacts.
206
127
 
207
- The daemon runs quietly in the background and sends desktop notifications so you never miss anything — even when SERA isn't open.
208
-
209
- ```bash
210
- sera daemon start # Start the background monitor
211
- sera daemon stop # Stop it
212
- sera daemon restart # Restart
213
- sera daemon status # Is it running?
214
- sera daemon logs # View recent log output
215
- sera daemon install # Auto-start at login (launchd on macOS, systemd on Linux)
216
- ```
128
+ ---
217
129
 
218
- **What the daemon monitors:**
219
- - Task overdue alerts — fires the moment a task deadline passes
220
- - Appointment reminders — 15 minutes before + when it starts
221
- - Morning briefing — 9 AM summary of the day's tasks and appointments
130
+ ## Background daemon
222
131
 
223
- ### Backup & Export
132
+ Keep SERA running silently in the background so you get notified even when the app is closed.
224
133
 
225
134
  ```bash
226
- sera export # Export all data → ~/sera-backup-<date>.json
227
- sera export -o ~/my-backup.json # Export to a specific path
228
- sera import ~/my-backup.json # Restore from a backup file
135
+ sera daemon start # Start background monitoring
136
+ sera daemon install # Auto-start every time you log in
137
+ sera daemon status # Check if it's running
138
+ sera daemon stop # Turn it off
229
139
  ```
230
140
 
231
- ### System Automation (in chat)
232
-
233
- SERA can run shell commands, read/write files, and interact with your OS — subject to your permission settings.
234
-
235
- ```
236
- "Run my backup script at ~/scripts/backup.sh"
237
- "List all PDF files in my Downloads folder"
238
- "Create a folder called Projects on my Desktop"
239
- "Open github.com in my browser"
240
- "What's my current git branch?"
241
- "Copy 'hello world' to my clipboard"
242
- "Show me system memory usage"
243
- ```
244
-
245
- ---
246
-
247
- ## In-Chat Slash Commands
248
-
249
- While in an interactive session (`sera`), these commands are available:
250
-
251
- | Command | Description |
252
- |---|---|
253
- | `/help` | Show this list |
254
- | `/guide` | Full usage guide with examples |
255
- | `/clear` | Clear the conversation and screen |
256
- | `/history` | Recent chat messages |
257
- | `/tools` | All available AI tools by category and risk level |
258
- | `/perms` | Saved permission rules |
259
- | `/config` | Current configuration |
260
- | `/db` | Quick view of all custom collections |
261
- | `/memory` | View stored memories about you |
262
- | `/tokens` | Current conversation message count |
263
- | `/quit` | Exit SERA |
141
+ The daemon sends desktop notifications for overdue tasks, upcoming appointments (15 min warning + at start time), and a 9 AM morning briefing.
264
142
 
265
143
  ---
266
144
 
267
145
  ## Permissions
268
146
 
269
- SERA asks for confirmation before running tools that touch your system. You control how strict this is.
147
+ SERA asks before doing anything that touches your system. You choose how strict:
270
148
 
271
- **Permission levels** (set during `sera setup`):
149
+ - `ask` confirm every action
150
+ - `auto` — auto-allow safe actions, ask for risky ones
151
+ - `allow` — allow everything
272
152
 
273
- - `ask` prompt for every tool call *(most secure)*
274
- - `auto` — auto-approve low-risk tools, ask for high-risk
275
- - `allow` — allow everything without asking *(fastest)*
276
-
277
- When prompted, you can choose:
278
- - **Allow once** — allow this single call
279
- - **Always allow** — save a permanent rule for this tool
280
- - **Allow this session** — allow until you exit
281
- - **Deny** / **Deny always**
282
-
283
- ```bash
284
- sera perms # View saved rules
285
- sera perms --clear # Reset all rules
286
- ```
287
-
288
- ---
289
-
290
- ## Error Handling
291
-
292
- SERA gives clear, actionable error messages. For example, if your API key doesn't have access to a model:
293
-
294
- ```
295
- ✖ Project does not have access to model gpt-4-turbo [model_not_found]
296
-
297
- ◆ Run sera setup to pick a different model (e.g. gpt-4o-mini).
298
- ```
299
-
300
- SERA also automatically retries on rate limits (429) and transient server errors (5xx) with exponential backoff, so temporary blips don't interrupt your workflow.
153
+ You can always allow or deny permanently per tool so you're never asked twice for the same thing.
301
154
 
302
155
  ---
303
156
 
304
- ## Data & Privacy
157
+ ## Your data
305
158
 
306
- All your data lives locally on your machine:
159
+ Everything stays on your machine. No cloud sync, no tracking.
307
160
 
308
- | File | Contents |
161
+ | File | What's in it |
309
162
  |---|---|
310
- | `~/.sera/config.json` | Configuration and permission rules |
311
- | `~/.sera/data.json` | Tasks, appointments, and notes |
312
- | `~/.sera/collections.json` | Custom database collections |
163
+ | `~/.ai-daily-cli/config.json` | Your settings and API key |
164
+ | `~/.ai-daily-cli/data.json` | Tasks, appointments, notes |
165
+ | `~/.ai-daily-cli/memory.json` | Things SERA remembers about you |
166
+ | `~/.ai-daily-cli/collections.json` | Custom data collections |
313
167
 
314
- Your data is never sent anywhere other than your chosen AI provider's API for chat completions. SERA does not phone home.
168
+ The only outbound traffic is your conversation being sent to your chosen AI provider's API.
315
169
 
316
170
  ---
317
171
 
318
- ## Development
319
-
320
- ```bash
321
- npm run build # Compile TypeScript → dist/
322
- npm run dev # Run directly with ts-node (no build step)
323
- npm test # Run the test suite
324
- npm run test:watch # Watch mode
325
- npm run test:coverage # With coverage report
326
- ```
327
-
328
- **Test suite covers:**
329
- - Shell command sanitization (safe commands + 14 blocked dangerous patterns)
330
- - Retry logic (rate limits, server errors, network failures, custom predicates)
331
- - AI provider response parsing (OpenAI + Anthropic, including tool calls)
332
- - Database CRUD, schema management, field validation, backup/restore
172
+ ## In-chat slash commands
333
173
 
334
- ### Project Structure
174
+ While chatting you can type these shortcuts:
335
175
 
336
- ```
337
- src/
338
- ├── index.ts # CLI commands, UI rendering, interactive loop
339
- ├── types.ts # Shared TypeScript interfaces
340
- ├── providers/ # AI provider adapters
341
- │ ├── openai.ts # OpenAI & Groq (same API format)
342
- │ ├── anthropic.ts # Anthropic Claude
343
- │ ├── ollama.ts # Ollama (local models)
344
- │ └── index.ts # Provider factory
345
- ├── tools/ # AI-callable tools
346
- │ ├── shell.ts # Shell command execution (with sanitization)
347
- │ ├── filesystem.ts # File read/write/list/delete
348
- │ ├── browser.ts # Open URL, web search
349
- │ ├── system.ts # System info, datetime, clipboard
350
- │ ├── notification.ts # Desktop notifications
351
- │ ├── tasks.ts # Task, appointment & note tools
352
- │ ├── database.ts # Custom collection manager + tools
353
- │ └── index.ts # Tool registry
354
- ├── managers/
355
- │ ├── conversation.ts # Agentic AI loop with tool calling
356
- │ └── setup.ts # Interactive setup wizard
357
- ├── storage/ # Storage backends (JSON / SQLite)
358
- ├── utils/
359
- │ ├── config.ts # Config read/write
360
- │ ├── permissions.ts # Permission prompt system
361
- │ ├── retry.ts # Exponential backoff for API calls
362
- │ ├── sanitize.ts # Shell command safety filter
363
- │ ├── errors.ts # API error parsing & friendly messages
364
- │ └── logger.ts # Debug logger
365
- └── __tests__/ # Jest test suite
366
- ├── sanitize.test.ts
367
- ├── retry.test.ts
368
- ├── providers.test.ts
369
- └── database.test.ts
370
- ```
176
+ | Command | What it does |
177
+ |---|---|
178
+ | `/help` | Show all slash commands |
179
+ | `/memory` | View stored memories |
180
+ | `/tools` | List all available AI tools |
181
+ | `/history` | Recent messages |
182
+ | `/perms` | Saved permission rules |
183
+ | `/config` | Current configuration |
184
+ | `/db` | Quick view of custom collections |
185
+ | `/clear` | Clear conversation and screen |
186
+ | `/quit` | Exit |
371
187
 
372
188
  ---
373
189
 
374
190
  ## License
375
191
 
376
- MIT
192
+ MIT © tagcodi