ctx-switch 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1828,7 +1828,7 @@ async function promptForSource() {
1828
1828
  }
1829
1829
  async function main(argv = process.argv.slice(2)) {
1830
1830
  const options = parseArgs(argv);
1831
- const pkgInfo = { name: "ctx-switch", version: "2.0.0" };
1831
+ const pkgInfo = { name: "ctx-switch", version: "2.0.1" };
1832
1832
  const ui = createTheme(process.stderr);
1833
1833
  if (options.help) {
1834
1834
  process.stdout.write(`${getHelpText(pkgInfo)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-switch",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Switch context between AI coding agents — extract sessions from Claude Code, Codex, or OpenCode and generate handoff prompts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -43,12 +43,12 @@
43
43
  "node": ">=18"
44
44
  },
45
45
  "bugs": {
46
- "url": "https://github.com/C-W-D-Harshit/cc-continue/issues"
46
+ "url": "https://github.com/C-W-D-Harshit/ctx-switch/issues"
47
47
  },
48
- "homepage": "https://github.com/C-W-D-Harshit/cc-continue#readme",
48
+ "homepage": "https://github.com/C-W-D-Harshit/ctx-switch#readme",
49
49
  "repository": {
50
50
  "type": "git",
51
- "url": "https://github.com/C-W-D-Harshit/cc-continue"
51
+ "url": "https://github.com/C-W-D-Harshit/ctx-switch"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^24.6.0",
@@ -1,131 +0,0 @@
1
- # cc-continue
2
-
3
- > **This package is being renamed to [`ctx-switch`](https://www.npmjs.com/package/ctx-switch).** Install `ctx-switch` for the latest version. `cc-continue` will continue to work but will no longer receive updates.
4
-
5
- Switch context between AI coding agents. Extract sessions from **Claude Code**, **Codex**, or **OpenCode** and generate a handoff prompt you can paste into any other AI agent to keep going.
6
-
7
- ## The Problem
8
-
9
- You're deep in a coding session — the agent is editing files, running commands, making progress — and then:
10
-
11
- > **Usage limit reached. Please wait before sending more messages.**
12
-
13
- Your work is half-done. You can't continue. You switch to another AI agent but now you have to explain everything from scratch.
14
-
15
- ## The Solution
16
-
17
- ```bash
18
- npx cc-continue
19
- ```
20
-
21
- Pick your source agent, and it reads the session, captures the current git state, and produces a structured continuation prompt that another agent can pick up immediately.
22
-
23
- ## Features
24
-
25
- - **Multi-source**: Extract sessions from Claude Code, Codex, or OpenCode
26
- - **Interactive picker**: Choose your source agent, or pass `--source claude|codex|opencode`
27
- - **Smart session discovery**: Finds the latest session for the current project directory
28
- - Filters noise from user messages (confirmations, short replies, interruptions)
29
- - Tracks only **unresolved** errors — skips errors that were later fixed
30
- - Captures recent commits, committed diffs, staged/unstaged changes, and untracked files
31
- - Extracts key decisions and pivots from the previous agent
32
- - Produces a priority-ordered prompt: Task → Errors → Decisions → Completed Work → Current State → Instructions
33
- - Supports target-specific prompts with `--target codex|cursor|chatgpt|generic`
34
- - Auto-copies to clipboard on macOS, Linux, and Windows
35
- - Optional LLM refinement via `--refine` (uses OpenRouter)
36
- - `sessions` command to list recent sessions
37
- - `doctor` command for diagnostics
38
-
39
- ## Install
40
-
41
- ```bash
42
- # Recommended: use the new package name
43
- npm i -g ctx-switch
44
-
45
- # Or the legacy name (still works)
46
- npm i -g cc-continue
47
- npx cc-continue
48
- ```
49
-
50
- ## Usage
51
-
52
- ```bash
53
- cd my-project
54
-
55
- # Interactive source picker (choose Claude/Codex/OpenCode)
56
- cc-continue
57
-
58
- # Specify the source directly
59
- cc-continue --source claude
60
- cc-continue --source codex
61
- cc-continue --source opencode
62
-
63
- # Target a specific agent for the output prompt
64
- cc-continue --source claude --target codex
65
-
66
- # Refine via OpenRouter LLM (optional)
67
- cc-continue --refine
68
-
69
- # List recent sessions
70
- cc-continue sessions --source claude --limit 5
71
-
72
- # Write to a file
73
- cc-continue --output ./handoff.md
74
-
75
- # Run diagnostics
76
- cc-continue doctor --source codex
77
- ```
78
-
79
- ### LLM Refinement (Optional)
80
-
81
- If you want the prompt refined by an LLM, use `--refine`. On first use, it'll ask for your OpenRouter API key:
82
-
83
- ```
84
- Enter your OpenRouter API key: sk-or-v1-...
85
- Saved to ~/.ctx-switch.json
86
- ```
87
-
88
- Get a free key at [openrouter.ai/keys](https://openrouter.ai/keys). You can also set it via environment variable:
89
-
90
- ```bash
91
- export OPENROUTER_API_KEY=sk-or-v1-...
92
- ```
93
-
94
- ## Key Flags
95
-
96
- - `--source <name>` Session source: `claude`, `codex`, or `opencode` (interactive if omitted)
97
- - `--target <name>` Tailor the prompt for `generic`, `codex`, `cursor`, or `chatgpt`
98
- - `--output <file>` Write the prompt to a file
99
- - `--session <id|path>` Use a specific session
100
- - `--refine` Refine the prompt via an LLM provider
101
- - `--provider <name>` Refinement provider (default: `openrouter`)
102
- - `--model <name>` Override the provider model (default: `openrouter/free`)
103
- - `--api-key <key>` Override the API key for a single run
104
-
105
- ## Session Storage
106
-
107
- | Source | Storage | Format |
108
- |--------|---------|--------|
109
- | Claude Code | `~/.claude/projects/<encoded-cwd>/*.jsonl` | JSONL |
110
- | Codex | `~/.codex/sessions/<year>/<month>/<day>/*.jsonl` | JSONL |
111
- | OpenCode | `~/.local/share/opencode/opencode.db` | SQLite |
112
-
113
- ## Requirements
114
-
115
- - **Node.js** >= 18
116
- - **At least one of**: Claude Code, Codex, or OpenCode (must have been used in the current directory)
117
- - **sqlite3** (only needed for OpenCode sessions)
118
- - **OpenRouter API key** (only needed with `--refine`)
119
-
120
- ## Migrating to ctx-switch
121
-
122
- ```bash
123
- npm uninstall -g cc-continue
124
- npm i -g ctx-switch
125
- ```
126
-
127
- Both `ctx-switch` and `cc-continue` commands work after installing either package.
128
-
129
- ## License
130
-
131
- MIT
@@ -1,142 +0,0 @@
1
- # ctx-switch
2
-
3
- > Formerly `cc-continue` — existing installs still work, just use `ctx-switch` going forward.
4
-
5
- Switch context between AI coding agents. Extract sessions from **Claude Code**, **Codex**, or **OpenCode** and generate a handoff prompt you can paste into any other AI agent to keep going.
6
-
7
- ## The Problem
8
-
9
- You're deep in a coding session — the agent is editing files, running commands, making progress — and then:
10
-
11
- > **Usage limit reached. Please wait before sending more messages.**
12
-
13
- Your work is half-done. You can't continue. You switch to another AI agent but now you have to explain everything from scratch.
14
-
15
- ## The Solution
16
-
17
- ```bash
18
- npx ctx-switch
19
- ```
20
-
21
- Pick your source agent, and it reads the session, captures the current git state, and produces a structured continuation prompt that another agent can pick up immediately.
22
-
23
- ## Features
24
-
25
- - **Multi-source**: Extract sessions from Claude Code, Codex, or OpenCode
26
- - **Interactive picker**: Choose your source agent, or pass `--source claude|codex|opencode`
27
- - **Smart session discovery**: Finds the latest session for the current project directory
28
- - Filters noise from user messages (confirmations, short replies, interruptions)
29
- - Tracks only **unresolved** errors — skips errors that were later fixed
30
- - Captures recent commits, committed diffs, staged/unstaged changes, and untracked files
31
- - Extracts key decisions and pivots from the previous agent
32
- - Produces a priority-ordered prompt: Task → Errors → Decisions → Completed Work → Current State → Instructions
33
- - Supports target-specific prompts with `--target codex|cursor|chatgpt|generic`
34
- - Auto-copies to clipboard on macOS, Linux, and Windows
35
- - Optional LLM refinement via `--refine` (uses OpenRouter)
36
- - `sessions` command to list recent sessions
37
- - `doctor` command for diagnostics
38
-
39
- ## How It Works
40
-
41
- 1. You pick the source agent (Claude Code, Codex, or OpenCode)
42
- 2. Finds the most recent session for your current project directory
43
- 3. Parses the conversation — user messages, tool calls, errors, and results
44
- 4. Captures the current git state: branch, commits, diffs, untracked files
45
- 5. Builds a structured prompt optimized for agent handoff
46
- 6. Copies to clipboard and prints to stdout
47
-
48
- ## Install
49
-
50
- ```bash
51
- # Run directly (no install needed)
52
- npx ctx-switch
53
-
54
- # Or install globally
55
- npm i -g ctx-switch
56
- ```
57
-
58
- ## Usage
59
-
60
- ```bash
61
- cd my-project
62
-
63
- # Interactive source picker (choose Claude/Codex/OpenCode)
64
- ctx-switch
65
-
66
- # Specify the source directly
67
- ctx-switch --source claude
68
- ctx-switch --source codex
69
- ctx-switch --source opencode
70
-
71
- # Target a specific agent for the output prompt
72
- ctx-switch --source claude --target codex
73
-
74
- # Pick a specific session
75
- ctx-switch --source claude --session 4474da94-50a9-40de-9afe-c6c73acf2401
76
-
77
- # Refine via OpenRouter LLM (optional)
78
- ctx-switch --refine
79
-
80
- # List recent sessions
81
- ctx-switch sessions --source claude --limit 5
82
-
83
- # Write to a file
84
- ctx-switch --output ./handoff.md
85
-
86
- # Run diagnostics
87
- ctx-switch doctor --source codex
88
- ```
89
-
90
- ### LLM Refinement (Optional)
91
-
92
- If you want the prompt refined by an LLM, use `--refine`. On first use, it'll ask for your OpenRouter API key:
93
-
94
- ```
95
- Enter your OpenRouter API key: sk-or-v1-...
96
- Saved to ~/.ctx-switch.json
97
- ```
98
-
99
- Get a free key at [openrouter.ai/keys](https://openrouter.ai/keys). You can also set it via environment variable:
100
-
101
- ```bash
102
- export OPENROUTER_API_KEY=sk-or-v1-...
103
- ```
104
-
105
- ## Key Flags
106
-
107
- - `--source <name>` Session source: `claude`, `codex`, or `opencode` (interactive if omitted)
108
- - `--target <name>` Tailor the prompt for `generic`, `codex`, `cursor`, or `chatgpt`
109
- - `--output <file>` Write the prompt to a file
110
- - `--session <id|path>` Use a specific session
111
- - `--refine` Refine the prompt via an LLM provider
112
- - `--provider <name>` Refinement provider (default: `openrouter`)
113
- - `--model <name>` Override the provider model (default: `openrouter/free`)
114
- - `--api-key <key>` Override the API key for a single run
115
-
116
- ## Session Storage
117
-
118
- | Source | Storage | Format |
119
- |--------|---------|--------|
120
- | Claude Code | `~/.claude/projects/<encoded-cwd>/*.jsonl` | JSONL |
121
- | Codex | `~/.codex/sessions/<year>/<month>/<day>/*.jsonl` | JSONL |
122
- | OpenCode | `~/.local/share/opencode/opencode.db` | SQLite |
123
-
124
- ## Requirements
125
-
126
- - **Node.js** >= 18
127
- - **At least one of**: Claude Code, Codex, or OpenCode (must have been used in the current directory)
128
- - **sqlite3** (only needed for OpenCode sessions)
129
- - **OpenRouter API key** (only needed with `--refine`)
130
-
131
- ## Migrating from cc-continue
132
-
133
- `cc-continue` still works — it's an alias for `ctx-switch`. You'll see a one-line deprecation notice reminding you to switch. No other changes needed.
134
-
135
- ```bash
136
- npm uninstall -g cc-continue
137
- npm i -g ctx-switch
138
- ```
139
-
140
- ## License
141
-
142
- MIT