Skip to content

Commit 1a7d7cf

Browse files
sungmanchclaude
andcommitted
docs: update README for tool-agnostic framing and accurate project structure
Remove Anthropic-specific branding, add supported tools table, fix Gemini model version (2.5 → 3 Flash), update project structure to match actual directories, add missing env vars, remove dead doc link. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f8098b2 commit 1a7d7cf

2 files changed

Lines changed: 172 additions & 53 deletions

File tree

.env.example

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# NoMoreAISlop Environment Variables
1+
# BetterPrompt Environment Variables
22
# Copy this file to .env and fill in your values
33

44
# Required: Gemini key for the local analysis pipeline
55
GOOGLE_GEMINI_API_KEY=your-gemini-api-key-here
66

77
# Optional: local server configuration
8-
# NOSLOP_TELEMETRY=false
9-
# NOSLOP_BASE_URL=http://localhost:3000
10-
# NOSLOP_WEB_APP_URL=http://localhost:3000
11-
# NOSLOP_DB_PATH=~/.nomoreaislop/nomoreaislop.db
8+
# BETTERPROMPT_BASE_URL=http://localhost:3000
9+
# BETTERPROMPT_WEB_APP_URL=http://localhost:3000
10+
# BETTERPROMPT_DB_PATH=~/.betterprompt/betterprompt.db
11+
# BETTERPROMPT_TELEMETRY=false
12+
# BETTERPROMPT_DEBUG=1

README.md

Lines changed: 166 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,51 @@
1-
# NoMoreAISlop
1+
# BetterPrompt
22

3-
> Self-hosted AI session analysis with a local-first CLI and Next.js server.
3+
> Self-hosted AI coding session analysis. Reads your local session logs, runs them through a multi-phase Gemini pipeline, and generates reports on thinking patterns, communication quality, token efficiency, and more.
44
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66
[![Node.js 18+](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org/)
77
[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue)](https://www.typescriptlang.org/)
88

9-
## Overview
9+
**How it works:** BetterPrompt is a local Next.js server paired with a CLI tool. The CLI scans your AI coding sessions, sends them to the server for multi-phase Gemini analysis, and generates detailed reports. For teams, individual reports aggregate into enterprise dashboards with growth tracking and anti-pattern detection.
1010

11-
NoMoreAISlop analyzes your Claude Code and Cursor sessions, runs the Gemini-powered report pipeline on your own server, and stores auth, reports, and knowledge data locally.
11+
Everything runs on your machine. Session data never leaves your network.
1212

13-
The open-source product surface is now:
13+
**Supported AI coding tools:**
1414

15-
- `Next.js server` for auth, report pages, knowledge APIs, and local analysis execution
16-
- `CLI` for local session discovery, device login, and analysis uploads to your self-hosted server
17-
- `SQLite + local files` for persistence
15+
| Tool | Session Source | Format |
16+
|------|---------------|--------|
17+
| Claude Code | `~/.claude/projects/` | JSONL |
18+
| Cursor | `~/.cursor/chats/` | SQLite |
1819

19-
The repository now ships only the self-hosted server + CLI runtime.
20+
## Screenshots
2021

21-
## Quick Start
22+
| Team Dashboard | Growth Areas | Project Breakdown |
23+
|:-:|:-:|:-:|
24+
| ![Team Dashboard](images/team_dashboard.png) | ![Growth Areas](images/team_problem.png) | ![Projects](images/team_projects.png) |
25+
26+
## Prerequisites
27+
28+
- [Node.js 18+](https://nodejs.org/)
29+
- A [Google Gemini API key](https://aistudio.google.com/apikey) (free tier works - the pipeline uses Gemini 3 Flash)
30+
- Existing AI coding sessions from a supported tool (see table above)
31+
32+
> **No sessions yet?** Use an AI coding assistant for a few sessions first. BetterPrompt needs session logs to analyze - without them, the CLI will have nothing to scan.
33+
34+
## Getting Started
35+
36+
### 1. Start the server
2237

2338
```bash
24-
git clone https://github.com/nomoreaislop/nomoreaislop.git
25-
cd nomoreaislop
39+
git clone https://github.com/onlycastle/BetterPrompt.git
40+
cd BetterPrompt
2641
npm install
2742
cp .env.example .env
2843
```
2944

30-
Required environment:
45+
Add your Gemini API key to `.env`:
3146

3247
```env
33-
GOOGLE_GEMINI_API_KEY=your-gemini-api-key
34-
NOSLOP_BASE_URL=http://localhost:3000
35-
NOSLOP_WEB_APP_URL=http://localhost:3000
48+
GOOGLE_GEMINI_API_KEY=your-key-here
3649
```
3750

3851
Start the server:
@@ -41,59 +54,164 @@ Start the server:
4154
npm run dev
4255
```
4356

44-
In another terminal, authenticate the CLI and run an analysis:
57+
### 2. Run the CLI
58+
59+
In a separate terminal:
4560

4661
```bash
47-
npx no-ai-slop
62+
npx betterprompt
4863
```
4964

50-
The CLI will open the device auth flow at your self-hosted server, then upload pre-parsed session data to `POST /api/analysis/run`.
65+
The CLI discovers sessions from your AI coding tools, lets you pick a project, and uploads parsed session data to your local server for analysis.
5166

52-
## What Is Local
67+
### 3. View your report
5368

54-
- Web auth uses local email/password accounts stored in SQLite.
55-
- CLI auth uses device flow plus long-lived local CLI tokens.
56-
- Analysis runs inside the Next.js server with your Gemini API key.
57-
- Reports are stored in SQLite.
58-
- Knowledge items are stored under `~/.nomoreaislop/knowledge`.
69+
When analysis completes, the CLI opens your browser to `http://localhost:3000/dashboard/r/{resultId}` with your full report: personality type, strengths, growth areas, and domain-level insights.
5970

60-
## Current Scope
71+
## Packages
6172

62-
- Supported product path: `self-hosted server + CLI`
63-
- Public report pages: `GET /r/:resultId`
64-
- Knowledge dashboard: local file-backed APIs
73+
This is a monorepo with three packages:
6574

66-
## Commands
75+
### Web Server (root)
76+
77+
Next.js 15 app with the dashboard UI, API routes, and the Gemini analysis pipeline.
6778

6879
```bash
69-
npm run dev
80+
npm run dev # Dev server on port 3000
81+
npm run build # Production build
82+
npm run typecheck # Type-check without emitting
83+
```
84+
85+
### CLI (`packages/cli`)
86+
87+
Scans session logs from supported AI coding tools, lets you pick a project, and uploads parsed data to your local server for analysis.
88+
89+
```bash
90+
npx betterprompt
91+
```
92+
93+
Published to npm as `betterprompt`. In development, run from the monorepo:
94+
95+
```bash
96+
cd packages/cli
7097
npm run build
71-
npm run start
72-
npm run typecheck
73-
npm test
98+
node dist/index.js
7499
```
75100

76-
## Project Structure
101+
### Plugin (`packages/plugin`)
102+
103+
Claude Code plugin that provides an MCP server and a post-session hook. After each coding session, it automatically triggers analysis in the background and exposes insights via three MCP tools:
104+
105+
| Tool | Description |
106+
|------|-------------|
107+
| `get_developer_profile` | Profile type, scores, personality summary |
108+
| `get_growth_areas` | Growth areas with optional domain filter |
109+
| `get_recent_insights` | Strengths, anti-patterns, KPT retrospective |
110+
111+
#### Installing the Plugin
112+
113+
1. Build the plugin:
114+
115+
```bash
116+
cd packages/plugin
117+
npm install
118+
npm run build
119+
```
120+
121+
2. Add the MCP server to your Claude Code settings (`~/.claude/settings.json`):
122+
123+
```json
124+
{
125+
"mcpServers": {
126+
"betterprompt": {
127+
"command": "node",
128+
"args": ["/absolute/path/to/BetterPrompt/packages/plugin/dist/mcp/server.js"],
129+
"env": {
130+
"BETTERPROMPT_SERVER_URL": "http://localhost:3000"
131+
}
132+
}
133+
}
134+
}
135+
```
77136

78-
```text
79-
app/ Next.js app router, web UI, local API routes
80-
packages/cli/ CLI for scan + login + upload
81-
src/lib/analyzer/ Gemini analysis pipeline
82-
src/lib/local/ SQLite auth and report persistence
83-
src/lib/search-agent/storage/knowledge-store.ts
84-
scripts/ local utilities and test fixtures
137+
3. The post-session hook auto-triggers analysis after enough sessions accumulate. See [Plugin docs](./docs/human/PLUGIN.md) for configuration options.
138+
139+
## Testing
140+
141+
Tests use [Vitest](https://vitest.dev/) for unit/integration and [Playwright](https://playwright.dev/) for E2E.
142+
143+
```bash
144+
npm test # Unit tests
145+
npm run test:watch # Watch mode
146+
npm run test:coverage # Coverage report (threshold: 50%)
147+
npm run test:integration # Full pipeline integration test
85148
```
86149

87-
## Open Source Publication
150+
E2E tests (requires dev server or auto-starts one):
88151

89-
Before making the repository public, complete the history purge and key rotation steps in [docs/human/OPEN_SOURCE_PUBLICATION.md](./docs/human/OPEN_SOURCE_PUBLICATION.md).
152+
```bash
153+
npx playwright test --config tests/e2e/playwright.config.ts
154+
```
155+
156+
Test structure:
157+
158+
```
159+
tests/
160+
unit/ # Analyzer stages, workers, models, CLI, search agent
161+
e2e/ # Playwright browser tests (report rendering, scroll nav)
162+
integration.test.ts # Full pipeline: session parsing -> multi-phase analysis
163+
fixtures/ # Real session logs and evaluation data
164+
```
165+
166+
## Environment Variables
167+
168+
| Variable | Required | Default | Description |
169+
|----------|----------|---------|-------------|
170+
| `GOOGLE_GEMINI_API_KEY` | Yes | - | Gemini API key ([get one here](https://aistudio.google.com/apikey)) |
171+
| `BETTERPROMPT_BASE_URL` | No | `http://localhost:3000` | Server URL for metadata and OpenGraph |
172+
| `BETTERPROMPT_WEB_APP_URL` | No | `http://localhost:3000` | Web app URL for CLI report links |
173+
| `BETTERPROMPT_DB_PATH` | No | `~/.betterprompt/betterprompt.db` | SQLite database path |
174+
| `BETTERPROMPT_TELEMETRY` | No | `true` | Enable/disable anonymous usage telemetry |
175+
| `BETTERPROMPT_DEBUG` | No | `false` | Enable verbose debug logging (`1` to enable) |
176+
177+
## Project Structure
178+
179+
```
180+
app/ Next.js app router - pages, API routes, layouts
181+
packages/cli/ CLI for session discovery and upload
182+
packages/plugin/ MCP server plugin + post-session hook
183+
src/
184+
components/ React components
185+
dashboard/ Dashboard layout and navigation
186+
enterprise/ Team and org-level views
187+
landing/ Landing page sections
188+
personal/ Individual report tabs and insights
189+
report/ Shared report UI (terminal window, share, footer)
190+
knowledge/ Knowledge base UI
191+
ui/ Reusable UI primitives
192+
lib/
193+
analyzer/ Gemini-powered multi-phase analysis pipeline
194+
domain/ Domain models (config, knowledge, user, sharing)
195+
enterprise/ Team aggregation and enterprise features
196+
local/ SQLite persistence (auth, reports, teams)
197+
models/ Zod schemas and TypeScript types
198+
parser/ JSONL session log parser
199+
search-agent/ Knowledge search and curation engine
200+
config/ App configuration management
201+
utils/ Shared utilities (storage, local analysis)
202+
views/ Page-level view components
203+
scripts/ Development utilities and test helpers
204+
docs/ Architecture and deployment documentation
205+
tests/ Unit, integration, and E2E test suites
206+
```
90207

91208
## Documentation
92209

93-
- [CONTRIBUTING.md](./CONTRIBUTING.md)
94-
- [SECURITY.md](./SECURITY.md)
95-
- [docs/human/OPEN_SOURCE_PUBLICATION.md](./docs/human/OPEN_SOURCE_PUBLICATION.md)
210+
- [Architecture](./docs/human/ARCHITECTURE.md) - system design and pipeline overview
211+
- [Plugin](./docs/human/PLUGIN.md) - plugin setup and MCP tools
212+
- [User Flows](./docs/human/USER-FLOWS.md) - employee and manager workflows
213+
- [Contributing](./CONTRIBUTING.md)
96214

97215
## License
98216

99-
MIT. See [LICENSE](./LICENSE).
217+
MIT - see [LICENSE](./LICENSE).

0 commit comments

Comments
 (0)