Save and restore full terminal context for developers juggling multiple repos
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ctx_switcher-0.1.0.tar.gz.
File metadata
- Download URL: ctx_switcher-0.1.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84e340c2ffb57c3a9ba0b59229a60dd47935090d81009923be10029dcfa4482c
|
|
| MD5 |
38bf5d66bf4117af1af31d238b73c936
|
|
| BLAKE2b-256 |
5ad6b674aca08842724f2ca5ff41b7bfc48ba00b8fe38cf800cbf58f1c200503
|
File details
Details for the file ctx_switcher-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ctx_switcher-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d1f2dfe3dba987ae8e7fd83203612b2d97d655d6be9467ae384f58b865a5084
|
|
| MD5 |
7035bf7b641ccfbf89cbe0f29d4835e9
|
|
| BLAKE2b-256 |
514ee5362088a912bbf6bc4abebfed6e728ce0dec99fc44e331afd205fbe1234
|