You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update README for GitHub Copilot CLI support
- tagline now mentions Copilot CLI
- install section lists Copilot CLI activation step
- benchmarks table updated to 10/10 with Copilot session fixture
- config section shows both claude and copilot paths
- new GitHub Copilot CLI section (hooks, memory injection, escape hatch)
- How it works updated to cover Copilot CLI hook architecture
- local dev section simplified (bench/run.sh now auto-detects binary)
Token compression + context optimization for Claude Codeand OpenCode. Runs automatically in Claude Code. Manual usage in OpenCode.
7
+
Token compression + context optimization for Claude Code, OpenCode, and GitHub Copilot CLI. Runs automatically in Claude Code and Copilot CLI. Manual usage in OpenCode.
- Claude Code / default: `~/.claude/squeez/config.ini`
55
+
- Copilot CLI: `~/.copilot/squeez/config.ini`
52
56
```ini
53
57
# Compression
54
58
max_lines = 200
@@ -64,11 +68,13 @@ memory_retention_days = 30 # how long to keep session summaries
64
68
65
69
## How it works
66
70
67
-
Three Claude Code hooks work together:
71
+
### Claude Code & Copilot CLI
72
+
73
+
Three hooks work together:
68
74
69
75
**Compression** (`PreToolUse`): Every Bash call is rewritten — `git status` → `squeez wrap git status`. The wrap command runs via `sh -c`, captures stdout+stderr, applies 4 strategies (smart_filter → dedup → grouping → truncation), and prints a compressed result with a savings header.
70
76
71
-
**Session memory** (`SessionStart`): On each new session, `squeez init` finalizes the previous session into a summary (files touched, errors resolved, test results, git events) and prints a memory banner so Claude has prior-session context from the start.
77
+
**Session memory** (`SessionStart`): On each new session, `squeez init` finalizes the previous session into a summary (files touched, errors resolved, test results, git events) and prints a memory banner so the agent has prior-session context from the start. For Copilot CLI, this banner is also written to `~/.copilot/copilot-instructions.md` which is loaded automatically at every session.
72
78
73
79
**Token tracking** (`PostToolUse`): Every tool call's output size is tracked. When cumulative session tokens cross 80% of the context budget, a compact warning is emitted in the next bash output header.
Copilot CLI is supported via hooks registered in `~/.copilot/settings.json` and session memory injected into `~/.copilot/copilot-instructions.md`.
110
+
111
+
**Install:**
112
+
```bash
113
+
curl -fsSL https://raw.githubusercontent.com/claudioemmanuel/squeez/main/install.sh | sh
114
+
```
115
+
116
+
**What happens:**
117
+
- Session memory is written to `~/.copilot/copilot-instructions.md` — Copilot CLI reads this automatically at every session start, giving the agent prior-session context without re-discovery tokens
118
+
- Hooks are registered in `~/.copilot/settings.json` for PreToolUse (bash compression), SessionStart (memory refresh), and PostToolUse (token tracking)
119
+
- Session state is stored separately in `~/.copilot/squeez/` (independent from Claude Code state)
0 commit comments