weft-graph 1.0.0__tar.gz
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.
- weft_graph-1.0.0/PKG-INFO +175 -0
- weft_graph-1.0.0/README.md +143 -0
- weft_graph-1.0.0/pyproject.toml +50 -0
- weft_graph-1.0.0/setup.cfg +4 -0
- weft_graph-1.0.0/weft/__init__.py +3 -0
- weft_graph-1.0.0/weft/__main__.py +6 -0
- weft_graph-1.0.0/weft/cli.py +372 -0
- weft_graph-1.0.0/weft/export/__init__.py +1 -0
- weft_graph-1.0.0/weft/export/browser.py +156 -0
- weft_graph-1.0.0/weft/export/cache.py +38 -0
- weft_graph-1.0.0/weft/export/crawl.py +55 -0
- weft_graph-1.0.0/weft/export/graph.py +413 -0
- weft_graph-1.0.0/weft/export/llm.py +86 -0
- weft_graph-1.0.0/weft/export/similarity.py +261 -0
- weft_graph-1.0.0/weft/tui/__init__.py +1 -0
- weft_graph-1.0.0/weft/tui/app.py +674 -0
- weft_graph-1.0.0/weft/utils/__init__.py +1 -0
- weft_graph-1.0.0/weft/utils/text.py +78 -0
- weft_graph-1.0.0/weft/utils/url.py +92 -0
- weft_graph-1.0.0/weft_graph.egg-info/PKG-INFO +175 -0
- weft_graph-1.0.0/weft_graph.egg-info/SOURCES.txt +23 -0
- weft_graph-1.0.0/weft_graph.egg-info/dependency_links.txt +1 -0
- weft_graph-1.0.0/weft_graph.egg-info/entry_points.txt +2 -0
- weft_graph-1.0.0/weft_graph.egg-info/requires.txt +10 -0
- weft_graph-1.0.0/weft_graph.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: weft-graph
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A local-first knowledge graph for your browsing
|
|
5
|
+
Author: Weft Contributors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Avi-141/weft
|
|
8
|
+
Project-URL: Repository, https://github.com/Avi-141/weft
|
|
9
|
+
Keywords: knowledge-graph,browsing,llm,clustering,tui,semantic-search,local-first,second-brain
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: requests
|
|
25
|
+
Requires-Dist: trafilatura
|
|
26
|
+
Requires-Dist: rich
|
|
27
|
+
Requires-Dist: textual
|
|
28
|
+
Provides-Extra: firefox
|
|
29
|
+
Requires-Dist: lz4; extra == "firefox"
|
|
30
|
+
Provides-Extra: js
|
|
31
|
+
Requires-Dist: playwright; extra == "js"
|
|
32
|
+
|
|
33
|
+
# Weft
|
|
34
|
+
|
|
35
|
+
A local-first knowledge graph for your browsing.
|
|
36
|
+
|
|
37
|
+
Weft turns your browser tabs into a searchable, clustered knowledge graph. Instead of drowning in hundreds of tabs or flat bookmark lists, Weft groups related pages, removes duplicates, and lets you explore your browsing context using a fast terminal UI.
|
|
38
|
+
|
|
39
|
+
**Think:** Obsidian graph view, but for the web you already opened.
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
## Why Weft?
|
|
44
|
+
|
|
45
|
+
| Tool | What it does |
|
|
46
|
+
|------|--------------|
|
|
47
|
+
| OneTab | Saves links in a flat list |
|
|
48
|
+
| Bookmarks | Folders you'll never organize |
|
|
49
|
+
| **Weft** | Builds memory from your browsing |
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
- **Knowledge Graph** - Pages connected by semantic similarity, not folders
|
|
54
|
+
- **Automatic Clustering** - Groups related content by meaning and domain
|
|
55
|
+
- **Near-Duplicate Detection** - SimHash identifies similar pages across sites
|
|
56
|
+
- **Smart Search** - Fuzzy text, keyword (`#topic`), and domain (`@site`) filters
|
|
57
|
+
- **Graph Explorer** - Navigate neighbors, discover related content
|
|
58
|
+
- **Optional LLM Summaries** - Local AI via Ollama for richer understanding
|
|
59
|
+
- **Fully Local** - Your data never leaves your machine
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install weft
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or from source:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
git clone https://github.com/yourusername/weft.git
|
|
71
|
+
cd weft
|
|
72
|
+
pip install -e .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Quick Start
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Build knowledge graph from your browser tabs
|
|
79
|
+
weft weave
|
|
80
|
+
|
|
81
|
+
# Explore in terminal UI
|
|
82
|
+
weft explore
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Commands
|
|
86
|
+
|
|
87
|
+
### `weft weave`
|
|
88
|
+
|
|
89
|
+
Extracts tabs from browsers and weaves them into a knowledge graph.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# From all browsers (default)
|
|
93
|
+
weft weave
|
|
94
|
+
|
|
95
|
+
# Chrome only
|
|
96
|
+
weft weave --browser chrome
|
|
97
|
+
|
|
98
|
+
# Firefox only
|
|
99
|
+
weft weave --browser firefox
|
|
100
|
+
|
|
101
|
+
# With LLM summaries (requires Ollama)
|
|
102
|
+
weft weave --summarize
|
|
103
|
+
|
|
104
|
+
# Fast mode (tab titles only, no crawling)
|
|
105
|
+
weft weave --no-crawl
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `weft explore`
|
|
109
|
+
|
|
110
|
+
Interactive TUI for exploring your knowledge graph.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Default graph
|
|
114
|
+
weft explore
|
|
115
|
+
|
|
116
|
+
# Specific file
|
|
117
|
+
weft explore my_graph.json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Keyboard Shortcuts
|
|
121
|
+
|
|
122
|
+
| Key | Action |
|
|
123
|
+
|-----|--------|
|
|
124
|
+
| `[` / `]` | Navigate groups |
|
|
125
|
+
| `{` / `}` | Navigate tabs in group |
|
|
126
|
+
| `o` | Open tab in browser |
|
|
127
|
+
| `g` | Open all tabs in group |
|
|
128
|
+
| `v` | Switch to graph view |
|
|
129
|
+
| `s` | Focus search |
|
|
130
|
+
| `q` | Quit |
|
|
131
|
+
|
|
132
|
+
**Search syntax:**
|
|
133
|
+
- Fuzzy: `distributed systems`
|
|
134
|
+
- Keyword: `#performance`
|
|
135
|
+
- Domain: `@github`
|
|
136
|
+
|
|
137
|
+
## How It Works
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Tabs → Extract → Cluster → Graph → Explore
|
|
141
|
+
│ │ │
|
|
142
|
+
▼ ▼ ▼
|
|
143
|
+
Keywords SimHash Similarity
|
|
144
|
+
TF-IDF Dedup Matrix
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
1. **Extract** - Pulls tabs from Chrome/Firefox, optionally crawls page content
|
|
148
|
+
2. **Cluster** - Groups by semantic similarity + domain affinity
|
|
149
|
+
3. **Deduplicate** - SimHash finds near-identical content across domains
|
|
150
|
+
4. **Graph** - Builds similarity edges between related pages
|
|
151
|
+
5. **Explore** - Fast TUI for search, navigation, and discovery
|
|
152
|
+
|
|
153
|
+
## Requirements
|
|
154
|
+
|
|
155
|
+
- Python 3.9+
|
|
156
|
+
- macOS (browser export uses AppleScript)
|
|
157
|
+
- Chrome and/or Firefox
|
|
158
|
+
|
|
159
|
+
### Optional: LLM Summaries
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Install Ollama
|
|
163
|
+
brew install ollama
|
|
164
|
+
|
|
165
|
+
# Pull models
|
|
166
|
+
ollama pull llama3.1:8b
|
|
167
|
+
ollama pull nomic-embed-text
|
|
168
|
+
|
|
169
|
+
# Use with summarization
|
|
170
|
+
weft weave --summarize
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## License
|
|
174
|
+
|
|
175
|
+
MIT
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Weft
|
|
2
|
+
|
|
3
|
+
A local-first knowledge graph for your browsing.
|
|
4
|
+
|
|
5
|
+
Weft turns your browser tabs into a searchable, clustered knowledge graph. Instead of drowning in hundreds of tabs or flat bookmark lists, Weft groups related pages, removes duplicates, and lets you explore your browsing context using a fast terminal UI.
|
|
6
|
+
|
|
7
|
+
**Think:** Obsidian graph view, but for the web you already opened.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## Why Weft?
|
|
12
|
+
|
|
13
|
+
| Tool | What it does |
|
|
14
|
+
|------|--------------|
|
|
15
|
+
| OneTab | Saves links in a flat list |
|
|
16
|
+
| Bookmarks | Folders you'll never organize |
|
|
17
|
+
| **Weft** | Builds memory from your browsing |
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- **Knowledge Graph** - Pages connected by semantic similarity, not folders
|
|
22
|
+
- **Automatic Clustering** - Groups related content by meaning and domain
|
|
23
|
+
- **Near-Duplicate Detection** - SimHash identifies similar pages across sites
|
|
24
|
+
- **Smart Search** - Fuzzy text, keyword (`#topic`), and domain (`@site`) filters
|
|
25
|
+
- **Graph Explorer** - Navigate neighbors, discover related content
|
|
26
|
+
- **Optional LLM Summaries** - Local AI via Ollama for richer understanding
|
|
27
|
+
- **Fully Local** - Your data never leaves your machine
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install weft
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or from source:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/yourusername/weft.git
|
|
39
|
+
cd weft
|
|
40
|
+
pip install -e .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Build knowledge graph from your browser tabs
|
|
47
|
+
weft weave
|
|
48
|
+
|
|
49
|
+
# Explore in terminal UI
|
|
50
|
+
weft explore
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
### `weft weave`
|
|
56
|
+
|
|
57
|
+
Extracts tabs from browsers and weaves them into a knowledge graph.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# From all browsers (default)
|
|
61
|
+
weft weave
|
|
62
|
+
|
|
63
|
+
# Chrome only
|
|
64
|
+
weft weave --browser chrome
|
|
65
|
+
|
|
66
|
+
# Firefox only
|
|
67
|
+
weft weave --browser firefox
|
|
68
|
+
|
|
69
|
+
# With LLM summaries (requires Ollama)
|
|
70
|
+
weft weave --summarize
|
|
71
|
+
|
|
72
|
+
# Fast mode (tab titles only, no crawling)
|
|
73
|
+
weft weave --no-crawl
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `weft explore`
|
|
77
|
+
|
|
78
|
+
Interactive TUI for exploring your knowledge graph.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Default graph
|
|
82
|
+
weft explore
|
|
83
|
+
|
|
84
|
+
# Specific file
|
|
85
|
+
weft explore my_graph.json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
#### Keyboard Shortcuts
|
|
89
|
+
|
|
90
|
+
| Key | Action |
|
|
91
|
+
|-----|--------|
|
|
92
|
+
| `[` / `]` | Navigate groups |
|
|
93
|
+
| `{` / `}` | Navigate tabs in group |
|
|
94
|
+
| `o` | Open tab in browser |
|
|
95
|
+
| `g` | Open all tabs in group |
|
|
96
|
+
| `v` | Switch to graph view |
|
|
97
|
+
| `s` | Focus search |
|
|
98
|
+
| `q` | Quit |
|
|
99
|
+
|
|
100
|
+
**Search syntax:**
|
|
101
|
+
- Fuzzy: `distributed systems`
|
|
102
|
+
- Keyword: `#performance`
|
|
103
|
+
- Domain: `@github`
|
|
104
|
+
|
|
105
|
+
## How It Works
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Tabs → Extract → Cluster → Graph → Explore
|
|
109
|
+
│ │ │
|
|
110
|
+
▼ ▼ ▼
|
|
111
|
+
Keywords SimHash Similarity
|
|
112
|
+
TF-IDF Dedup Matrix
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
1. **Extract** - Pulls tabs from Chrome/Firefox, optionally crawls page content
|
|
116
|
+
2. **Cluster** - Groups by semantic similarity + domain affinity
|
|
117
|
+
3. **Deduplicate** - SimHash finds near-identical content across domains
|
|
118
|
+
4. **Graph** - Builds similarity edges between related pages
|
|
119
|
+
5. **Explore** - Fast TUI for search, navigation, and discovery
|
|
120
|
+
|
|
121
|
+
## Requirements
|
|
122
|
+
|
|
123
|
+
- Python 3.9+
|
|
124
|
+
- macOS (browser export uses AppleScript)
|
|
125
|
+
- Chrome and/or Firefox
|
|
126
|
+
|
|
127
|
+
### Optional: LLM Summaries
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Install Ollama
|
|
131
|
+
brew install ollama
|
|
132
|
+
|
|
133
|
+
# Pull models
|
|
134
|
+
ollama pull llama3.1:8b
|
|
135
|
+
ollama pull nomic-embed-text
|
|
136
|
+
|
|
137
|
+
# Use with summarization
|
|
138
|
+
weft weave --summarize
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "weft-graph"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "A local-first knowledge graph for your browsing"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Weft Contributors"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["knowledge-graph", "browsing", "llm", "clustering", "tui", "semantic-search", "local-first", "second-brain"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: End Users/Desktop",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: MacOS",
|
|
22
|
+
"Operating System :: Microsoft :: Windows",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.9",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Topic :: Utilities",
|
|
29
|
+
]
|
|
30
|
+
dependencies = [
|
|
31
|
+
"requests",
|
|
32
|
+
"trafilatura",
|
|
33
|
+
"rich",
|
|
34
|
+
"textual",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
firefox = ["lz4"]
|
|
39
|
+
js = ["playwright"]
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
weft = "weft.cli:main"
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Homepage = "https://github.com/Avi-141/weft"
|
|
46
|
+
Repository = "https://github.com/Avi-141/weft"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.packages.find]
|
|
49
|
+
where = ["."]
|
|
50
|
+
include = ["weft*"]
|