squeez 0.4.1

End-to-end token optimizer for Claude Code, Copilot CLI, and OpenCode. Compresses bash output up to 95%, collapses redundant calls, injects caveman persona, and compresses memory files. Zero new dependencies.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const SQUEEZ_BIN = `${process.env.HOME}/.claude/squeez/bin/squeez`;

export const SqueezPlugin = async () => {
  return {
    "tool.execute.before": async (input, output) => {
      if (input.tool === "bash") {
        const command = output.args?.command;
        if (!command || typeof command !== "string") return;
        if (command.startsWith(SQUEEZ_BIN)) return;
        if (command.includes("squeez wrap")) return;
        if (command.startsWith("--no-squeez")) return;
        output.args.command = `${SQUEEZ_BIN} wrap ${command}`;
      }
    },
  };
};