basemind 0.2.1__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.
- basemind-0.2.1/PKG-INFO +67 -0
- basemind-0.2.1/README.md +40 -0
- basemind-0.2.1/basemind/__init__.py +5 -0
- basemind-0.2.1/basemind/cli.py +15 -0
- basemind-0.2.1/basemind/downloader.py +133 -0
- basemind-0.2.1/basemind.egg-info/PKG-INFO +67 -0
- basemind-0.2.1/basemind.egg-info/SOURCES.txt +11 -0
- basemind-0.2.1/basemind.egg-info/dependency_links.txt +1 -0
- basemind-0.2.1/basemind.egg-info/entry_points.txt +2 -0
- basemind-0.2.1/basemind.egg-info/requires.txt +1 -0
- basemind-0.2.1/basemind.egg-info/top_level.txt +1 -0
- basemind-0.2.1/pyproject.toml +44 -0
- basemind-0.2.1/setup.cfg +4 -0
basemind-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: basemind
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Full AI context layer over MCP — tree-sitter code-map, document RAG (PDF/Office/HTML/email + OCR + reranker), shared agent memory, on-demand web crawl, git history + blame + per-symbol diff. 300+ languages, 8 coding-agent harnesses, content-addressed Fjall + LanceDB.
|
|
5
|
+
Author-email: Na'aman Hirschfeld <nhirschfeld@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Goldziher/basemind
|
|
8
|
+
Project-URL: Repository, https://github.com/Goldziher/basemind.git
|
|
9
|
+
Project-URL: Issues, https://github.com/Goldziher/basemind/issues
|
|
10
|
+
Keywords: mcp,agent-context,rag,code-map,tree-sitter
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
23
|
+
Classifier: Environment :: Console
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
Requires-Dist: certifi>=2024.7.4
|
|
27
|
+
|
|
28
|
+
# basemind
|
|
29
|
+
|
|
30
|
+
Full AI context layer for coding agents — code-map, document RAG, shared memory, web crawl,
|
|
31
|
+
git history. 300+ languages, one MCP server.
|
|
32
|
+
|
|
33
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
34
|
+
[](https://github.com/Goldziher/basemind/blob/main/LICENSE)
|
|
35
|
+
[](https://pypi.org/project/basemind/)
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install basemind
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
On first invocation, the pre-compiled Rust binary for your platform (macOS, Linux, Windows;
|
|
44
|
+
x86_64 + arm64) is downloaded from
|
|
45
|
+
[GitHub Releases](https://github.com/Goldziher/basemind/releases) and cached under
|
|
46
|
+
`~/.cache/basemind/<version>/`.
|
|
47
|
+
|
|
48
|
+
Override the binary location with `BASEMIND_BINARY=/path/to/basemind`.
|
|
49
|
+
|
|
50
|
+
## Quickstart
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd /path/to/your/repo
|
|
54
|
+
basemind scan # index the working tree
|
|
55
|
+
basemind serve # run the MCP stdio server
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Wire `basemind serve` into Claude Code or any MCP client.
|
|
59
|
+
|
|
60
|
+
## Full documentation
|
|
61
|
+
|
|
62
|
+
See the [main README](https://github.com/Goldziher/basemind#readme) for complete docs,
|
|
63
|
+
architecture, MCP tool reference, and per-harness setup instructions.
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
[MIT](https://github.com/Goldziher/basemind/blob/main/LICENSE).
|
basemind-0.2.1/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# basemind
|
|
2
|
+
|
|
3
|
+
Full AI context layer for coding agents — code-map, document RAG, shared memory, web crawl,
|
|
4
|
+
git history. 300+ languages, one MCP server.
|
|
5
|
+
|
|
6
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
7
|
+
[](https://github.com/Goldziher/basemind/blob/main/LICENSE)
|
|
8
|
+
[](https://pypi.org/project/basemind/)
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install basemind
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
On first invocation, the pre-compiled Rust binary for your platform (macOS, Linux, Windows;
|
|
17
|
+
x86_64 + arm64) is downloaded from
|
|
18
|
+
[GitHub Releases](https://github.com/Goldziher/basemind/releases) and cached under
|
|
19
|
+
`~/.cache/basemind/<version>/`.
|
|
20
|
+
|
|
21
|
+
Override the binary location with `BASEMIND_BINARY=/path/to/basemind`.
|
|
22
|
+
|
|
23
|
+
## Quickstart
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd /path/to/your/repo
|
|
27
|
+
basemind scan # index the working tree
|
|
28
|
+
basemind serve # run the MCP stdio server
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Wire `basemind serve` into Claude Code or any MCP client.
|
|
32
|
+
|
|
33
|
+
## Full documentation
|
|
34
|
+
|
|
35
|
+
See the [main README](https://github.com/Goldziher/basemind#readme) for complete docs,
|
|
36
|
+
architecture, MCP tool reference, and per-harness setup instructions.
|
|
37
|
+
|
|
38
|
+
## License
|
|
39
|
+
|
|
40
|
+
[MIT](https://github.com/Goldziher/basemind/blob/main/LICENSE).
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import platform
|
|
5
|
+
import ssl
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
8
|
+
import tempfile
|
|
9
|
+
import tarfile
|
|
10
|
+
import zipfile
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from urllib.error import URLError
|
|
13
|
+
from urllib.request import Request, urlopen
|
|
14
|
+
|
|
15
|
+
import certifi
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _platform_triple() -> str:
|
|
19
|
+
system = platform.system().lower()
|
|
20
|
+
machine = platform.machine().lower()
|
|
21
|
+
|
|
22
|
+
if system == "windows":
|
|
23
|
+
if machine in {"amd64", "x86_64"}:
|
|
24
|
+
return "x86_64-pc-windows-gnu"
|
|
25
|
+
if machine in {"x86", "i386", "i686"}:
|
|
26
|
+
raise RuntimeError("32-bit Windows is not supported")
|
|
27
|
+
elif system == "linux":
|
|
28
|
+
if machine in {"amd64", "x86_64"}:
|
|
29
|
+
return "x86_64-unknown-linux-gnu"
|
|
30
|
+
if machine in {"aarch64", "arm64"}:
|
|
31
|
+
return "aarch64-unknown-linux-gnu"
|
|
32
|
+
elif system == "darwin":
|
|
33
|
+
if machine in {"amd64", "x86_64"}:
|
|
34
|
+
return "x86_64-apple-darwin"
|
|
35
|
+
if machine in {"aarch64", "arm64"}:
|
|
36
|
+
return "aarch64-apple-darwin"
|
|
37
|
+
|
|
38
|
+
raise RuntimeError(f"Unsupported platform: {system} {machine}")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _python_version_to_tag(version: str) -> str:
|
|
42
|
+
if "rc" in version:
|
|
43
|
+
core, suffix = version.split("rc")
|
|
44
|
+
return f"{core}-rc.{suffix}"
|
|
45
|
+
return version
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _asset(version: str) -> tuple[str, str]:
|
|
49
|
+
tag = _python_version_to_tag(version)
|
|
50
|
+
triple = _platform_triple()
|
|
51
|
+
ext = "zip" if "windows" in triple else "tar.gz"
|
|
52
|
+
url = (
|
|
53
|
+
f"https://github.com/Goldziher/basemind/releases/download/"
|
|
54
|
+
f"v{tag}/basemind-{triple}.{ext}"
|
|
55
|
+
)
|
|
56
|
+
return url, ext
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _download(url: str, destination: Path) -> None:
|
|
60
|
+
request = Request(url, headers={"User-Agent": "basemind-python-wrapper"})
|
|
61
|
+
context = ssl.create_default_context(cafile=certifi.where())
|
|
62
|
+
try:
|
|
63
|
+
with urlopen(request, timeout=30, context=context) as response:
|
|
64
|
+
if response.status != 200:
|
|
65
|
+
raise RuntimeError(f"HTTP {response.status}: {response.reason}")
|
|
66
|
+
destination.write_bytes(response.read())
|
|
67
|
+
except URLError as exc:
|
|
68
|
+
raise RuntimeError(f"Failed to download binary: {exc}") from exc
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _extract(archive: Path, ext: str, destination: Path) -> None:
|
|
72
|
+
if ext == "zip":
|
|
73
|
+
with zipfile.ZipFile(archive) as zf:
|
|
74
|
+
for name in zf.namelist():
|
|
75
|
+
if name.endswith("basemind") or name.endswith("basemind.exe"):
|
|
76
|
+
with zf.open(name) as src, destination.open("wb") as dst:
|
|
77
|
+
dst.write(src.read())
|
|
78
|
+
return
|
|
79
|
+
else:
|
|
80
|
+
with tarfile.open(archive, "r:gz") as tar:
|
|
81
|
+
for member in tar.getmembers():
|
|
82
|
+
if member.name.endswith("basemind") or member.name.endswith("basemind.exe"):
|
|
83
|
+
with tar.extractfile(member) as src, destination.open("wb") as dst:
|
|
84
|
+
dst.write(src.read())
|
|
85
|
+
return
|
|
86
|
+
raise RuntimeError("Binary not found in downloaded archive")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def _cache_path(version: str) -> Path:
|
|
90
|
+
cache_dir = Path.home() / ".cache" / "basemind" / version
|
|
91
|
+
cache_dir.mkdir(parents=True, exist_ok=True)
|
|
92
|
+
suffix = ".exe" if platform.system().lower() == "windows" else ""
|
|
93
|
+
return cache_dir / f"basemind{suffix}"
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def ensure_binary():
|
|
97
|
+
"""Ensure the binary is available, downloading if necessary."""
|
|
98
|
+
from . import __version__
|
|
99
|
+
|
|
100
|
+
override = os.getenv("BASEMIND_BINARY")
|
|
101
|
+
if override:
|
|
102
|
+
return override
|
|
103
|
+
|
|
104
|
+
binary_path = _cache_path(__version__)
|
|
105
|
+
if binary_path.exists() and os.access(binary_path, os.X_OK):
|
|
106
|
+
return str(binary_path)
|
|
107
|
+
|
|
108
|
+
url, ext = _asset(__version__)
|
|
109
|
+
print(f"Downloading basemind binary v{__version__}...", file=sys.stderr)
|
|
110
|
+
|
|
111
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
112
|
+
archive_path = Path(tmpdir) / f"basemind.{ext}"
|
|
113
|
+
_download(url, archive_path)
|
|
114
|
+
_extract(archive_path, ext, binary_path)
|
|
115
|
+
|
|
116
|
+
if platform.system().lower() != "windows":
|
|
117
|
+
binary_path.chmod(0o755)
|
|
118
|
+
|
|
119
|
+
print("Binary downloaded successfully!", file=sys.stderr)
|
|
120
|
+
return str(binary_path)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def run_basemind(args):
|
|
124
|
+
"""Run the basemind binary with the given arguments."""
|
|
125
|
+
binary_path = ensure_binary()
|
|
126
|
+
|
|
127
|
+
try:
|
|
128
|
+
result = subprocess.run([binary_path] + args, check=False)
|
|
129
|
+
sys.exit(result.returncode)
|
|
130
|
+
except FileNotFoundError:
|
|
131
|
+
raise RuntimeError(f"Binary not found at {binary_path}")
|
|
132
|
+
except Exception as e:
|
|
133
|
+
raise RuntimeError(f"Failed to run basemind: {e}")
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: basemind
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Full AI context layer over MCP — tree-sitter code-map, document RAG (PDF/Office/HTML/email + OCR + reranker), shared agent memory, on-demand web crawl, git history + blame + per-symbol diff. 300+ languages, 8 coding-agent harnesses, content-addressed Fjall + LanceDB.
|
|
5
|
+
Author-email: Na'aman Hirschfeld <nhirschfeld@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Goldziher/basemind
|
|
8
|
+
Project-URL: Repository, https://github.com/Goldziher/basemind.git
|
|
9
|
+
Project-URL: Issues, https://github.com/Goldziher/basemind/issues
|
|
10
|
+
Keywords: mcp,agent-context,rag,code-map,tree-sitter
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
23
|
+
Classifier: Environment :: Console
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
Requires-Dist: certifi>=2024.7.4
|
|
27
|
+
|
|
28
|
+
# basemind
|
|
29
|
+
|
|
30
|
+
Full AI context layer for coding agents — code-map, document RAG, shared memory, web crawl,
|
|
31
|
+
git history. 300+ languages, one MCP server.
|
|
32
|
+
|
|
33
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
34
|
+
[](https://github.com/Goldziher/basemind/blob/main/LICENSE)
|
|
35
|
+
[](https://pypi.org/project/basemind/)
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install basemind
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
On first invocation, the pre-compiled Rust binary for your platform (macOS, Linux, Windows;
|
|
44
|
+
x86_64 + arm64) is downloaded from
|
|
45
|
+
[GitHub Releases](https://github.com/Goldziher/basemind/releases) and cached under
|
|
46
|
+
`~/.cache/basemind/<version>/`.
|
|
47
|
+
|
|
48
|
+
Override the binary location with `BASEMIND_BINARY=/path/to/basemind`.
|
|
49
|
+
|
|
50
|
+
## Quickstart
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd /path/to/your/repo
|
|
54
|
+
basemind scan # index the working tree
|
|
55
|
+
basemind serve # run the MCP stdio server
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Wire `basemind serve` into Claude Code or any MCP client.
|
|
59
|
+
|
|
60
|
+
## Full documentation
|
|
61
|
+
|
|
62
|
+
See the [main README](https://github.com/Goldziher/basemind#readme) for complete docs,
|
|
63
|
+
architecture, MCP tool reference, and per-harness setup instructions.
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
[MIT](https://github.com/Goldziher/basemind/blob/main/LICENSE).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
basemind/__init__.py
|
|
4
|
+
basemind/cli.py
|
|
5
|
+
basemind/downloader.py
|
|
6
|
+
basemind.egg-info/PKG-INFO
|
|
7
|
+
basemind.egg-info/SOURCES.txt
|
|
8
|
+
basemind.egg-info/dependency_links.txt
|
|
9
|
+
basemind.egg-info/entry_points.txt
|
|
10
|
+
basemind.egg-info/requires.txt
|
|
11
|
+
basemind.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
certifi>=2024.7.4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
basemind
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "basemind"
|
|
7
|
+
version = "0.2.1"
|
|
8
|
+
description = "Full AI context layer over MCP — tree-sitter code-map, document RAG (PDF/Office/HTML/email + OCR + reranker), shared agent memory, on-demand web crawl, git history + blame + per-symbol diff. 300+ languages, 8 coding-agent harnesses, content-addressed Fjall + LanceDB."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "Na'aman Hirschfeld", email = "nhirschfeld@gmail.com"}
|
|
13
|
+
]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.8",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
26
|
+
"Topic :: Software Development :: Code Generators",
|
|
27
|
+
"Environment :: Console"
|
|
28
|
+
]
|
|
29
|
+
keywords = ["mcp", "agent-context", "rag", "code-map", "tree-sitter"]
|
|
30
|
+
requires-python = ">=3.8"
|
|
31
|
+
dependencies = [
|
|
32
|
+
"certifi>=2024.7.4"
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://github.com/Goldziher/basemind"
|
|
37
|
+
Repository = "https://github.com/Goldziher/basemind.git"
|
|
38
|
+
Issues = "https://github.com/Goldziher/basemind/issues"
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
basemind = "basemind.cli:main"
|
|
42
|
+
|
|
43
|
+
[tool.setuptools]
|
|
44
|
+
packages = ["basemind"]
|
basemind-0.2.1/setup.cfg
ADDED