Skip to content

DJSaunders1997/Conda-Wingman

Repository files navigation

Conda Wingman

GitHub license PRs Welcome Release

Banner

Version Downloads Ratings

Considering a new project? If you're starting fresh, take a look at uv — it's a modern, fast Python package manager that's rapidly replacing Conda/pip for many workflows. The companion extension UV Wingman offers inline version hints, dependency graphs, PyPI links, and more.

This is the README for the extension Conda Wingman.

This extension aims to help VSCode users manage and interact with Conda environments. Conda Wingman aims to add QoL improvements that help programmers use environments without having to memorise all of the conda commands.

Features

VSCode Screenshot

Conda Wingman dynamically adds status bar items for quick Conda command access when a YAML file is open, simplifying Conda environment management directly within VSCode.

These can also be accessed from the VScode command pallet: Command Pallet

The supported commands are:

Creating Environments

  • Command: Create a Conda environment from the open requirements file by running: conda env create -f YOUR-REQUIREMENTS.YML
  • VS Code Command Palette: >Conda Wingman: Build Conda Environment from YAML file

Activating Environments

  • Command: Activate an existing Conda environment with: conda activate YOUR-ENVIRONMENT
  • VS Code Command Palette: >Conda Wingman: Activate Conda Environment

Writing Requirements Files

  • Command: Export the active Conda environment to a requirements file with: conda env export > YOUR_REQUIREMENTS_FILE
  • VS Code Command Palette: >Conda Wingman: Write a requirements YAML file from the active Conda Environment

Deleting Environments

  • Command: Remove an existing Conda environment by first deactivating, then removing it with:
    conda deactivate
    conda env remove -n YOUR-ENVIRONMENT
    
  • VS Code Command Palette: >Conda Wingman: Delete Conda Environment

Switch Environment

  • Command: Pick from all available conda environments and activate the selected one.
  • VS Code Command Palette: >Conda Wingman: Switch Environment

Clickable Package Links

Package names in conda environment YAML files are clickable — conda packages link to anaconda.org, pip sub-dependencies link to PyPI.

Hover Tooltips

Hover over a package name in a YAML file to see its description and latest version from PyPI.

Active Environment in Status Bar

The status bar shows the current conda environment name and Python version, detected from the open YAML file. Click it to switch environments.

Auto-Set Python Interpreter

When a conda environment is detected, the workspace Python interpreter (python.defaultInterpreterPath) is automatically set to point to it.

Settings

Setting Default Description
condaWingman.showStatusBarItems true Show/hide status bar buttons
condaWingman.autoSetInterpreter true Auto-set workspace Python interpreter from conda env

Release Notes

See CHANGELOG for more information.

Contributing

All contributions are welcome! Please feel free to fork the repository and create a pull request.

License

Distributed under the MIT License. See LICENSE for more information.

Author

David Saunders - 2024

About

VSCode Extension: Conda Wingman aims to help VSCode users manage and interact with Conda environments.

Topics

Resources

License

Stars

Watchers

Forks

Packages