studylens 0.1.0 → 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,107 +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
- ## Quick Start
19
-
20
- ```bash
21
- npm run setup # Install dependencies (server + portal)
22
- npm run dev # Start server (port 3000) + dev portal (port 3001)
23
- ```
24
-
25
- Open `http://localhost:3001` for development (hot-reload, recommended).
26
-
27
- Port 3000 serves the production build run `npm run build` first to generate `portal/dist/`, otherwise it will only serve the API.
28
-
29
- ## LLM Configuration
30
-
31
- StudyLens requires an LLM backend. On first launch the Settings panel opens automatically to guide you through setup. Three options:
32
-
33
- ### Option A: Agent Maestro (recommended for GitHub Copilot users)
34
-
35
- Zero API key needed — uses your existing Copilot subscription via VS Code.
36
-
37
- 1. Install the [Agent Maestro](https://marketplace.visualstudio.com/items?itemName=Joouis.agent-maestro) VS Code extension
38
- 2. It starts a local proxy at `http://localhost:23333`
39
- 3. In StudyLens settings, enable `agent-maestro` and test the connection
40
-
41
- ### Option B: OpenAI-compatible API
42
-
43
- Works with OpenAI, Azure OpenAI, DeepSeek, or any compatible endpoint.
44
-
45
- 1. In StudyLens settings, enable `openai-compatible`
46
- 2. Set `baseUrl` (default: `https://api.openai.com/v1`), `apiKey`, and `model`
47
-
48
- ### Option C: Ollama (fully local, free)
49
-
50
- Run models locally with no API key or internet required.
51
-
52
- 1. Install [Ollama](https://ollama.com) and pull a model: `ollama pull llama3.2`
53
- 2. In StudyLens settings, enable `ollama` (default URL: `http://localhost:11434`)
54
-
55
- Configuration is stored in `wiki/config/llm-config.json`. A template is at `config/llm-config.template.json`.
56
-
57
- ## Project Structure
58
-
59
- ```
60
- StudyLens/
61
- ├── server/ # Express API server
62
- │ └── index.js
63
- ├── core/ # Business logic
64
- │ ├── extractor.js # Knowledge extraction prompts
65
- │ ├── llm-provider.js # Multi-provider LLM client
66
- │ └── wiki-storage.js # Markdown-based file storage
67
- ├── portal/ # React frontend (Vite)
68
- │ └── src/
69
- │ ├── components/ # UI components
70
- │ └── lib/ # Shared utilities
71
- ├── config/ # Configuration templates
72
- ├── e2e/ # Playwright E2E tests
73
- ├── tests/ # API integration tests
74
- ├── scripts/ # Utility scripts
75
- └── docs/ # User & developer guides
76
- ```
77
-
78
- ## Data Storage
79
-
80
- All data is stored as Markdown files in the `wiki/` directory (gitignored by default):
81
-
82
- - `wiki/entries/` knowledge point Markdown files with YAML frontmatter
83
- - `wiki/topic-pages/` generated topic page HTML
84
- - `wiki/index/` JSON indexes for fast lookup
85
- - `wiki/config/` runtime configuration
86
-
87
- ## Testing
88
-
89
- ```bash
90
- npm test # Unit tests (API + portal)
91
- npm run test:e2e # Playwright E2E tests
92
- npm run test:api # API tests only
93
- npm run test:portal # Portal component tests only
94
- ```
95
-
96
- ## Scripts
97
-
98
- ```bash
99
- npm run server # Start API server only (port 3000)
100
- npm run portal # Start Vite dev server only (port 3001)
101
- npm run dev # Start both concurrently
102
- npm run setup # Install all dependencies
103
- ```
104
-
105
- ## License
106
-
107
- 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,5 +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
- require('../server/index.js');
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,13 +1,20 @@
1
1
  {
2
2
  "name": "studylens",
3
- "version": "0.1.0",
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": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/cdlliuy/studygraph.git"
9
9
  },
10
- "keywords": ["study", "learning", "llm", "ai", "education", "knowledge"],
10
+ "keywords": [
11
+ "study",
12
+ "learning",
13
+ "llm",
14
+ "ai",
15
+ "education",
16
+ "knowledge"
17
+ ],
11
18
  "main": "server/index.js",
12
19
  "bin": {
13
20
  "studylens": "./bin/studylens.js"