Skip to content

Commit 592be8e

Browse files
committed
Add pkg/ — distribution wrappers for npm, PyPI, Homebrew, Scoop, Winget, Chocolatey, AUR
Introduces pkg/ as a self-contained home for all package registry wrappers. Each subdirectory is a ready-to-publish package that downloads the appropriate pre-built binary from GitHub Releases — no source compilation at install time. - pkg/npm/ — postinstall downloads binary; bin.js shim for CLI - pkg/pypi/ — lazy download on first run via _cli.py; pipx-friendly - pkg/homebrew/ — multi-arch formula (darwin/linux × arm64/amd64) - pkg/scoop/ — Windows bucket manifest with autoupdate + checksum - pkg/winget/ — v1.6.0 manifests (version + installer + locale) - pkg/chocolatey/ — nuspec + install/uninstall scripts - pkg/aur/ — PKGBUILD + .SRCINFO for x86_64 and aarch64 All hashes are real SHA-256 checksums from the v0.6.0 release.
1 parent dcdca6d commit 592be8e

File tree

18 files changed

+621
-0
lines changed

18 files changed

+621
-0
lines changed

pkg/aur/.SRCINFO

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pkgbase = codebase-memory-mcp
2+
pkgdesc = Fast code intelligence engine for AI coding agents — single static binary MCP server
3+
pkgver = 0.6.0
4+
pkgrel = 1
5+
url = https://github.com/DeusData/codebase-memory-mcp
6+
arch = x86_64
7+
arch = aarch64
8+
license = MIT
9+
provides = codebase-memory-mcp
10+
conflicts = codebase-memory-mcp
11+
source_x86_64 = codebase-memory-mcp-0.6.0-linux-amd64.tar.gz::https://github.com/DeusData/codebase-memory-mcp/releases/download/v0.6.0/codebase-memory-mcp-linux-amd64.tar.gz
12+
sha256sums_x86_64 = 0dfd70f73337219925f3ec6a572fe776dbbe1c4c8c6ab546ab214fe16e56a426
13+
source_aarch64 = codebase-memory-mcp-0.6.0-linux-arm64.tar.gz::https://github.com/DeusData/codebase-memory-mcp/releases/download/v0.6.0/codebase-memory-mcp-linux-arm64.tar.gz
14+
sha256sums_aarch64 = f1fad27262fe7af4a356af128e43942355cb2189491079b6790ecc5ae3af069c
15+
16+
pkgname = codebase-memory-mcp

pkg/aur/PKGBUILD

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Maintainer: DeusData <https://github.com/DeusData>
2+
pkgname=codebase-memory-mcp
3+
pkgver=0.6.0
4+
pkgrel=1
5+
pkgdesc="Fast code intelligence engine for AI coding agents — single static binary MCP server"
6+
arch=('x86_64' 'aarch64')
7+
url="https://github.com/DeusData/codebase-memory-mcp"
8+
license=('MIT')
9+
provides=("$pkgname")
10+
conflicts=("$pkgname")
11+
12+
source_x86_64=("${pkgname}-${pkgver}-linux-amd64.tar.gz::https://github.com/DeusData/codebase-memory-mcp/releases/download/v${pkgver}/codebase-memory-mcp-linux-amd64.tar.gz")
13+
source_aarch64=("${pkgname}-${pkgver}-linux-arm64.tar.gz::https://github.com/DeusData/codebase-memory-mcp/releases/download/v${pkgver}/codebase-memory-mcp-linux-arm64.tar.gz")
14+
15+
sha256sums_x86_64=('0dfd70f73337219925f3ec6a572fe776dbbe1c4c8c6ab546ab214fe16e56a426')
16+
sha256sums_aarch64=('f1fad27262fe7af4a356af128e43942355cb2189491079b6790ecc5ae3af069c')
17+
18+
package() {
19+
install -Dm755 "${srcdir}/codebase-memory-mcp" \
20+
"${pkgdir}/usr/bin/codebase-memory-mcp"
21+
install -Dm644 "${srcdir}/LICENSE" \
22+
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
23+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
3+
<metadata>
4+
<id>codebase-memory-mcp</id>
5+
<version>0.6.0</version>
6+
<title>codebase-memory-mcp</title>
7+
<authors>DeusData</authors>
8+
<projectUrl>https://github.com/DeusData/codebase-memory-mcp</projectUrl>
9+
<licenseUrl>https://github.com/DeusData/codebase-memory-mcp/blob/main/LICENSE</licenseUrl>
10+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
11+
<projectSourceUrl>https://github.com/DeusData/codebase-memory-mcp</projectSourceUrl>
12+
<bugTrackerUrl>https://github.com/DeusData/codebase-memory-mcp/issues</bugTrackerUrl>
13+
<tags>mcp ai claude code-intelligence codebase developer-tools tree-sitter llm</tags>
14+
<summary>Fast code intelligence engine for AI coding agents</summary>
15+
<description>
16+
codebase-memory-mcp is a single static binary MCP server that indexes codebases at
17+
extreme speed and exposes 14 MCP tools for AI coding agents.
18+
19+
Full indexes an average repository in milliseconds, the Linux kernel (28M LOC) in
20+
3 minutes. Answers structural queries in under 1ms. Supports 66 languages via
21+
vendored tree-sitter grammars. Zero dependencies. Plug and play across 10 coding
22+
agents including Claude Code, Codex CLI, Gemini CLI, and Zed.
23+
24+
After installation, run:
25+
26+
codebase-memory-mcp install
27+
28+
to configure your coding agents automatically.
29+
</description>
30+
<releaseNotes>https://github.com/DeusData/codebase-memory-mcp/releases/tag/v0.6.0</releaseNotes>
31+
</metadata>
32+
<files>
33+
<file src="tools\**" target="tools" />
34+
</files>
35+
</package>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
$packageName = 'codebase-memory-mcp'
4+
$version = '0.6.0'
5+
$url64 = "https://github.com/DeusData/codebase-memory-mcp/releases/download/v${version}/codebase-memory-mcp-windows-amd64.zip"
6+
$checksum64 = 'da3d7d7bd6f687b697145457ff9d113ecf6daffe173d236457a43223e89a5e9c'
7+
$installDir = Join-Path $env:ChocolateyBinRoot $packageName
8+
9+
Install-ChocolateyZipPackage `
10+
-PackageName $packageName `
11+
-Url64bit $url64 `
12+
-Checksum64 $checksum64 `
13+
-ChecksumType64 'sha256' `
14+
-UnzipLocation $installDir
15+
16+
# Shim the binary so it is on PATH
17+
$binPath = Join-Path $installDir 'codebase-memory-mcp.exe'
18+
Install-BinFile -Name 'codebase-memory-mcp' -Path $binPath
19+
20+
# Configure coding agents (non-fatal)
21+
try {
22+
& $binPath install -y 2>&1 | Out-Null
23+
} catch {
24+
Write-Warning "Agent configuration failed (non-fatal). Run manually: codebase-memory-mcp install"
25+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
$packageName = 'codebase-memory-mcp'
4+
$installDir = Join-Path $env:ChocolateyBinRoot $packageName
5+
6+
Uninstall-BinFile -Name 'codebase-memory-mcp'
7+
8+
if (Test-Path $installDir) {
9+
Remove-Item $installDir -Recurse -Force
10+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
class CodebaseMemoryMcp < Formula
2+
desc "Fast code intelligence engine for AI coding agents"
3+
homepage "https://github.com/DeusData/codebase-memory-mcp"
4+
version "0.6.0"
5+
license "MIT"
6+
7+
on_macos do
8+
on_arm do
9+
url "https://github.com/DeusData/codebase-memory-mcp/releases/download/v#{version}/codebase-memory-mcp-darwin-arm64.tar.gz"
10+
sha256 "a1d3f8a4c353ab94ea8fe1fb60159758020f2f256c9652699a0bd6725189a439"
11+
end
12+
on_intel do
13+
url "https://github.com/DeusData/codebase-memory-mcp/releases/download/v#{version}/codebase-memory-mcp-darwin-amd64.tar.gz"
14+
sha256 "a4d09d97fe1f47e1a0a23309bc34d9937f74c61950bed3259f9576800cc78727"
15+
end
16+
end
17+
18+
on_linux do
19+
on_arm do
20+
url "https://github.com/DeusData/codebase-memory-mcp/releases/download/v#{version}/codebase-memory-mcp-linux-arm64.tar.gz"
21+
sha256 "f1fad27262fe7af4a356af128e43942355cb2189491079b6790ecc5ae3af069c"
22+
end
23+
on_intel do
24+
url "https://github.com/DeusData/codebase-memory-mcp/releases/download/v#{version}/codebase-memory-mcp-linux-amd64.tar.gz"
25+
sha256 "0dfd70f73337219925f3ec6a572fe776dbbe1c4c8c6ab546ab214fe16e56a426"
26+
end
27+
end
28+
29+
def install
30+
bin.install "codebase-memory-mcp"
31+
end
32+
33+
def caveats
34+
<<~EOS
35+
Run the following to configure your coding agents:
36+
codebase-memory-mcp install
37+
38+
To tap this formula directly:
39+
brew tap deusdata/codebase-memory-mcp https://github.com/DeusData/codebase-memory-mcp
40+
brew install codebase-memory-mcp
41+
EOS
42+
end
43+
44+
test do
45+
assert_match "codebase-memory-mcp", shell_output("#{bin}/codebase-memory-mcp --version")
46+
end
47+
end

pkg/npm/bin.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
// CLI shim: resolves the downloaded binary and replaces the current process with it.
4+
5+
const path = require('path');
6+
const fs = require('fs');
7+
const { spawnSync } = require('child_process');
8+
9+
const isWindows = process.platform === 'win32';
10+
const binName = isWindows ? 'codebase-memory-mcp.exe' : 'codebase-memory-mcp';
11+
const binPath = path.join(__dirname, 'bin', binName);
12+
13+
if (!fs.existsSync(binPath)) {
14+
process.stderr.write(
15+
'codebase-memory-mcp: binary not found.\n' +
16+
'Try reinstalling: npm install -g codebase-memory-mcp\n'
17+
);
18+
process.exit(1);
19+
}
20+
21+
const result = spawnSync(binPath, process.argv.slice(2), {
22+
stdio: 'inherit',
23+
windowsHide: false,
24+
});
25+
26+
if (result.error) {
27+
process.stderr.write(`codebase-memory-mcp: ${result.error.message}\n`);
28+
process.exit(1);
29+
}
30+
31+
process.exit(result.status ?? 0);

pkg/npm/install.js

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
// Postinstall script: downloads the platform-appropriate binary from GitHub Releases.
4+
// Runs automatically via `postinstall` in package.json.
5+
6+
const https = require('https');
7+
const fs = require('fs');
8+
const path = require('path');
9+
const os = require('os');
10+
const { execSync } = require('child_process');
11+
12+
const REPO = 'DeusData/codebase-memory-mcp';
13+
const VERSION = require('./package.json').version;
14+
const BIN_DIR = path.join(__dirname, 'bin');
15+
16+
function getPlatform() {
17+
switch (process.platform) {
18+
case 'linux': return 'linux';
19+
case 'darwin': return 'darwin';
20+
case 'win32': return 'windows';
21+
default: throw new Error(`Unsupported platform: ${process.platform}`);
22+
}
23+
}
24+
25+
function getArch() {
26+
switch (process.arch) {
27+
case 'arm64': return 'arm64';
28+
case 'x64': return 'amd64';
29+
default: throw new Error(`Unsupported architecture: ${process.arch}`);
30+
}
31+
}
32+
33+
function download(url, dest) {
34+
return new Promise((resolve, reject) => {
35+
function follow(u) {
36+
https.get(u, (res) => {
37+
if (res.statusCode === 301 || res.statusCode === 302) {
38+
return follow(res.headers.location);
39+
}
40+
if (res.statusCode !== 200) {
41+
return reject(new Error(`HTTP ${res.statusCode} for ${u}`));
42+
}
43+
const file = fs.createWriteStream(dest);
44+
res.pipe(file);
45+
file.on('finish', () => file.close(resolve));
46+
file.on('error', reject);
47+
}).on('error', reject);
48+
}
49+
follow(url);
50+
});
51+
}
52+
53+
async function main() {
54+
const platform = getPlatform();
55+
const arch = getArch();
56+
const ext = platform === 'windows' ? 'zip' : 'tar.gz';
57+
const binName = platform === 'windows' ? 'codebase-memory-mcp.exe' : 'codebase-memory-mcp';
58+
const binPath = path.join(BIN_DIR, binName);
59+
60+
if (fs.existsSync(binPath)) {
61+
return; // already installed, nothing to do
62+
}
63+
64+
fs.mkdirSync(BIN_DIR, { recursive: true });
65+
66+
const archive = `codebase-memory-mcp-${platform}-${arch}.${ext}`;
67+
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${archive}`;
68+
69+
process.stdout.write(`codebase-memory-mcp: downloading v${VERSION} for ${platform}/${arch}...\n`);
70+
71+
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cbm-install-'));
72+
const tmpArchive = path.join(tmpDir, `cbm.${ext}`);
73+
74+
try {
75+
await download(url, tmpArchive);
76+
77+
if (ext === 'tar.gz') {
78+
execSync(`tar -xzf "${tmpArchive}" -C "${tmpDir}"`);
79+
} else {
80+
execSync(
81+
`powershell -NoProfile -Command "Expand-Archive -Path '${tmpArchive}' -DestinationPath '${tmpDir}' -Force"`,
82+
);
83+
}
84+
85+
const extracted = path.join(tmpDir, binName);
86+
if (!fs.existsSync(extracted)) {
87+
throw new Error(`Binary not found after extraction at ${extracted}`);
88+
}
89+
90+
fs.copyFileSync(extracted, binPath);
91+
fs.chmodSync(binPath, 0o755);
92+
93+
process.stdout.write(`codebase-memory-mcp: ready.\n`);
94+
} finally {
95+
fs.rmSync(tmpDir, { recursive: true, force: true });
96+
}
97+
}
98+
99+
main().catch((err) => {
100+
process.stderr.write(`\ncodebase-memory-mcp: install failed — ${err.message}\n`);
101+
process.stderr.write(`You can install manually: https://github.com/${REPO}#installation\n`);
102+
// Non-fatal: don't block the rest of npm install
103+
process.exit(0);
104+
});

pkg/npm/package.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "codebase-memory-mcp",
3+
"version": "0.6.0",
4+
"description": "Fast code intelligence engine for AI coding agents — single static binary MCP server",
5+
"license": "MIT",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/DeusData/codebase-memory-mcp.git"
9+
},
10+
"homepage": "https://github.com/DeusData/codebase-memory-mcp",
11+
"bugs": {
12+
"url": "https://github.com/DeusData/codebase-memory-mcp/issues"
13+
},
14+
"keywords": [
15+
"mcp",
16+
"claude",
17+
"code-intelligence",
18+
"codebase",
19+
"memory",
20+
"ai",
21+
"llm",
22+
"tree-sitter"
23+
],
24+
"bin": {
25+
"codebase-memory-mcp": "./bin.js"
26+
},
27+
"scripts": {
28+
"postinstall": "node install.js"
29+
},
30+
"engines": {
31+
"node": ">=18"
32+
},
33+
"os": ["linux", "darwin", "win32"],
34+
"cpu": ["x64", "arm64"],
35+
"files": [
36+
"bin.js",
37+
"install.js"
38+
]
39+
}

pkg/pypi/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# codebase-memory-mcp
2+
3+
**Fast code intelligence engine for AI coding agents.** Indexes an average repository in milliseconds, the Linux kernel (28M LOC) in 3 minutes. Answers structural queries in under 1ms.
4+
5+
This package installs the `codebase-memory-mcp` binary from [GitHub Releases](https://github.com/DeusData/codebase-memory-mcp/releases). The binary is downloaded on first run and cached in your OS cache directory.
6+
7+
## Installation
8+
9+
```bash
10+
pip install codebase-memory-mcp
11+
# or
12+
pipx install codebase-memory-mcp
13+
```
14+
15+
## Usage
16+
17+
```bash
18+
codebase-memory-mcp install # configure your coding agents
19+
codebase-memory-mcp --help
20+
```
21+
22+
## Supported platforms
23+
24+
| OS | Architecture |
25+
|---------|-------------|
26+
| macOS | arm64, amd64 |
27+
| Linux | arm64, amd64 |
28+
| Windows | amd64 |
29+
30+
## Full documentation
31+
32+
See [github.com/DeusData/codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp)

0 commit comments

Comments
 (0)