CommandsAll pixi cli subcommands
Danger
This is the old documentation website please visit the new site
Global options
--verbose (-v|vv|vvv)
Increase the verbosity of the output messages, the -v|vv|vvv increases the level of verbosity respectively.--help (-h)
Shows help information, use-h
to get the short version of the help.--version (-V)
: shows the version of pixi that is used.--quiet (-q)
: Decreases the amount of output.
init
This command is used to create a new project.
It initializes a pixi.toml
file and also prepares a .gitignore
to prevent the environment from being added to git
.
Options
--channel (-c)
: specify a channel that the project uses. Defaults toconda-forge
. (Allowed to be used more than once)
add
Adds dependencies to the pixi.toml
.
It will only add if the package with its version constraint is able to work with rest of the dependencies in the project.
More info on multi platform configuration.
Options
--manifest-path
: the path topixi.toml
, by default it searches for one in the parent directories.--host
: Specify that it is a host dependency, important for building a package.--build
: Specify that it is a build dependency, important for building a package.--no-install
: Don't install the package to the environment, only add the package to the lock-file.--platform (-p)
: The platform for which the dependency should be added. (Allowed to be used more than once)
install
Installs all dependencies specified in the lockfile pixi.lock
.
Which gets generated on pixi add
or when you manually change the pixi.toml
file and run pixi install
.
Options
--manifest-path
: the path topixi.toml
, by default it searches for one in the parent directories.--frozen
: install the environment as defined in the lockfile. Without checking the status of the lockfile.--locked
: only install if thepixi.lock
is up-to-date with thepixi.toml
1. Conflicts with--frozen
.
run
The run
commands first checks if the environment is ready to use.
When you didn't run pixi install
the run command will do that for you.
The custom tasks defined in the pixi.toml
are also available through the run command.
You cannot run pixi run source setup.bash
as source
is not available in the deno_task_shell
commandos and not an executable.
Options
--manifest-path
: the path topixi.toml
, by default it searches for one in the parent directories.--frozen
: install the environment as defined in the lockfile. Without checking the status of the lockfile.--locked
: only install if thepixi.lock
is up-to-date with thepixi.toml
1. Conflicts with--frozen
.
Info
In pixi
the deno_task_shell
is the underlying runner of the run command.
Checkout their documentation for the syntax and available commands.
This is done so that the run commands can be run across all platforms.
task
If you want to make a shorthand for a specific command you can add a task for it.
Options
--manifest-path
: the path topixi.toml
, by default it searches for one in the parent directories.
task add
Add a task to the pixi.toml
, use --depends-on
to add tasks you want to run before this task, e.g. build before an execute task.
Options
--platform
: the platform for which this task should be added.--depends-on
: the task it depends on to be run before the one your adding.--cwd
: the working directory for the task relative to the root of the project.
This adds the following to the pixi.toml
:
Which you can then run with the run
command:
task remove
Remove the task from the pixi.toml
task alias
Give a task a new name or concatenate multiple tasks into one name.
Adds the last line to the pixi.toml
:
Info
In pixi
the deno_task_shell
is the underlying runner of the tasks.
Checkout their documentation for the syntax and available commands.
This is done so that the tasks defined can be run across all platforms.
shell
This command starts a new shell in the project's environment.
To exit the pixi shell, simply run exit
.
Options
--manifest-path
: the path topixi.toml
, by default it searches for one in the parent directories.--frozen
: install the environment as defined in the lockfile. Without checking the status of the lockfile.--locked
: only install if thepixi.lock
is up-to-date with thepixi.toml
1. Conflicts with--frozen
.
info
Shows helpful information about the pixi installation, cache directories, disk usage, and more. More information here.
Options
--extended
: extend the information with more slow queries to the system, like directory sizes.--json
: Get a machine-readable version of the information as output.
upload
Upload a package to a prefix.dev channel
auth
This command is used to authenticate the user's access to remote hosts such as prefix.dev
or anaconda.org
for private channels.
auth login
Store authentication information for given host.
Tip
The host is real hostname not a channel.
Options
--token
: The token to use for authentication with prefix.dev.--username
: The username to use for basic HTTP authentication--password
: The password to use for basic HTTP authentication.--conda-token
: The token to use onanaconda.org
/quetz
authentication.
auth logout
Remove authentication information for a given host.
global
Global is the main entry point for the part of pixi that executes on the global(system) level.
global install
This command installs a package into its own environment and adds the binary to PATH
, allowing you to access it anywhere on your system without activating the environment.
Options
--channel (-c)
: specify a channel that the project uses. Defaults toconda-forge
. (Allowed to be used more than once)
After using global install, you can use the package you installed anywhere on your system.
global info
This command shows the current installed global environments including what binaries come with it. A global installed package/environment can possibly contain multiple binaries. Here is an example of a few installed packages:
> pixi global info
Globally installed binary packages:
- [package] starship
- [bin] starship
- [package] pre-commit
- [bin] pre-commit
- [package] grayskull
- [bin] grayskull
- [bin] greyskull
- [bin] conda-grayskull
- [bin] conda-greyskull
- [package] zsh
- [bin] zsh
- [bin] zsh-5
global remove
Removes a package previously installed into a globally accessible location via
pixi global install
Use pixi global info
to find out what the package name is that belongs to the tool you want to remove.
pixi global remove pre-commit
project
This subcommand allows you to modify the project configuration through the command line interface.
Options
--manifest-path
: the path topixi.toml
, by default it searches for one in the parent directories.--no-install
: do not update the environment, only add changed packages to the lock-file.
project channel add
Add channels to the channel list in the project configuration. When you add channels, the channels are tested for existence, added to the lockfile and the environment is reinstalled.
Options
--no-install
: do not update the environment, only add changed packages to the lock-file.
pixi project channel add robostack
pixi project channel add bioconda conda-forge robostack
pixi project channel add file:///home/user/local_channel
pixi project channel add https://repo.prefix.dev/conda-forge
pixi project channel add --no-install robostack
Footnotes
-
An up-to-date lockfile means that the dependencies in the lockfile are allowed by the dependencies in the manifest file. For example
- a
pixi.toml
withpython = ">= 3.11"
is up-to-date with aname: python, version: 3.11.0
in thepixi.lock
. - a
pixi.toml
withpython = ">= 3.12"
is not up-to-date with aname: python, version: 3.11.0
in thepixi.lock
.
Being up-to-date does not mean that the lockfile holds the latest version available on the channel for the given dependency. ↩ ↩2 ↩3
- a