Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ Save up to 40% on agent token costs with code graphs.

Supermodel maps every file, function, and call relationship in your repo and writes a `.graph` file next to each source file. Your agent reads them automatically via grep and cat. No prompt changes. No extra context windows. No new tools to learn.

## Linux / Mac

```bash
curl -fsSL https://supermodeltools.com/install.sh | sh
```

## npm (cross-platform)

```bash
npm install -g @supermodeltools/cli
```
---

## How it works
Expand Down Expand Up @@ -88,7 +95,7 @@ go build -o supermodel .

```bash
supermodel setup # authenticate + configure (runs automatically after install)
cd /path/to/your/repo
cd your/repo
supermodel watch # generate graph files and keep them updated
```

Expand Down
11 changes: 9 additions & 2 deletions npm/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,16 @@ download(url, tmpArchive, () => {
if (ext === "tar.gz") {
execSync(`tar -xzf "${tmpArchive}" -C "${BIN_DIR}" supermodel`);
} else {
execSync(`unzip -o "${tmpArchive}" supermodel.exe -d "${BIN_DIR}"`);
// Windows: Expand-Archive extracts all files, so extract to a temporary
// directory and copy only the binary.
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "supermodel-extract-"));
execSync(
`powershell -NoProfile -Command "Expand-Archive -Force -Path '${tmpArchive}' -DestinationPath '${tmpDir}'"`,
);
fs.copyFileSync(path.join(tmpDir, "supermodel.exe"), BIN_PATH);
fs.rmSync(tmpDir, { recursive: true, force: true });
}
fs.chmodSync(BIN_PATH, 0o755);
if (process.platform !== "win32") fs.chmodSync(BIN_PATH, 0o755);
fs.unlinkSync(tmpArchive);
console.log(`[supermodel] Installed to ${BIN_PATH}`);
});
Loading