chore: rebrand companion-os to clanker-agent

- Rename all package names from companion-* to clanker-*
- Update npm scopes from @mariozechner to @harivansh-afk
- Rename config directories .companion -> .clanker
- Rename environment variables COMPANION_* -> CLANKER_*
- Update all documentation, README files, and install scripts
- Rename package directories (companion-channels, companion-grind, companion-teams)
- Update GitHub URLs to harivansh-afk/clanker-agent
- Preserve full git history from companion-cloud monorepo
This commit is contained in:
Harivansh Rathi 2026-03-26 16:22:52 -04:00
parent f93fe7d1a0
commit 67168d8289
356 changed files with 2249 additions and 10223 deletions

View file

@ -1,4 +1,4 @@
import { complete, getModel } from "@mariozechner/companion-ai";
import { complete, getModel } from "@harivansh-afk/clanker-ai";
const model = getModel("google", "gemini-2.5-flash");
console.log(model.id, typeof complete);

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Build companion binaries for all platforms locally.
# Build clanker binaries for all platforms locally.
# Mirrors .github/workflows/build-binaries.yml
#
# Usage:
@ -12,11 +12,11 @@
#
# Output:
# packages/coding-agent/binaries/
# companion-darwin-arm64.tar.gz
# companion-darwin-x64.tar.gz
# companion-linux-x64.tar.gz
# companion-linux-arm64.tar.gz
# companion-windows-x64.zip
# clanker-darwin-arm64.tar.gz
# clanker-darwin-x64.tar.gz
# clanker-linux-x64.tar.gz
# clanker-linux-arm64.tar.gz
# clanker-windows-x64.zip
set -euo pipefail
@ -107,9 +107,9 @@ for platform in "${PLATFORMS[@]}"; do
# call site has a try/catch fallback. For Windows builds, we copy the
# appropriate .node file alongside the binary below.
if [[ "$platform" == "windows-x64" ]]; then
bun build --compile --external koffi --target=bun-$platform ./dist/cli.js --outfile binaries/$platform/companion.exe
bun build --compile --external koffi --target=bun-$platform ./dist/cli.js --outfile binaries/$platform/clanker.exe
else
bun build --compile --external koffi --target=bun-$platform ./dist/cli.js --outfile binaries/$platform/companion
bun build --compile --external koffi --target=bun-$platform ./dist/cli.js --outfile binaries/$platform/clanker
fi
done
@ -141,12 +141,12 @@ cd binaries
for platform in "${PLATFORMS[@]}"; do
if [[ "$platform" == "windows-x64" ]]; then
# Windows (zip)
echo "Creating companion-$platform.zip..."
(cd $platform && zip -r ../companion-$platform.zip .)
echo "Creating clanker-$platform.zip..."
(cd $platform && zip -r ../clanker-$platform.zip .)
else
# Unix platforms (tar.gz) - use wrapper directory for mise compatibility
echo "Creating companion-$platform.tar.gz..."
mv $platform companion && tar -czf companion-$platform.tar.gz companion && mv companion $platform
echo "Creating clanker-$platform.tar.gz..."
mv $platform clanker && tar -czf clanker-$platform.tar.gz clanker && mv clanker $platform
fi
done
@ -155,9 +155,9 @@ echo "==> Extracting archives for testing..."
for platform in "${PLATFORMS[@]}"; do
rm -rf $platform
if [[ "$platform" == "windows-x64" ]]; then
mkdir -p $platform && (cd $platform && unzip -q ../companion-$platform.zip)
mkdir -p $platform && (cd $platform && unzip -q ../clanker-$platform.zip)
else
tar -xzf companion-$platform.tar.gz && mv companion $platform
tar -xzf clanker-$platform.tar.gz && mv clanker $platform
fi
done
@ -168,5 +168,5 @@ ls -lh *.tar.gz *.zip 2>/dev/null || true
echo ""
echo "Extracted directories for testing:"
for platform in "${PLATFORMS[@]}"; do
echo " binaries/$platform/companion"
echo " binaries/$platform/clanker"
done

View file

@ -2,34 +2,34 @@ import { mkdir } from "node:fs/promises";
import path from "node:path";
import { build } from "esbuild";
const sourceRoot = process.env.COMPANION_BUILTIN_EXTENSIONS_SRC
? path.resolve(process.env.COMPANION_BUILTIN_EXTENSIONS_SRC)
const sourceRoot = process.env.CLANKER_BUILTIN_EXTENSIONS_SRC
? path.resolve(process.env.CLANKER_BUILTIN_EXTENSIONS_SRC)
: path.resolve(process.cwd(), "packages");
const outputRoot = process.env.COMPANION_BUILTIN_EXTENSIONS_OUT
? path.resolve(process.env.COMPANION_BUILTIN_EXTENSIONS_OUT)
const outputRoot = process.env.CLANKER_BUILTIN_EXTENSIONS_OUT
? path.resolve(process.env.CLANKER_BUILTIN_EXTENSIONS_OUT)
: path.resolve(process.cwd(), ".tmp/builtins");
const entries = [
{
name: "companion-channels",
entry: path.join(sourceRoot, "companion-channels", "src", "index.ts"),
name: "clanker-channels",
entry: path.join(sourceRoot, "clanker-channels", "src", "index.ts"),
},
{
name: "companion-teams",
entry: path.join(sourceRoot, "companion-teams", "extensions", "index.ts"),
name: "clanker-teams",
entry: path.join(sourceRoot, "clanker-teams", "extensions", "index.ts"),
},
{
name: "companion-grind",
entry: path.join(sourceRoot, "companion-grind", "src", "index.ts"),
name: "clanker-grind",
entry: path.join(sourceRoot, "clanker-grind", "src", "index.ts"),
},
];
const external = [
"@mariozechner/companion-agent-core",
"@mariozechner/companion-ai",
"@mariozechner/companion-ai/oauth",
"@mariozechner/companion-coding-agent",
"@mariozechner/companion-tui",
"@harivansh-afk/clanker-agent-core",
"@harivansh-afk/clanker-ai",
"@harivansh-afk/clanker-ai/oauth",
"@harivansh-afk/clanker-coding-agent",
"@harivansh-afk/clanker-tui",
"@sinclair/typebox",
];

View file

@ -35,7 +35,7 @@ function encodeSessionDir(dir: string): string {
return "--" + normalized.replace(/\//g, "-") + "--";
}
const sessionsBase = path.join(process.env.HOME!, ".companion/agent/sessions");
const sessionsBase = path.join(process.env.HOME!, ".clanker/agent/sessions");
const encodedDir = encodeSessionDir(directory);
const sessionsDir = path.join(sessionsBase, encodedDir);

View file

@ -1,6 +1,6 @@
#!/usr/bin/env node
/**
* Release script for companion
* Release script for clanker
*
* Usage: node scripts/release.mjs <major|minor|patch>
*

View file

@ -4,7 +4,7 @@
* optionally spawns subagents to analyze patterns.
*
* Usage: npx tsx scripts/session-transcripts.ts [--analyze] [--output <dir>] [cwd]
* --analyze Spawn companion subagents to analyze each transcript file
* --analyze Spawn clanker subagents to analyze each transcript file
* --output <dir> Output directory for transcript files (defaults to ./session-transcripts)
* cwd Working directory to extract sessions for (defaults to current)
*/
@ -94,7 +94,7 @@ function runSubagent(
): Promise<{ success: boolean }> {
return new Promise((resolve) => {
const child = spawn(
"companion",
"clanker",
["--mode", "json", "--tools", "read,write", "-p", prompt],
{
cwd,
@ -158,7 +158,7 @@ function runSubagent(
});
child.on("error", (err) => {
console.error(chalk.red(` Failed to spawn companion: ${err.message}`));
console.error(chalk.red(` Failed to spawn clanker: ${err.message}`));
resolve({ success: false });
});
});
@ -188,7 +188,7 @@ async function main() {
const cwd = resolve(cwdArg || process.cwd());
mkdirSync(outputDir, { recursive: true });
const sessionsBase = join(homedir(), ".companion/agent/sessions");
const sessionsBase = join(homedir(), ".clanker/agent/sessions");
const sessionDirName = cwdToSessionDir(cwd);
const sessionDir = join(sessionsBase, sessionDirName);
@ -281,13 +281,13 @@ async function main() {
if (!analyzeFlag) {
console.log(
"\nRun with --analyze to spawn companion subagents for pattern analysis.",
"\nRun with --analyze to spawn clanker subagents for pattern analysis.",
);
return;
}
// Find AGENTS.md files to compare against
const globalAgentsMd = join(homedir(), ".companion/agent/AGENTS.md");
const globalAgentsMd = join(homedir(), ".clanker/agent/AGENTS.md");
const localAgentsMd = join(cwd, "AGENTS.md");
const agentsMdFiles = [globalAgentsMd, localAgentsMd].filter(existsSync);
const agentsMdSection =