studylens 0.1.1 → 0.1.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,118 +1,118 @@
1
- # StudyLens
2
-
3
- AI-powered deep study assistant. Paste notes, upload files, or provide URLs — StudyLens extracts knowledge points, organizes them for browsing, and generates topic pages with AI-driven Q&A.
4
-
5
- ## Features
6
-
7
- - **Multi-source ingestion** — text, PDF, DOCX, XLSX, and web URLs
8
- - **LLM-powered extraction** — automatically identifies knowledge points, tags, and relationships
9
- - **Knowledge graph** — visual force-directed graph of connected concepts
10
- - **Topic pages** — AI-generated study pages with version history
11
- - **Deep analysis** — drill down into any concept with AI-powered sub-topic expansion
12
- - **Smart Q&A** — ask questions about your knowledge base with context-aware answers
13
- - **Timeline & category views** — browse knowledge by time or subject
14
- - **Export** — single-page HTML export with print-optimized CSS
15
- - **Granularity control** — limit max knowledge points per ingestion for high-level summaries
16
- - **Multi-provider LLM** — supports OpenAI-compatible APIs, Ollama, and custom endpoints
17
-
18
- ## Install
19
-
20
- ```bash
21
- npm install -g studylens
22
- studylens
23
- ```
24
-
25
- Open `http://localhost:3000` — on first launch the Settings panel opens automatically to guide you through LLM setup.
26
-
27
- Data is stored in `./studylens-data/` in the current directory. Set `STUDYLENS_DATA_DIR` to change the location.
28
-
29
- ## Quick Start (Development)
30
-
31
- ```bash
32
- npm run setup # Install dependencies (server + portal)
33
- npm run dev # Start server (port 3000) + dev portal (port 3001)
34
- ```
35
-
36
- Open `http://localhost:3001` for development (hot-reload, recommended).
37
-
38
- Port 3000 serves the production build — run `npm run build` first to generate `portal/dist/`, otherwise it will only serve the API.
39
-
40
- ## LLM Configuration
41
-
42
- StudyLens requires an LLM backend. On first launch the Settings panel opens automatically to guide you through setup. Three options:
43
-
44
- ### Option A: Agent Maestro (recommended for GitHub Copilot users)
45
-
46
- Zero API key needed — uses your existing Copilot subscription via VS Code.
47
-
48
- 1. Install the [Agent Maestro](https://marketplace.visualstudio.com/items?itemName=Joouis.agent-maestro) VS Code extension
49
- 2. It starts a local proxy at `http://localhost:23333`
50
- 3. In StudyLens settings, enable `agent-maestro` and test the connection
51
-
52
- ### Option B: OpenAI-compatible API
53
-
54
- Works with OpenAI, Azure OpenAI, DeepSeek, or any compatible endpoint.
55
-
56
- 1. In StudyLens settings, enable `openai-compatible`
57
- 2. Set `baseUrl` (default: `https://api.openai.com/v1`), `apiKey`, and `model`
58
-
59
- ### Option C: Ollama (fully local, free)
60
-
61
- Run models locally with no API key or internet required.
62
-
63
- 1. Install [Ollama](https://ollama.com) and pull a model: `ollama pull llama3.2`
64
- 2. In StudyLens settings, enable `ollama` (default URL: `http://localhost:11434`)
65
-
66
- Configuration is stored in `wiki/config/llm-config.json`. A template is at `config/llm-config.template.json`.
67
-
68
- ## Project Structure
69
-
70
- ```
71
- StudyLens/
72
- ├── server/ # Express API server
73
- │ └── index.js
74
- ├── core/ # Business logic
75
- │ ├── extractor.js # Knowledge extraction prompts
76
- │ ├── llm-provider.js # Multi-provider LLM client
77
- │ └── wiki-storage.js # Markdown-based file storage
78
- ├── portal/ # React frontend (Vite)
79
- │ └── src/
80
- │ ├── components/ # UI components
81
- │ └── lib/ # Shared utilities
82
- ├── config/ # Configuration templates
83
- ├── e2e/ # Playwright E2E tests
84
- ├── tests/ # API integration tests
85
- ├── scripts/ # Utility scripts
86
- └── docs/ # User & developer guides
87
- ```
88
-
89
- ## Data Storage
90
-
91
- All data is stored as Markdown files in the `wiki/` directory (gitignored by default):
92
-
93
- - `wiki/entries/` — knowledge point Markdown files with YAML frontmatter
94
- - `wiki/topic-pages/` — generated topic page HTML
95
- - `wiki/index/` — JSON indexes for fast lookup
96
- - `wiki/config/` — runtime configuration
97
-
98
- ## Testing
99
-
100
- ```bash
101
- npm test # Unit tests (API + portal)
102
- npm run test:e2e # Playwright E2E tests
103
- npm run test:api # API tests only
104
- npm run test:portal # Portal component tests only
105
- ```
106
-
107
- ## Scripts
108
-
109
- ```bash
110
- npm run server # Start API server only (port 3000)
111
- npm run portal # Start Vite dev server only (port 3001)
112
- npm run dev # Start both concurrently
113
- npm run setup # Install all dependencies
114
- ```
115
-
116
- ## License
117
-
118
- MIT
1
+ # StudyLens
2
+
3
+ AI-powered deep study assistant. Paste notes, upload files, or provide URLs — StudyLens extracts knowledge points, organizes them for browsing, and generates topic pages with AI-driven Q&A.
4
+
5
+ ## Features
6
+
7
+ - **Multi-source ingestion** — text, PDF, DOCX, XLSX, and web URLs
8
+ - **LLM-powered extraction** — automatically identifies knowledge points, tags, and relationships
9
+ - **Knowledge graph** — visual force-directed graph of connected concepts
10
+ - **Topic pages** — AI-generated study pages with version history
11
+ - **Deep analysis** — drill down into any concept with AI-powered sub-topic expansion
12
+ - **Smart Q&A** — ask questions about your knowledge base with context-aware answers
13
+ - **Timeline & category views** — browse knowledge by time or subject
14
+ - **Export** — single-page HTML export with print-optimized CSS
15
+ - **Granularity control** — limit max knowledge points per ingestion for high-level summaries
16
+ - **Multi-provider LLM** — supports OpenAI-compatible APIs, Ollama, and custom endpoints
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ npm install -g studylens
22
+ studylens
23
+ ```
24
+
25
+ Open `http://localhost:3000` — on first launch the Settings panel opens automatically to guide you through LLM setup.
26
+
27
+ Data is stored in `./studylens-data/` in the current directory. Set `STUDYLENS_DATA_DIR` to change the location.
28
+
29
+ ## Quick Start (Development)
30
+
31
+ ```bash
32
+ npm run setup # Install dependencies (server + portal)
33
+ npm run dev # Start server (port 3000) + dev portal (port 3001)
34
+ ```
35
+
36
+ Open `http://localhost:3001` for development (hot-reload, recommended).
37
+
38
+ Port 3000 serves the production build — run `npm run build` first to generate `portal/dist/`, otherwise it will only serve the API.
39
+
40
+ ## LLM Configuration
41
+
42
+ StudyLens requires an LLM backend. On first launch the Settings panel opens automatically to guide you through setup. Three options:
43
+
44
+ ### Option A: Agent Maestro (recommended for GitHub Copilot users)
45
+
46
+ Zero API key needed — uses your existing Copilot subscription via VS Code.
47
+
48
+ 1. Install the [Agent Maestro](https://marketplace.visualstudio.com/items?itemName=Joouis.agent-maestro) VS Code extension
49
+ 2. It starts a local proxy at `http://localhost:23333`
50
+ 3. In StudyLens settings, enable `agent-maestro` and test the connection
51
+
52
+ ### Option B: OpenAI-compatible API
53
+
54
+ Works with OpenAI, Azure OpenAI, DeepSeek, or any compatible endpoint.
55
+
56
+ 1. In StudyLens settings, enable `openai-compatible`
57
+ 2. Set `baseUrl` (default: `https://api.openai.com/v1`), `apiKey`, and `model`
58
+
59
+ ### Option C: Ollama (fully local, free)
60
+
61
+ Run models locally with no API key or internet required.
62
+
63
+ 1. Install [Ollama](https://ollama.com) and pull a model: `ollama pull llama3.2`
64
+ 2. In StudyLens settings, enable `ollama` (default URL: `http://localhost:11434`)
65
+
66
+ Configuration is stored in `wiki/config/llm-config.json`. A template is at `config/llm-config.template.json`.
67
+
68
+ ## Project Structure
69
+
70
+ ```
71
+ StudyLens/
72
+ ├── server/ # Express API server
73
+ │ └── index.js
74
+ ├── core/ # Business logic
75
+ │ ├── extractor.js # Knowledge extraction prompts
76
+ │ ├── llm-provider.js # Multi-provider LLM client
77
+ │ └── wiki-storage.js # Markdown-based file storage
78
+ ├── portal/ # React frontend (Vite)
79
+ │ └── src/
80
+ │ ├── components/ # UI components
81
+ │ └── lib/ # Shared utilities
82
+ ├── config/ # Configuration templates
83
+ ├── e2e/ # Playwright E2E tests
84
+ ├── tests/ # API integration tests
85
+ ├── scripts/ # Utility scripts
86
+ └── docs/ # User & developer guides
87
+ ```
88
+
89
+ ## Data Storage
90
+
91
+ All data is stored as Markdown files in the `wiki/` directory (gitignored by default):
92
+
93
+ - `wiki/entries/` — knowledge point Markdown files with YAML frontmatter
94
+ - `wiki/topic-pages/` — generated topic page HTML
95
+ - `wiki/index/` — JSON indexes for fast lookup
96
+ - `wiki/config/` — runtime configuration
97
+
98
+ ## Testing
99
+
100
+ ```bash
101
+ npm test # Unit tests (API + portal)
102
+ npm run test:e2e # Playwright E2E tests
103
+ npm run test:api # API tests only
104
+ npm run test:portal # Portal component tests only
105
+ ```
106
+
107
+ ## Scripts
108
+
109
+ ```bash
110
+ npm run server # Start API server only (port 3000)
111
+ npm run portal # Start Vite dev server only (port 3001)
112
+ npm run dev # Start both concurrently
113
+ npm run setup # Install all dependencies
114
+ ```
115
+
116
+ ## License
117
+
118
+ MIT
package/bin/studylens.js CHANGED
@@ -1,7 +1,7 @@
1
- #!/usr/bin/env node
2
- const path = require('path');
3
- const dataDir = process.env.STUDYLENS_DATA_DIR || path.join(process.cwd(), 'studylens-data');
4
- process.env.STUDYLENS_WIKI_DIR = process.env.STUDYLENS_WIKI_DIR || dataDir;
5
- const app = require('../server/index.js');
6
- const PORT = process.env.PORT || 3000;
7
- app.listen(PORT, () => console.log(`StudyLens server running on http://localhost:${PORT}`));
1
+ #!/usr/bin/env node
2
+ const path = require('path');
3
+ const dataDir = process.env.STUDYLENS_DATA_DIR || path.join(process.cwd(), 'studylens-data');
4
+ process.env.STUDYLENS_WIKI_DIR = process.env.STUDYLENS_WIKI_DIR || dataDir;
5
+ const app = require('../server/index.js');
6
+ const PORT = process.env.PORT || 3000;
7
+ app.listen(PORT, () => console.log(`StudyLens server running on http://localhost:${PORT}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studylens",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "AI-powered deep study assistant — turn notes into structured knowledge",
5
5
  "license": "MIT",
6
6
  "repository": {