Skip to main content

ctx

Save and restore full terminal context for developers juggling multiple repos and tasks.

What it does

One command to snapshot your entire working state — git branch, open files, env vars, running processes, tmux sessions, and notes — and restore it later.

ctx save "frontend-v2"              # Save current context
ctx save "frontend-v2" --note "WIP" # Save with a note
ctx load "frontend-v2"              # Restore it
ctx list                            # See all saved contexts

Installation

pip install ctx-switcher

Commands

Command Description
ctx save <name> Save current context
ctx load <name> Restore a saved context
ctx list List all saved contexts
ctx list --project <name> Filter by project
ctx show <name> Show context details
ctx delete <name> Delete a context
ctx diff <a> <b> Compare two contexts
ctx export <name> Export as JSON
ctx import <file> Import from JSON
ctx auto Auto-load context for cwd
ctx notes <name> <text> Add a note
ctx path <name> Show saved directory

What gets captured

  • Git state — branch, commit, modified files, stash count
  • Working directory — where you were
  • Environment variables — configurable via .ctx-config.yaml
  • Running processes — filtered to your user
  • Tmux session — if running
  • Timestamps & notes

Restoring

ctx load prints instructions to restore your state. To export env vars to your shell:

eval "$(ctx load frontend-v2 --env)"

Configuration

Create .ctx-config.yaml in your project or home directory:

env_vars:
  - NODE_ENV
  - DATABASE_URL
  - PORT
  - API_KEY

Storage

Contexts are stored at ~/.ctx-store/<hash>/<name>.json. Safe to delete anytime.

License

MIT

Metadata

Release files for ctx-switcher 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ctx-switcher 0.1.0
File Size Uploaded
ctx_switcher-0.1.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ctx-switcher 0.1.0
File Interpreter ABI Platform
ctx_switcher-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.2 kB

Release files / ctx_switcher-0.1.0.tar.gz

Download URL ctx_switcher-0.1.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
84e340c2ffb57c3a9ba0b59229a60dd47935090d81009923be10029dcfa4482c
BLAKE2b-256 checksum
How to use checksums
5ad6b674aca08842724f2ca5ff41b7bfc48ba00b8fe38cf800cbf58f1c200503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / ctx_switcher-0.1.0-py3-none-any.whl

Download URL ctx_switcher-0.1.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d1f2dfe3dba987ae8e7fd83203612b2d97d655d6be9467ae384f58b865a5084
BLAKE2b-256 checksum
How to use checksums
514ee5362088a912bbf6bc4abebfed6e728ce0dec99fc44e331afd205fbe1234
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page