Skip to content

nushell-prophet/cozy-docker-sandbox-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cozy-docker-sandbox-toolkit

Maintain running cozy containers without recreating them.

Rebuilding a sandbox means re-authenticating Claude and losing session state. This toolkit updates modules, syncs repos, and persists shell history inside a live container — so you don't have to rebuild.

Symlinked at ~/toolkit.nu inside the container and auto-activated via Nushell hooks.

Commands

toolkit sync-repos

Pulls the latest changes for a predefined set of Nushell module repos under ~/repos/. Handles branch switching, dirty working tree detection, and converting vendored directories to proper git repos.

use toolkit.nu; toolkit sync-repos       # skip repos with local changes
use toolkit.nu; toolkit sync-repos -f    # force: discard local changes and switch branches

toolkit mount init

Idempotent initialization of multi-repo workspaces. Discovers git subdirectories, registers them as git submodules, generates .gitmodules and .gitignore. Safe to re-run after adding new directories.

use toolkit.nu; toolkit mount init

Sets git config --global safe.directory '*' — intentional for sandboxed environments where file ownership differs from the container user.

toolkit history export

Exports Nushell's SQLite history database to a timestamped .nuon file. Reads the database directly, so it works from any context (interactive shell, scripts, nu -c).

use toolkit.nu; toolkit history export                    # default: ~/workspace/mounted/sandbox-state/history-<timestamp>.nuon
use toolkit.nu; toolkit history export ./my-history.nuon  # custom path

toolkit history import

Imports history records from a .nuon file back into the SQLite database. Without a path, picks the most recent history-*.nuon file in sandbox-state/ by name. Deduplicates incoming rows and skips entries already present in the database.

use toolkit.nu; toolkit history import                    # from latest export
use toolkit.nu; toolkit history import ./my-history.nuon  # from specific file

License

MIT

About

Maintain running cozy containers without recreating them

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors