Note
This extension is in early development and should not be considered stable. Please report any issues or feature requests to the GitHub repository.
The prefix team is working on a contribution to the official Python VSCode extension to add Pixi support. This extension will be augmented once that contribution is merged.
Command Palette Command | Context Menu (right-click on folder) | Pixi Command | Description |
---|---|---|---|
Pixi: Init |
Pixi: Init |
pixi init <project type> --platform <platform> --channel <channel> <PATH> |
Initialize a new Pixi project through an interactive menu to choose from available project types, platforms, and channels. |
Pixi: Add Channel |
Pixi: Add Channel |
pixi project channel add <channel> |
Add channels to an existing Pixi project through an interactive menu to choose from available channels. |
Pixi: Add Package |
Pixi: Add Package |
pixi add <package> |
Add packages to an existing Pixi project through an interactive menu to choose from available packages. |
Pixi: Add PyPi Package |
Pixi: Add PyPi Package |
pixi add <package> |
Add PyPi packages to an existing Pixi project through an interactive menu to choose from available packages. |
Pixi: Set Python Interpreter |
unavailable |
N/A |
Choose a environment from Pixi's environment list and set the Python interpreter for the workspace. |
Pixi: Activate Environment in new Terminal |
unavailable |
pixi shell -e <environment name> |
Activate a Pixi environment in a new terminal. |
Pixi: Clear Extension Cache |
unavailable |
N/A |
This extension stores previously selected channels and platforms in the extension's cache. This command clears the cache. |
Initialize a new Pixi project from:
- Command Palette (
Ctrl+Shift+P
thenPixi: Init
) - Context Menu (
Right Click
on a folder thenPixi: Init
) - Explorer when no workspace is open (
New Pixi Project
button)
Interactively select the project type (pixi
or pyproject
), additional platforms, and additional channels to add to the project.
Add channels to an existing Pixi project from:
- Command Palette (
Ctrl+Shift+P
thenPixi: Add Channel
) - Context Menu (
Right Click
on a folder thenPixi: Add Channel
)
Uses the Prefix.dev GraphQL API to fetch available public channels and prompt the user to select one.
You can set the pixi-vscode.defaultChannels
setting to include a list of channels that will be automatically be selected when the Pixi: Add Channel
command is run.
Tip
If you have custom channels hosted on Prefix.dev, you can add them to your project by add your
API key to the Pixi: Prefix API Key
setting in the VSCode settings.
The extension will then include your private channels in the list of available channels.
Add packages to an existing Pixi project from:
- Command Palette (
Ctrl+Shift+P
thenPixi: Add Package
) or (Ctrl+Shift+P
thenPixi: Add PyPi Package
) - Context Menu (
Right Click
on a folder thenPixi: Add Package
) or (Right Click
on a folder thenPixi: Add PyPi Package
)
Given an opened Pixi project, choose from the project's environments to set the Python interpreter for the workspace.
- Command Palette (
Ctrl+Shift+P
thenPixi: Set Python Interpreter
)
Warning
This command is only available when the Python extension is installed.
This comman also requires for each environment to be installed with
pixi install -e <environment name>
.
If you have not installed the environment, the command will behave unexpectedly.
- Need to create a testing suite for the extension.
- Implement a logging system for the extension.
- Implement CI/CD to:
- Run tests
- Semantic versioning
- Change log generation
- Implement release process:
- Build and package the extension
- Publish the extension to the marketplace
- Initialize a new Pixi project
- Add channels to an existing Pixi project
- Add packages to an existing Pixi project
- Set Python interpreter for a Pixi project
- refactor to check for installed environments and if the python binary exists.
- Add platforms to an existing Pixi project
- Run tasks via cmd palette
- Add pypi packages to a Pixi project
- Install an environment from a Pixi project.
- Add functionality to handle
pixi.toml
andpyproject.toml
files with [tool.pixi]
Not implemented yet
A lot more work is needed but it would be really cool to have some syntax
highlighting + recognizing syntax for features within the pixi.toml
and pyproject.toml
files.
Proof of concept highlighting the tasks and dependencies in a pixi.toml
file: