@thelapyae/geniclaw 1.1.11 → 1.2.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.
package/README.md CHANGED
@@ -1,14 +1,22 @@
1
1
  # 🦁 GeniClaw - Your AI Terminal Assistant
2
2
 
3
- **GeniClaw** is a powerful, local-first AI assistant manager that connects **Google Gemini** to your workflow. It runs as a background service (daemon) on your machine, managing conversation history, project sessions, and token usage efficiently.
4
-
5
- ## 🚀 Features
6
-
7
- - **🧠 Multi-Model Support**: Switch between `gemini-2.5-flash`, `pro`, and other models instantly.
8
- - **📂 Session Management**: Create separate "folders" (sessions) for different projects or topics. Each session has its own isolated memory.
9
- - **💾 Smart Memory**: Automatically manages conversation context. It keeps recent history while pruning older messages to stay within token limits (default ~100k tokens), enabling long-term usage without crashing.
10
- - **🖥️ Terminal UI (TUI)**: An interactive command-line interface to manage everything.
11
- - **⚡ Queue-Based**: Robust message processing ensures no data is lost, even if you are offline.
3
+ **GeniClaw** is a powerful, local-first AI assistant manager that connects multiple AI providers (Gemini, OpenAI, Claude, Groq, DeepSeek, Grok) to your workflow. It runs as a background service (daemon) on your machine, managing conversation history, project sessions, and token usage efficiently.
4
+
5
+ ## 🚀 Key Features
6
+
7
+ - **🧠 Multi-Provider Support**:
8
+ - **Google Gemini** (1.5 Flash/Pro, 2.0 Flash)
9
+ - **OpenAI** (GPT-4o, GPT-3.5)
10
+ - **Anthropic** (Claude 3.5 Sonnet, Opus)
11
+ - **Groq** (Llama 3, Mixtral - Ultra Fast)
12
+ - **DeepSeek** (Coder, Chat)
13
+ - **xAI** (Grok Beta)
14
+ - **🔎 Web Search**: Integrated **Brave Search** allows the AI to Google things for you in real-time.
15
+ - **🔀 Task Routing**: Assign different models to different tasks! (e.g., Use Groq for fast Chat, Gemini for heartbeat/cron jobs).
16
+ - **📂 Session Management**: Create separate "folders" (sessions) for different projects.
17
+ - **💾 Smart Memory**: Automatically manages conversation context and prunes old messages to stay within token limits.
18
+ - **🖥️ Terminal UI (TUI)**: A beautiful interactive interface to manage keys, models, and sessions.
19
+ - **⚡ Queue-Based**: Robust message processing ensures no data is lost.
12
20
 
13
21
  ---
14
22
 
@@ -17,20 +25,23 @@
17
25
  ### Prerequisites
18
26
 
19
27
  - **Node.js** (v18 or higher)
20
- - **Google Gemini API Key**: Get one for free at [aistudio.google.com](https://aistudio.google.com/).
21
- - **Telegram Bot Token** (Optional, for chatting via Telegram): Get one from [@BotFather](https://t.me/botfather).
28
+ - **API Keys**: You need at least one API key from a supported provider:
29
+ - [Google AI Studio](https://aistudio.google.com/)
30
+ - [OpenAI](https://platform.openai.com/)
31
+ - [Anthropic](https://console.anthropic.com/)
32
+ - [Groq](https://console.groq.com/)
33
+ - [DeepSeek](https://platform.deepseek.com/)
34
+ - [Brave Search](https://brave.com/search/api/) (Optional, for Web Search)
35
+ - **Telegram Bot Token** (Optional, for chatting via Telegram).
22
36
 
23
37
  ### Installation
24
38
 
25
39
  1. **Install via NPM**:
26
- ```bash
27
40
  ```bash
28
41
  npm install -g @thelapyae/geniclaw
29
42
  ```
30
- *Note: The `-g` flag installs it globally so you can run `geniclaw` from anywhere.*
31
43
 
32
44
  2. **Run Setup**:
33
- This will guide you through entering your API keys.
34
45
  ```bash
35
46
  geniclaw setup
36
47
  ```
@@ -42,87 +53,52 @@
42
53
  GeniClaw is managed entirely through its **Interactive TUI**.
43
54
 
44
55
  ### 1. Start the TUI
45
- Run the following command in your terminal:
46
56
  ```bash
47
- ./bin/geniclaw.js
48
- # Or if you linked it:
49
57
  geniclaw
50
58
  ```
51
59
 
52
60
  ### 2. Main Menu Options
53
- - **Start Daemon**: Launches the background process (Queue Processor & Telegram Bot).
54
- - **Stop Daemon**: Stops all background processes.
55
- - **Check Status**: Shows if the daemon is running and recent activity.
56
- - **📂 Manage Sessions**: Create or switch between different conversation contexts.
57
- - **🧠 Change Gemini Model**: Select the AI model you want to use.
58
- - **View Logs**: Inspect what's happening under the hood.
61
+ - **🤖 Select AI Provider & Model**: Choose which brain you want to use (Gemini, GPT-4, Claude, etc.).
62
+ - **🔑 Manage API Keys**: Enter keys for different providers.
63
+ - **🔀 Task Routing**: Configure which provider handles Chat vs. Background Tasks.
64
+ - **🔎 Web Search Config**: Set your Brave Search API key to enable internet access.
65
+ - **Start/Stop Daemon**: Control the background process.
59
66
 
60
67
  ### 3. Chatting
61
- Once the daemon is running (`Start Daemon`), you can interact with it via:
62
- - **Telegram**: If configured, just chat with your bot.
63
- - **CLI (Manual)**: You can send a one-off message from the terminal:
64
- ```bash
65
- ./geniclaw.sh send "Hello Gemini, how are you?"
66
- ```
67
-
68
- ---
69
-
70
- ## 📂 Session Management (Folders)
71
-
72
- GeniClaw allows you to organize multiple conversations.
73
-
74
- 1. Open the TUI: `geniclaw`
75
- 2. Select **Manage Sessions**.
76
- 3. **Create New Session**: Name it (e.g., `coding-project`, `personal-notes`).
77
- 4. **Switch Session**: Select it to make it active.
78
-
79
- **How it works**:
80
- - When you switch to `coding-project`, GeniClaw creates a folder at `~/.geniclaw/sessions/coding-project/`.
81
- - All history and memory for that conversation are stored there.
82
- - Switching back to `default` restores your previous context instantly.
83
-
84
- ---
85
-
86
- ## ⚙️ Memory & Token Management
87
-
88
- To support **Long Term Usage**, GeniClaw monitors your token usage.
68
+ - **Telegram**: Chat with your bot.
69
+ - **CLI**: `geniclaw send "Hello!"`
89
70
 
90
- - **Automatic Pruning**: If a conversation exceeds the safe limit (default ~100k tokens), GeniClaw removes the oldest messages to make room for new ones. This prevents "Context Length Exceeded" errors.
91
- - **Check Usage**:
92
- - Type `/stats` in the chat to see current token usage.
93
- - **Reset**:
94
- - Type `/reset` or use the **Reset** command in TUI to clear the current session's memory.
71
+ ### web Search
72
+ Just ask:
73
+ - "Search for the latest heavy metal news"
74
+ - "Google the price of Bitcoin"
75
+ - "/search Who won the super bowl?"
95
76
 
96
77
  ---
97
78
 
98
- ## 🏗️ Architecture & Storage
79
+ ## 🔒 Safety & Technology
99
80
 
100
- ### Where are my files?
101
- By default, GeniClaw stores everything locally in your home directory:
102
- `~/.geniclaw/`
81
+ GeniClaw creates a secure, local-first environment for your AI interactions.
103
82
 
104
- - `config.json`: Your settings (API keys, active session).
105
- - `sessions/`: Folders containing history files for each session.
106
- - `queue/`: Temporary files for messages being processed.
107
- - `logs/`: Log files for debugging.
83
+ ### Technology Stack
84
+ - **Runtime**: Node.js & TypeScript.
85
+ - **State Management**: Local JSON files (No external database required).
86
+ - **API Integration**: Uses official SDKs (Google Generative AI) and standard REST APIs (OpenAI-compatible) via `node-fetch`.
87
+ - **Background Service**: A lightweight daemon process manages the message queue.
108
88
 
109
- ### How it works
110
- 1. **Input**: You send a message (Telegram/CLI).
111
- 2. **Queue**: The message is written to `queue/incoming/`.
112
- 3. **Processor**: The `queue-processor` picks it up.
113
- - It loads the **Active Session** history.
114
- - It checks **Token Limits**.
115
- - It sends context + message to **Gemini API**.
116
- 4. **Response**: Gemini's reply is saved to history and written to `queue/outgoing/`.
117
- 5. **Output**: The interface (Telegram/CLI) sends the reply back to you.
89
+ ### Why is it Safe?
90
+ 1. **Local Data**: All conversation history, sessions, and logs are stored **locally on your machine** in `~/.geniclaw/`. Your data never leaves your computer except to go directly to the AI provider.
91
+ 2. **Direct Connection**: GeniClaw connects **directly** to the AI APIs (Google, OpenAI, etc.). There is no "middleman" server collecting your data.
92
+ 3. **Open Source**: The code is transparent. You can inspect exactly how your keys and data are used.
93
+ 4. **Key Security**: API keys are stored in a local config file (`config.json`) on your machine.
118
94
 
119
95
  ---
120
96
 
121
- ## ⚠️ Things to Take Care Of
97
+ ## ⚠️ Important Notes
122
98
 
123
- 1. **API Costs**: While many Gemini models have a free tier, heavy usage (especially with large contexts) might incur costs if you are on a paid plan. Use `/stats` to monitor usage.
124
- 2. **Daemon**: The background process must be running to reply. If it stops, just run **Start Daemon** again.
125
- 3. **Privacy**: Your history is stored **locally** in plain text JSON files in `~/.geniclaw`. Keep your computer secure.
99
+ 1. **API Costs**: Using commercial APIs (OpenAI, Anthropic) is not free. Costs depend on your usage. Groq and Gemini (Free Tier) offer free options.
100
+ 2. **Privacy**: While GeniClaw is local, the AI Providers (Google, OpenAI, etc.) have their own data policies.
101
+ 3. **Daemon**: The background process must be running for GeniClaw to reply.
126
102
 
127
103
  ---
128
104