@loghead/core 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +38 -45
  2. package/bin/loghead +0 -0
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Loggerhead
1
+ # Loghead
2
2
 
3
- Loggerhead is a smart log aggregation tool and MCP server. It collects logs from various sources like your Terminal, Docker containers, or Browser, stores them in a database, and makes them searchable for AI assistants (like Claude, Cursor, or Windsurf).
3
+ Loghead is a smart log aggregation tool and MCP server. It collects logs from various sources like your Terminal, Docker containers, or Browser, stores them in a database, and makes them searchable for AI assistants (like Claude, Cursor, or Windsurf).
4
4
 
5
5
  Think of it as a "long-term memory" for your development logs that your AI coding agent can read.
6
6
 
@@ -11,22 +11,22 @@ Before you start, make sure you have:
11
11
  1. **Local Ollama**: [Download here](https://ollama.com/download).
12
12
  - Ensure it is running (`ollama serve`) and accessible at `http://localhost:11434`.
13
13
  - Pull the embedding model: `ollama pull qwen3-embedding:0.6b` (or similar).
14
- 2. **The Loggerhead Executable**: You can download the latest release or build it yourself (see below).
14
+ 2. **The Loghead Executable**: You can download the latest release or build it yourself (see below).
15
15
 
16
16
  _(Note: [Deno](https://docs.deno.com/runtime/fundamentals/installation/) is only required if you want to build the project from source.)_
17
17
 
18
18
  ## Setup Guide
19
19
 
20
- Follow these steps to get Loggerhead running on your machine.
20
+ Follow these steps to get Loghead running on your machine.
21
21
 
22
22
  ### 1. Install the Tool
23
23
 
24
- Download the `loggerhead` binary from the releases page and move it to a directory in your PATH (e.g., `/usr/local/bin`).
24
+ Download the `loghead` binary from the releases page and move it to a directory in your PATH (e.g., `/usr/local/bin`).
25
25
 
26
26
  **Verify installation:**
27
27
 
28
28
  ```bash
29
- loggerhead --help
29
+ loghead --help
30
30
  ```
31
31
 
32
32
  ### 2. Initialize the Database
@@ -34,17 +34,17 @@ loggerhead --help
34
34
  Run this command to set up the database tables (SQLite):
35
35
 
36
36
  ```bash
37
- loggerhead init
37
+ loghead init
38
38
  ```
39
39
 
40
40
  ## How to Use
41
41
 
42
42
  ### 1. Start the MCP Server
43
43
 
44
- This is the bridge that allows your AI editor to talk to Loggerhead.
44
+ This is the bridge that allows your AI editor to talk to Loghead.
45
45
 
46
46
  ```bash
47
- loggerhead start
47
+ loghead start
48
48
  ```
49
49
 
50
50
  You will see instructions on how to connect your specific AI tool (Claude, Cursor, VS Code, Windsurf) in the output.
@@ -52,8 +52,8 @@ You will see instructions on how to connect your specific AI tool (Claude, Curso
52
52
  **Example for Claude Desktop Config:**
53
53
 
54
54
  ```json
55
- "loggerhead": {
56
- "command": "loggerhead",
55
+ "loghead": {
56
+ "command": "loghead",
57
57
  "args": ["stdio"]
58
58
  }
59
59
  ```
@@ -63,40 +63,40 @@ You will see instructions on how to connect your specific AI tool (Claude, Curso
63
63
  Organize your logs into projects.
64
64
 
65
65
  ```bash
66
- loggerhead projects add "My Awesome App"
66
+ loghead projects add "My Awesome App"
67
67
  ```
68
68
 
69
69
  ### 3. Add a Log Stream
70
70
 
71
- A "stream" is a specific source of logs (e.g., your terminal output, or a specific Docker container). You need the Project ID from the previous step (use `loggerhead projects list` to see it).
71
+ A "stream" is a specific source of logs (e.g., your terminal output, or a specific Docker container). You need the Project ID from the previous step (use `loghead projects list` to see it).
72
72
 
73
73
  **Example: Creating a stream for Docker logs**
74
74
 
75
75
  ```bash
76
- loggerhead streams add docker --project <PROJECT_ID> --name "Backend API" --container my-api-container
76
+ loghead streams add docker --project <PROJECT_ID> --name "Backend API" --container my-api-container
77
77
  ```
78
78
 
79
79
  **Example: Creating a generic terminal stream**
80
80
 
81
81
  ```bash
82
- loggerhead streams add terminal --project <PROJECT_ID> --name "Build Logs"
82
+ loghead streams add terminal --project <PROJECT_ID> --name "Build Logs"
83
83
  ```
84
84
 
85
85
  ### 4. Ingest Logs
86
86
 
87
- Now, feed logs into the stream you created. You need the Stream ID (use `loggerhead streams list --project <PROJECT_ID>` to find it).
87
+ Now, feed logs into the stream you created. You need the Stream ID (use `loghead streams list --project <PROJECT_ID>` to find it).
88
88
 
89
89
  **From Standard Input (Manual):**
90
- You can pipe any command's output into Loggerhead:
90
+ You can pipe any command's output into Loghead:
91
91
 
92
92
  ```bash
93
- echo "Something happened" | loggerhead ingest --stream <STREAM_ID>
93
+ echo "Something happened" | loghead ingest --stream <STREAM_ID>
94
94
  ```
95
95
 
96
96
  Or run a script and capture its output:
97
97
 
98
98
  ```bash
99
- deno run my_script.ts | loggerhead ingest --stream <STREAM_ID>
99
+ deno run my_script.ts | loghead ingest --stream <STREAM_ID>
100
100
  ```
101
101
 
102
102
  ### 5. Query Logs (The AI Part)
@@ -109,37 +109,33 @@ Your AI assistant can now "call" tools to search these logs. It can ask things l
109
109
  You can also check logs manually:
110
110
 
111
111
  ```bash
112
- loggerhead log list --stream <STREAM_ID>
112
+ npx loghead log list --stream <STREAM_ID>
113
113
  ```
114
114
 
115
115
  ## Building from Source
116
116
 
117
- If you want to build the `loggerhead` executable yourself (e.g., to contribute or modify it):
117
+ If you want to build the `loghead` executable yourself (e.g., to contribute or modify it):
118
118
 
119
119
  1. Install **Deno** (see Prerequisites).
120
120
  2. Compile the tool into a single executable file in the `build` directory:
121
121
 
122
122
  ```bash
123
123
  mkdir -p build
124
- deno compile --allow-net --allow-read --allow-env --allow-run --allow-write --output build/loggerhead src/main.ts
124
+ deno task build
125
125
  ```
126
126
 
127
- 3. This will generate the `loggerhead` binary in your `build/` directory. You can add it to your PATH (see Setup Guide) or move it manually:
128
-
129
- ```bash
130
- sudo mv build/loggerhead /usr/local/bin/
131
- ```
127
+ 3. This will generate the `loghead` binary in your `packages/core/build/` directory.
132
128
 
133
129
  ## Architecture Overview
134
130
 
135
131
  - **Language:** TypeScript (Deno)
136
- - **Database:** SQLite with `sqlite-vec` via `@sqliteai/sqlite-wasm` for storing log embeddings.
137
- - **AI:** Local Ollama running `qwen3-embedding` to understand the semantic meaning of logs.
132
+ - **Database:** SQLite with `sqlite-vec` for storing log embeddings.
133
+ - **AI:** Local Ollama running `mxbai-embed-large` (or similar) to understand the semantic meaning of logs.
138
134
  - **Protocol:** Model Context Protocol (MCP) for integration with AI agents.
139
135
 
140
136
  ## Sample Apps
141
137
 
142
- We provide sample applications in the `sample_apps` directory to help you test Loggerhead's capabilities.
138
+ We provide sample applications in the `sample_apps` directory to help you test Loghead's capabilities.
143
139
 
144
140
  ### 1. CLI Calculator
145
141
 
@@ -149,14 +145,14 @@ A simple script that generates random logs and simulates a crash.
149
145
 
150
146
  1. Create a project and a stream:
151
147
  ```bash
152
- loggerhead projects add "Calculator App"
148
+ npx loghead projects add "Calculator App"
153
149
  # Copy Project ID
154
- loggerhead streams add terminal --project <PROJECT_ID> --name "CLI Output"
150
+ npx loghead streams add terminal --project <PROJECT_ID> --name "CLI Output"
155
151
  # Copy Stream ID
156
152
  ```
157
- 2. Run the calculator and pipe logs to Loggerhead:
153
+ 2. Run the calculator and pipe logs to Loghead:
158
154
  ```bash
159
- deno run sample_apps/cli_calculator/main.ts | loggerhead ingest --stream <STREAM_ID>
155
+ deno run sample_apps/cli_calculator/main.ts | npx @loghead/terminal --token <TOKEN>
160
156
  ```
161
157
  3. Ask your AI Agent: "Why did the calculator app crash?"
162
158
 
@@ -169,7 +165,7 @@ A Python worker process running in Docker that logs tasks and simulates occasion
169
165
  1. Create a stream for Docker:
170
166
  ```bash
171
167
  # Use existing Project ID
172
- loggerhead streams add docker --project <PROJECT_ID> --name "Worker Node" --container worker-app
168
+ npx loghead streams add docker --project <PROJECT_ID> --name "Worker Node" --container worker-app
173
169
  # Note the container name "worker-app" matches the --name in docker run below
174
170
  # Copy Stream ID
175
171
  ```
@@ -179,23 +175,20 @@ A Python worker process running in Docker that logs tasks and simulates occasion
179
175
  docker build -t docker-app .
180
176
  docker run --name worker-app -d docker-app
181
177
  ```
182
- 3. Attach Loggerhead to the container logs:
178
+ 3. Attach Loghead to the container logs:
183
179
  ```bash
184
- loggerhead attach --stream <STREAM_ID> --container worker-app
180
+ npx @loghead/docker --token <TOKEN> --container worker-app
185
181
  ```
186
182
  4. Ask your AI Agent: "What tasks is the worker processing?" or "Are there any performance warnings?"
187
183
 
188
184
  ### 3. Browser App
189
185
 
190
- A simple HTML/JS Calculator that logs actions to the browser console. This is designed to be used with a Browser Extension (coming soon) or manual copy-paste testing.
186
+ A simple HTML/JS Calculator that logs actions to the browser console.
191
187
 
192
188
  **How to test:**
193
189
 
194
190
  1. Open `sample_apps/browser_app/index.html` in your browser.
195
- 2. Open Developer Tools (Console).
196
- 3. Perform some calculations (try dividing by zero!).
197
- 4. (Manual) Copy the console logs and save them to a file `logs.txt`.
198
- 5. Ingest the file:
199
- ```bash
200
- cat logs.txt | loggerhead ingest --stream <STREAM_ID>
201
- ```
191
+ 2. Ensure the Loghead Chrome Extension is installed and connected to a browser stream.
192
+ 3. Open Developer Tools (Console).
193
+ 4. Perform some calculations (try dividing by zero!).
194
+ 5. Logs will automatically appear in your Loghead dashboard.
package/bin/loghead CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loghead/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Smart log aggregation tool and MCP server",
5
5
  "bin": {
6
6
  "loghead": "./bin/loghead"
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "git+https://github.com/onvo-ai/loggerhead.git"
27
+ "url": "git+https://github.com/onvo-ai/loghead.git"
28
28
  },
29
29
  "bugs": {
30
- "url": "https://github.com/onvo-ai/loggerhead/issues"
30
+ "url": "https://github.com/onvo-ai/loghead/issues"
31
31
  }
32
32
  }