@menasehk/sera 1.0.2 → 1.0.3

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,178 @@
1
- # SERA / ስራ — Your AI-Powered Work Command Center
1
+ # SERA / ስራ
2
2
 
3
- > **ስራ** means *work* in Amharic. Manage tasks, appointments, notes, calendar, contacts, and system automation through natural language directly from your terminal.
4
-
5
- ```
6
- ╔══════════════════════════════════════════════════╗
7
- ║ ║
8
- ║ ███████╗███████╗██████╗ █████╗ ║
9
- ║ ██╔════╝██╔════╝██╔══██╗██╔══██╗ ║
10
- ║ ██╔████║██║ ██║██║ ██║ ███████║ ║
11
- ║ ██║╚███║██║ ██║╚██╗ ██╔╝ ██╔══██║ ║
12
- ║ ██║ ╚██║╚██████╔╝ ╚████╔╝ ██║ ██║ ║
13
- ║ ╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ║
14
- ║ ║
15
- ║ Your AI-Powered Daily Command Center v1.0.0 ║
16
- ╚═════════════════════════════════════════════════╝
17
- ```
3
+ > **ስራ** means *work* in Amharic. Your AI-powered daily work command center — manage tasks, calendar, contacts, notes, and automate your computer through natural conversation, right from your terminal.
18
4
 
19
5
  ---
20
6
 
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
26
-
27
- ---
28
-
29
- ## Installation
30
-
31
- **Prerequisites:** Node.js 18 or higher
7
+ ## Install
32
8
 
33
9
  ```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 .
10
+ npm install -g @menasehk/sera
46
11
  ```
47
12
 
48
- After installation, run `sera` from any directory.
49
-
50
- ---
51
-
52
- ## Quick Start
13
+ Then run setup once to connect your AI provider:
53
14
 
54
15
  ```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
16
+ sera setup
59
17
  ```
60
18
 
61
19
  ---
62
20
 
63
- ## Configuration
64
-
65
- Run `sera setup` to configure SERA interactively. Settings are saved to `~/.sera/config.json`.
21
+ ## What you can do
66
22
 
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 |
23
+ Just open SERA and talk to it naturally. No special syntax needed.
74
24
 
75
25
  ```bash
76
- sera config # View current settings
77
- sera config --reset # Reset and re-run setup
26
+ sera # open and start chatting
78
27
  ```
79
28
 
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
29
+ ```
30
+ "Show my tasks for today"
31
+ "Add a meeting tomorrow at 2pm with the design team"
32
+ "Remind me to take my meds at 8pm"
33
+ "I finished the login bug fix, mark it done"
34
+ "Add Sarah Connor to my contacts, phone 555-0123"
35
+ "What do I have on Friday?"
36
+ "Remember that I prefer short responses"
37
+ "Create a collection to track my expenses"
38
+ "Show all expenses over $50 this month"
103
39
  ```
104
40
 
105
- **Priority levels:** `low` · `medium` · `high` · `urgent`
41
+ 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
42
 
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
- ```
43
+ ---
113
44
 
114
- ### Appointments & Reminders
45
+ ## Quick commands
115
46
 
116
47
  ```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
48
+ sera # Start chatting with your AI
49
+ sera setup # First-time setup (AI provider, API key, preferences)
50
+ sera today # Today's tasks and appointments at a glance
51
+ sera tasks # View all active tasks
52
+ sera add "Buy groceries" -p low # Quick-add a task
53
+ sera done "Buy groceries" # Mark a task done
54
+ sera cal # Upcoming appointments
55
+ sera remind 15 "Stand up call" # Desktop notification in 15 minutes
56
+ sera note "Great idea I had" # Save a quick note
57
+ sera notes # View all notes
58
+ sera memory # See what SERA remembers about you
59
+ sera daemon start # Run in the background (notifications when not open)
60
+ sera daemon install # Auto-start at login
61
+ sera export # Back up all your data
120
62
  ```
121
63
 
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
- ```
64
+ ---
129
65
 
130
- ### Notes
66
+ ## Supported AI providers
131
67
 
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
- ```
68
+ | Provider | Models |
69
+ |---|---|
70
+ | **OpenAI** | gpt-4o, gpt-4o-mini, gpt-4-turbo, |
71
+ | **Anthropic** | claude-opus-4, claude-sonnet-4, … |
72
+ | **Ollama** | llama3.1, mistral, gemma3 (runs locally, free) |
73
+ | **Groq** | llama-3.3-70b, mixtral, … |
137
74
 
138
- **In chat:**
139
- ```
140
- "Search my notes for anything about the Q2 launch"
141
- "Summarise my work notes from this week"
142
- ```
75
+ Run `sera setup` to choose your provider and paste in your API key. For Ollama no API key is needed.
143
76
 
144
- ### Custom Database Collections
77
+ ---
145
78
 
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.
79
+ ## AI Memory
147
80
 
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
- ```
81
+ SERA remembers things about you across sessions automatically — no prompting needed. Just chat normally.
153
82
 
154
- **In chat:**
155
83
  ```
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"
84
+ "My name is Kassu and I live in Helsinki"
85
+ "I prefer bullet points in answers"
86
+ "I'm working on a mobile app called Fana"
163
87
  ```
164
88
 
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.
89
+ Next time you open SERA it already knows all of this. View or clear memories any time:
170
90
 
171
91
  ```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
92
+ sera memory # See everything SERA remembers
93
+ sera memory --forget "timezone" # Remove one memory
94
+ sera memory --forget-all # Start fresh
176
95
  ```
177
96
 
178
- **In chat:**
179
- ```
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
-
186
- **Categories:** `personal` · `work` · `preferences` · `health` · `goals` · `context`
97
+ Or type `/memory` while chatting.
187
98
 
188
- ### Calendar & Contacts
99
+ ---
189
100
 
190
- SERA can add events to your calendar and contacts to your address book directly from chat.
101
+ ## Calendar & Contacts
191
102
 
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.
103
+ 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
104
 
195
105
  ```
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"
106
+ "Add dentist appointment Friday 3pm, set a 30 minute reminder"
107
+ "Add John Smith to my contacts, email john@acme.com, phone 555-1234"
199
108
  "Look up Alice in my contacts"
200
- "Add this to Google Calendar: product launch party, Saturday 7pm"
109
+ "Put this on my Google Calendar: team lunch, Thursday noon"
201
110
  ```
202
111
 
203
- SERA will always ask your permission before touching your calendar or contacts.
112
+ SERA always asks your permission before touching your calendar or contacts.
204
113
 
205
- ### Background Daemon
206
-
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
- ```
114
+ ---
217
115
 
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
116
+ ## Background daemon
222
117
 
223
- ### Backup & Export
118
+ Keep SERA running silently in the background so you get notified even when the app is closed.
224
119
 
225
120
  ```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
121
+ sera daemon start # Start background monitoring
122
+ sera daemon install # Auto-start every time you log in
123
+ sera daemon status # Check if it's running
124
+ sera daemon stop # Turn it off
229
125
  ```
230
126
 
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 |
127
+ The daemon sends desktop notifications for overdue tasks, upcoming appointments (15 min warning + at start time), and a 9 AM morning briefing.
264
128
 
265
129
  ---
266
130
 
267
131
  ## Permissions
268
132
 
269
- SERA asks for confirmation before running tools that touch your system. You control how strict this is.
270
-
271
- **Permission levels** (set during `sera setup`):
133
+ SERA asks before doing anything that touches your system. You choose how strict:
272
134
 
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)*
135
+ - `ask` — confirm every action
136
+ - `auto` — auto-allow safe actions, ask for risky ones
137
+ - `allow` — allow everything
276
138
 
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
- ```
139
+ You can always allow or deny permanently per tool so you're never asked twice for the same thing.
287
140
 
288
141
  ---
289
142
 
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.
301
-
302
- ---
143
+ ## Your data
303
144
 
304
- ## Data & Privacy
145
+ Everything stays on your machine. No cloud sync, no tracking.
305
146
 
306
- All your data lives locally on your machine:
307
-
308
- | File | Contents |
147
+ | File | What's in it |
309
148
  |---|---|
310
- | `~/.sera/config.json` | Configuration and permission rules |
311
- | `~/.sera/data.json` | Tasks, appointments, and notes |
312
- | `~/.sera/collections.json` | Custom database collections |
149
+ | `~/.ai-daily-cli/config.json` | Your settings and API key |
150
+ | `~/.ai-daily-cli/data.json` | Tasks, appointments, notes |
151
+ | `~/.ai-daily-cli/memory.json` | Things SERA remembers about you |
152
+ | `~/.ai-daily-cli/collections.json` | Custom data collections |
313
153
 
314
- Your data is never sent anywhere other than your chosen AI provider's API for chat completions. SERA does not phone home.
154
+ The only outbound traffic is your conversation being sent to your chosen AI provider's API.
315
155
 
316
156
  ---
317
157
 
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
158
+ ## In-chat slash commands
333
159
 
334
- ### Project Structure
160
+ While chatting you can type these shortcuts:
335
161
 
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
- ```
162
+ | Command | What it does |
163
+ |---|---|
164
+ | `/help` | Show all slash commands |
165
+ | `/memory` | View stored memories |
166
+ | `/tools` | List all available AI tools |
167
+ | `/history` | Recent messages |
168
+ | `/perms` | Saved permission rules |
169
+ | `/config` | Current configuration |
170
+ | `/db` | Quick view of custom collections |
171
+ | `/clear` | Clear conversation and screen |
172
+ | `/quit` | Exit |
371
173
 
372
174
  ---
373
175
 
374
176
  ## License
375
177
 
376
- MIT
178
+ MIT © tagcodi