llmwikify 0.15.0__py3-none-any.whl
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.
- llmwikify/__init__.py +66 -0
- llmwikify/cli/__init__.py +5 -0
- llmwikify/cli/commands.py +658 -0
- llmwikify/config.py +186 -0
- llmwikify/core/__init__.py +6 -0
- llmwikify/core/index.py +309 -0
- llmwikify/core/wiki.py +2110 -0
- llmwikify/extractors/__init__.py +24 -0
- llmwikify/extractors/base.py +92 -0
- llmwikify/extractors/html.py +17 -0
- llmwikify/extractors/pdf.py +53 -0
- llmwikify/extractors/text.py +50 -0
- llmwikify/extractors/web.py +53 -0
- llmwikify/extractors/youtube.py +75 -0
- llmwikify/llm_client.py +142 -0
- llmwikify/mcp/__init__.py +5 -0
- llmwikify/mcp/server.py +260 -0
- llmwikify/py.typed +1 -0
- llmwikify/utils/__init__.py +5 -0
- llmwikify/utils/helpers.py +17 -0
- llmwikify-0.15.0.dist-info/METADATA +624 -0
- llmwikify-0.15.0.dist-info/RECORD +26 -0
- llmwikify-0.15.0.dist-info/WHEEL +5 -0
- llmwikify-0.15.0.dist-info/entry_points.txt +3 -0
- llmwikify-0.15.0.dist-info/licenses/LICENSE +21 -0
- llmwikify-0.15.0.dist-info/top_level.txt +1 -0
llmwikify/__init__.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
llmwikify - General-purpose LLM-Wiki CLI and Python Library
|
|
3
|
+
|
|
4
|
+
Based on Karpathy's LLM Wiki Principles:
|
|
5
|
+
- Persistent, LLM-maintained knowledge base
|
|
6
|
+
- Zero domain assumptions (pure tool design)
|
|
7
|
+
- Configuration-driven exclusion rules
|
|
8
|
+
- SQLite FTS5 full-text search
|
|
9
|
+
- Bidirectional reference tracking
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__version__ = "0.15.0"
|
|
13
|
+
__author__ = "sn0wfree"
|
|
14
|
+
__email__ = "linlu1234567@sina.com"
|
|
15
|
+
__license__ = "MIT"
|
|
16
|
+
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
from typing import Optional, Dict
|
|
19
|
+
|
|
20
|
+
# Import main components from modules
|
|
21
|
+
from .core import Wiki, WikiIndex
|
|
22
|
+
from .cli import WikiCLI
|
|
23
|
+
from .mcp import MCPServer
|
|
24
|
+
from .extractors import ExtractedContent, Link
|
|
25
|
+
from .config import (
|
|
26
|
+
load_config,
|
|
27
|
+
get_default_config,
|
|
28
|
+
get_mcp_config,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# Convenience functions
|
|
32
|
+
def create_wiki(path: str | Path, config: Optional[Dict] = None) -> Wiki:
|
|
33
|
+
"""Create or open a wiki at the given path.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
path: Path to wiki root directory
|
|
37
|
+
config: Optional configuration dict
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
Wiki instance
|
|
41
|
+
"""
|
|
42
|
+
return Wiki(Path(path), config=config)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
__all__ = [
|
|
46
|
+
# Version
|
|
47
|
+
"__version__",
|
|
48
|
+
|
|
49
|
+
# Main classes
|
|
50
|
+
"Wiki",
|
|
51
|
+
"WikiIndex",
|
|
52
|
+
"WikiCLI",
|
|
53
|
+
"MCPServer",
|
|
54
|
+
|
|
55
|
+
# Data classes
|
|
56
|
+
"ExtractedContent",
|
|
57
|
+
"Link",
|
|
58
|
+
|
|
59
|
+
# Configuration
|
|
60
|
+
"load_config",
|
|
61
|
+
"get_default_config",
|
|
62
|
+
"get_mcp_config",
|
|
63
|
+
|
|
64
|
+
# Convenience functions
|
|
65
|
+
"create_wiki",
|
|
66
|
+
]
|