Skip to content
typsooPublic

About

Fast Rust CLI for saving and restoring VS Code workspaces and Firefox sessions

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevSnap

A lightweight, fast CLI tool written in Rust to snapshot and restore Linux dev workspaces.


Tech Stack

Crates I used:

Crate Purpose
clap Subcommand parsing (init, save, restore, rewrite, delete) using derive macros
serde / serde_json Serializes structured workspace snapshot files to disk
inquire Provides interactive terminal prompts and selection menus
sysinfo Queries the system process table to inspect running application instances
rust-ini Parses INI configuration files (e.g., Firefox profile paths)
lz4_flex High-performance LZ4 compression support for compact snapshot data
dirs Cross-platform resolution of user directories (~/.local/share/devsnap/)
anyhow Idiomatic, flexible Rust error handling

How It Works

DevSnap reads the current VS Code workspace state and Firefox session files from their local application directories. It saves the collected data as named JSON snapshots in ~/.local/share/devsnap/snapshots/, then reads those snapshots to restore the workspace.


Installation

Install Rust and Cargo, then build DevSnap from source:

git clone https://github.com/your-username/DevSnap.git
cd DevSnap
cargo build --release

The compiled executable will be generated at target/release/devsnap.

To run devsnap from anywhere in your shell, copy the binary to your local PATH (ensure ~/.local/bin is included in your $PATH):

cp target/release/devsnap ~/.local/bin/

CLI Commands & Usage

DevSnap combines direct subcommands with interactive terminal menus (inquire).

1. init

Initializes the local snapshot storage directory (~/.local/share/devsnap/snapshots/).

devsnap init

2. save

Captures your active VS Code workspaces and Firefox sessions into a named snapshot.

devsnap save <workspace-name>

Example:

devsnap save backend-refactor

3. restore

Opens an interactive terminal menu listing saved snapshots. Selecting a workspace launches its applications and restores your environment.

devsnap restore

4. rewrite

Interactively select and overwrite an existing snapshot with your current workspace state.

devsnap rewrite

5. delete

Opens an interactive terminal menu to delete a saved workspace snapshot.

devsnap delete

About

Fast Rust CLI for saving and restoring VS Code workspaces and Firefox sessions

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages