Skip to content

Create and restore VSCode images. A backup and restore functionality for your editor.

License

Notifications You must be signed in to change notification settings

destin-v/vscode_imager

Repository files navigation

drawing

📒 Description

drawing

pre-commit pdoc pytest

VSCode is an extensible editor with great customization and flexibility. However, this can cause issues when the editor falls into a corrupted state due to extension modifications, user settings, or even version upgrades.

This repo provides a VSCode imager that will make an image of your VSCode settings so that you can always restore back to a previous working state.

It is recommended that you first setup VSCode to be working prior to using this imager. Once you image your working VSCode state, you can use the image to restore it back to this working state in the future.

🛠️ Installation

Requires python >=3.10.

pip install poetry          # install poetry if you don't have it
poetry install              # regular install
poetry install --with=dev   # development install
poetry update               # update existing modules to latest

📔 Usage

The Command Line Interface (CLI) can be access via:

python src/main.py -h

To create a new image simply type:

python src/main.py create-image     # will create a new image tagged by month/day/year

To restore your VsCode image simply type:

python src/main.py restore-image <image_path>    # will restore an image tagged by path

♾️ Continuous Integration (CI) Tools

Several CI tools have been included with this codex:

  • coverage: provides code coverage analysis
  • pdoc: automatic documentation software
  • scalene: profiler for evaluating performance

The noxfile.py provides an example of how to run each of these. The src/ci folder contains common CI modules. For an explaination on how to properly setup multiple versions of Python to run with Nox see here.

🧭 Website

Documentation of the code is provided via pdoc which hosts a website and provides a search engine. To display the website:

nox -r -s autodoc

🔧 Troubleshooting

You cannot have VSCode open when attempting to create an image because there are certain files that the program opens and locks. If VSCode is open while using this imager you will likely see an error that states:

"[Errno 102] Operation not supported on socket: '.../Library/Application Support/Code/1.84-main.sock'"

The recommended way to use this CLI is through a terminal.

About

Create and restore VSCode images. A backup and restore functionality for your editor.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published