Fork local sessions across Codex, Claude, and Gemini with native resume-oriented handoff.
简体中文
·
Report Bug
·
Request Feature
- About The Project
- What Is New In 0.1.8
- Packages
- Getting Started
- CLI Usage
- MCP Usage
- Demo
- Development
- Roadmap
- Contributing
- License
AnyFork is an open-source toolkit for one specific workflow:
move a real local conversation from one AI coding CLI into another one, preserve the visible transcript, and seed a target-native resumable session when the destination format is known.
AnyFork is intentionally local-first:
- preserve visible transcript order
- export inspectable bridge artifacts under
.anyfork/ - seed native resume data for supported targets
- keep the public interface small enough to stay reliable
AnyFork is not trying to be:
- a cloud sync service
- a hosted memory backend
- a byte-for-byte clone of vendor-private hidden caches
- a replacement for Codex, Claude, or Gemini themselves
- Added
anyfork mcp installto register the AnyFork MCP server into Codex, Claude, and Gemini without overwriting existing MCP entries. - The new installer checks whether
anyforkis already present and only appends missing registrations. - Supports
--platforms,--npx,--name, and--commandso the MCP install flow can fit local or published setups. - Fixed
--npxregistration to target the published@floatfu-true/anyfork-mcp-server@latestpackage instead of assuming the CLI and MCP package versions always match. - Previous
0.1.6MCP search and import features remain unchanged:anyfork_list_sessions,anyfork_find_relevant_sessions,anyfork_import_session,anyfork_find_and_import.
@floatfu-true/anyfork-cliMain CLI forforkworkflows.@floatfu-true/anyfork-coreCore library for local session parsing, bridge artifacts, and native resume seeding.@floatfu-true/anyfork-mcp-serverMCP server that lets models find relevant local sessions and import them into the current project.
Node.js >= 22- source CLI installed locally
- target CLI installed locally if you want native resume handoff
npm install -g @floatfu-true/anyfork-cliVerify:
anyfork --helpGlobal install:
npm install -g @floatfu-true/anyfork-mcp-serverOne-off execution through npx:
npx -y @floatfu-true/anyfork-mcp-server@latestIf no subcommand is specified, AnyFork shows the main help.
Usage: anyfork [OPTIONS]
anyfork fork <FROM> <TO> <SESSION|last> [OPTIONS]
anyfork mcp install [OPTIONS]
Commands:
fork Fork a source session from one CLI into another CLI
mcp Install or inspect AnyFork MCP integration helpers
help Print this message or the help of the given subcommand(s)
Core command:
anyfork fork <from> <to> <session|last>Examples:
anyfork fork codex claude last
anyfork fork claude codex 20486cab-8ead-4410-b2d2-8bb6e66ae804
anyfork fork gemini claude 3c5c4e92-b356-483b-ab96-7d14321e7f0c
anyfork fork codex gemini last --prompt "Continue implementation"
anyfork fork codex claude last --dry-run
anyfork mcp install
anyfork mcp install --platforms codex,claudeBridge artifacts are written to:
.anyfork/bridges/<from>-to-<to>-<session>-<timestamp>/
bundle.json
handoff.md
Supported platforms:
codexclaudegemini
Supported directions:
codex -> claudecodex -> geminiclaude -> codexclaude -> geminigemini -> codexgemini -> claude
The MCP package is designed for agent-driven workflows:
- find sessions related to the user request
- rank the best candidates by transcript and project match
- import the chosen session into the current project
- keep the resulting context resumable in the target CLI when supported
anyfork_list_sessionsList local sessions across Codex, Claude, and Gemini.anyfork_find_relevant_sessionsSearch sessions by task, bug, or feature description.anyfork_import_sessionImport a known session into a target platform for the current project.anyfork_find_and_importSearch first, then import the best match in one call.
- Call
anyfork_find_relevant_sessionswith the user request and currentcwd. - Inspect the top candidates and confirm the score looks correct.
- Call
anyfork_import_sessionif the session id is known, oranyfork_find_and_importif you want one-step import. - Resume in the destination CLI through its native workflow.
AnyFork can now register its MCP server into Codex, Claude, and Gemini without overwriting other existing MCP entries:
anyfork mcp installUseful variants:
anyfork mcp install --platforms codex,claude
anyfork mcp install --npx
anyfork mcp install --command "node C:/tools/anyfork-mcp-server.js"Verified against local CLI help:
codex mcp add anyfork -- anyfork-mcp-serverOr with npx:
codex mcp add anyfork -- npx -y @floatfu-true/anyfork-mcp-server@latestVerified against local CLI help:
claude mcp add anyfork -- anyfork-mcp-serverOr with npx:
claude mcp add anyfork -- npx -y @floatfu-true/anyfork-mcp-server@latestVerified against local CLI help:
gemini mcp add anyfork anyfork-mcp-serverOr with npx:
gemini mcp add anyfork npx -y @floatfu-true/anyfork-mcp-server@latestExample prompt a model can satisfy through the MCP tools:
Find the AnyFork development session related to MCP integration bugs, then import it into the current project as a Codex-resumable session.
Typical structured import parameters:
{
"query": "AnyFork MCP integration bug and resume verification",
"to": "codex",
"cwd": "/absolute/path/to/current/project",
"onlyCurrentCwd": true,
"limit": 5,
"dryRun": false
}git clone https://github.com/FloatFu-true/Anyfork.git
cd Anyfork
npm install
npm testRun locally:
node packages/cli/src/index.js --help
node packages/cli/src/index.js fork codex claude last --dry-run
node packages/mcp/src/index.jsPack checks:
npm run pack:core
npm run pack:cli
npm run pack:mcp- Cross-CLI session bridge for all six directions
- Native resume seeding for Codex, Claude, and Gemini
- MCP server for search and import workflows
- Bilingual documentation
- Improve diagnostics for vendor-specific schema changes
- Add richer import verification utilities for resume parity checks
- Publish contribution and release workflow documents
Contributions are welcome. Please keep the public surface focused on practical session continuity instead of broad platform sprawl.
- Fork the project.
- Create a branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m "feat: add amazing feature" - Push the branch:
git push origin feature/amazing-feature - Open a pull request.
Distributed under the MIT License. See LICENSE.