Skip to content

About

Portable context for AI agents.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

ContextPort

Move working context between AI agent sessions.

hosts bundle format license

1. What Is ContextPort?

ContextPort exports context from one AI agent session and imports it into another session.

OpenClaw session
  -> contextport export
  -> portable bundle
  -> contextport import
  -> Codex session continues the work

ContextPort reads existing native session history. It does not modify native transcript files or replay previous tool calls.

2. Installation

Requirements: Node.js 20+ and OpenClaw or Codex.

git clone https://github.com/Xubqpanda/ContextPort.git
cd ContextPort
npm install
npm link

Exports work immediately after the common installation. Open the adapter setup below only when you need to import context into that host.

OpenClaw

Enable the ContextPort plugin and restart OpenClaw:

openclaw plugins install -l ./adapters/openclaw
openclaw plugins enable context-port

The plugin injects an imported bundle during before_prompt_build.

Codex CLI

No additional setup is required. The first Codex import automatically adds a managed UserPromptSubmit hook.

Codex may ask you to trust the hook the first time it runs.

3. Export And Import

The shortest OpenClaw to Codex workflow is:

contextport export --from openclaw -o task.contextport.json
contextport import task.contextport.json --to codex

That is the complete workflow. OpenClaw and Codex can both be used as the source or target.

OpenClaw commands

Export the latest OpenClaw session:

contextport export --from openclaw

Import a bundle into OpenClaw:

contextport import task.contextport.json --to openclaw

Select a specific OpenClaw session when needed:

contextport export --from openclaw --session SESSION_ID
contextport import task.contextport.json --to openclaw --session SESSION_ID
Codex CLI commands

Export the latest Codex session:

contextport export --from codex

Import a bundle into Codex:

contextport import task.contextport.json --to codex

Select a specific Codex session when needed:

contextport export --from codex --session SESSION_ID
contextport import task.contextport.json --to codex --session SESSION_ID

Without -o, exported bundles are written under ~/.contextport/exports/ and the generated path is printed in the terminal.

About

Portable context for AI agents.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages