Skip to content

Commit 4632c56

Browse files
committed
feat: add interactive setup wizard (CLI + curl installer)
- bunx @cortexkit/opencode-magic-context setup - curl install.sh detects bun/node and delegates - 8-step wizard: OpenCode check, model detection, plugin + compaction config, historian/dreamer/sidekick model selection, OMO compat - Cross-platform config paths (macOS, Linux, Windows) - Updates README with Quick Setup section and OMO compatibility note
1 parent 58757bb commit 4632c56

283 files changed

Lines changed: 64256 additions & 7 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,41 @@
2727

2828
## Get Started
2929

30-
Add to your OpenCode config (`opencode.json` or `opencode.jsonc`):
30+
### Quick Setup (Recommended)
3131

32-
```jsonc
33-
{
34-
"plugins": ["@cortexkit/opencode-magic-context@latest"]
35-
}
32+
Run the interactive setup wizard — it detects your models, configures everything, and handles compatibility:
33+
34+
```bash
35+
# One-liner install
36+
curl -fsSL https://raw.githubusercontent.com/cortexkit/opencode-magic-context/master/scripts/install.sh | bash
37+
38+
# Or run directly with bunx/npx
39+
bunx @cortexkit/opencode-magic-context setup
40+
npx @cortexkit/opencode-magic-context setup
3641
```
3742

38-
Magic Context conflicts with OpenCode's built-in compaction — the two cannot run together. To disable it:
43+
The wizard will:
44+
1. Check your OpenCode installation and available models
45+
2. Add the plugin and disable built-in compaction
46+
3. Help you pick models for historian, dreamer, and sidekick
47+
4. Handle oh-my-opencode compatibility if needed
48+
49+
### Manual Setup
50+
51+
Add to your OpenCode config (`opencode.json` or `opencode.jsonc`):
3952

4053
```jsonc
4154
{
55+
"plugin": ["@cortexkit/opencode-magic-context"],
4256
"compaction": {
4357
"auto": false,
4458
"prune": false
4559
}
4660
}
4761
```
4862

63+
> **Why disable compaction?** Magic Context manages context itself — built-in compaction interferes with its cache-aware deferred operations and would cause duplicate compression.
64+
4965
Create `magic-context.jsonc` in your project root, `.opencode/`, or `~/.config/opencode/`:
5066

5167
```jsonc
@@ -63,6 +79,22 @@ Create `magic-context.jsonc` in your project root, `.opencode/`, or `~/.config/o
6379

6480
That's it. Everything else has sensible defaults. Project config merges on top of user-wide settings.
6581

82+
### Oh-My-OpenCode Users
83+
84+
If you use [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode), disable the hooks that conflict with Magic Context in your `oh-my-opencode.json`:
85+
86+
```json
87+
{
88+
"disabled_hooks": [
89+
"context-window-monitor",
90+
"preemptive-compaction",
91+
"anthropic-context-window-limit-recovery"
92+
]
93+
}
94+
```
95+
96+
The setup wizard handles this automatically if it detects an oh-my-opencode config.
97+
6698
---
6799

68100
## What is Magic Context?
522 KB
Loading
491 KB
Loading
488 KB
Loading
483 KB
Loading
487 KB
Loading
494 KB
Loading

0 commit comments

Comments
 (0)