Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
023f3fa
Start
Hofer-Julian Mar 4, 2025
b57b7d8
Remove frontmatter
Hofer-Julian Mar 4, 2025
add25f1
Shift around more chapters
Hofer-Julian Mar 4, 2025
e93b34a
Remove examples
Hofer-Julian Mar 4, 2025
4daef96
Move around more files
Hofer-Julian Mar 4, 2025
e5a0aef
Adding socials
Hofer-Julian Mar 4, 2025
e137e96
Rename basic usage to getting started
Hofer-Julian Mar 4, 2025
6a39618
Fix broken links
Hofer-Julian Mar 4, 2025
01be0ca
Move part of the installation instructions to separate file
Hofer-Julian Mar 4, 2025
b75b84d
Rearrange a bit more
Hofer-Julian Mar 4, 2025
1750421
Refactor frontpage
Hofer-Julian Mar 5, 2025
f7cd7ca
Replace `[project]` with `[workspace]`
Hofer-Julian Mar 5, 2025
653f5b0
Restructuring
Hofer-Julian Mar 5, 2025
ce02de3
Extend pixi projects docs
Hofer-Julian Mar 5, 2025
75aea1b
Extend introduction and adapt tests
Hofer-Julian Mar 5, 2025
ebf9268
Getting started
Hofer-Julian Mar 6, 2025
3a7def6
Add heading
Hofer-Julian Mar 6, 2025
8dcdfc1
Extend index page
Hofer-Julian Mar 6, 2025
424d940
A bit more in index.md
Hofer-Julian Mar 6, 2025
38bdfc0
Continue with getting started
Hofer-Julian Mar 6, 2025
0b03485
Add emojis to index.md
Hofer-Julian Mar 6, 2025
6d95153
Finish getting started
Hofer-Julian Mar 6, 2025
79b3652
Extend installation docs
Hofer-Julian Mar 6, 2025
7774c91
More installation docs
Hofer-Julian Mar 6, 2025
8f4a6bc
Update docs/index.md
Hofer-Julian Mar 6, 2025
3f45365
Update snapshots
Hofer-Julian Mar 6, 2025
ed32db2
Update docs/index.md
Hofer-Julian Mar 7, 2025
b3da82c
Merge branch 'main' into docs/refactor
Hofer-Julian Mar 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/pixi_build_type_conversions/src/project_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ mod tests {
#[rstest]
#[test]
fn test_conversions_v1_docs(
#[files("../../docs/source_files/pixi_projects/pixi_build_*/pixi.toml")]
#[files("../../docs/source_files/pixi_workspaces/pixi_build/*/pixi.toml")]
manifest_path: PathBuf,
) {
snapshot_test!(manifest_path);
Expand Down
5 changes: 0 additions & 5 deletions docs/Community.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
part: pixi
title: Community
description: Who is using pixi?
---
# Community

When you want to show your users and contributors that they can use pixi in your repo, you can use the following badge:
Expand Down
5 changes: 0 additions & 5 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
part: pixi
title: Frequently asked questions
description: What questions did we encounter more often?
---
## What is the difference with `conda`, `mamba`, `poetry`, `pip`

| Tool | Installs python | Builds packages | Runs predefined tasks | Has lock files builtin | Fast | Use without python |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Channel Logic

All logic regarding the decision which dependencies can be installed from which channel is done by the instruction we give the solver.

The actual code regarding this is in the [`rattler_solve`](https://github.com/conda/rattler/blob/02e68c9539c6009cc1370fbf46dc69ca5361d12d/crates/rattler_solve/src/resolvo/mod.rs) crate.
This might however be hard to read.
Therefore, this document will continue with simplified flow charts.

# Channel specific dependencies
## Channel specific dependencies

When a user defines a channel per dependency, the solver needs to know the other channels are unusable for this dependency.
```toml
[project]
[workspace]
channels = ["conda-forge", "my-channel"]

[dependencies]
Expand All @@ -32,7 +35,7 @@ flowchart TD
Channel priority is dictated by the order in the `project.channels` array, where the first channel is the highest priority.
For instance:
```toml
[project]
[workspace]
channels = ["conda-forge", "my-channel", "your-channel"]
```
If the package is found in `conda-forge` the solver will not look for it in `my-channel` and `your-channel`, because it tells the solver they are excluded.
Expand Down Expand Up @@ -62,7 +65,7 @@ If you have 10 channels and the package is found in the 5th channel it will excl
# Use case: pytorch and nvidia with conda-forge
A common use case is to use `pytorch` with `nvidia` drivers, while also needing the `conda-forge` channel for the main dependencies.
```toml
[project]
[workspace]
channels = ["nvidia/label/cuda-11.8.0", "nvidia", "conda-forge", "pytorch"]
platforms = ["linux-64"]

Expand Down Expand Up @@ -92,10 +95,10 @@ If you want to force a specific priority for a channel, you can use the `priorit
The higher the number, the higher the priority.
Non specified priorities are set to 0 but the index in the array still counts as a priority, where the first in the list has the highest priority.

This priority definition is mostly important for [multiple environments](../features/multi_environment.md) with different channel priorities, as by default feature channels are prepended to the project channels.
This priority definition is mostly important for [multiple environments](../environments/multi_environment.md) with different channel priorities, as by default feature channels are prepended to the project channels.

```toml
[project]
[workspace]
name = "test_channel_priority"
platforms = ["linux-64", "osx-64", "win-64", "osx-arm64"]
channels = ["conda-forge"]
Expand Down
9 changes: 2 additions & 7 deletions docs/advanced/explain_info_command.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
part: pixi/advanced
title: Info command
description: Learn what the info command reports
---

`pixi info` prints out useful information to debug a situation or to get an overview of your machine/project.
This information can also be retrieved in `json` format using the `--json` flag, which can be useful for programmatically reading it.
Expand Down Expand Up @@ -57,11 +52,11 @@ In that case, if pixi cannot find the `__cuda` virtual package on your machine t
### Cache dir

The directory where pixi stores its cache.
Checkout the [cache documentation](../features/environment.md#caching-packages) for more information.
Checkout the [cache documentation](../environments/environment.md#caching-packages) for more information.

### Auth storage

Check the [authentication documentation](authentication.md)
Check the [authentication documentation](../deployment/authentication.md)

### Cache size

Expand Down
190 changes: 190 additions & 0 deletions docs/advanced/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# Installation

To install `pixi` you can run the following command in your terminal:

=== "Linux & macOS"
```bash
curl -fsSL https://pixi.sh/install.sh | bash
```

The above invocation will automatically download the latest version of `pixi`, extract it, and move the `pixi` binary to `~/.pixi/bin`.
The script will also extend the `PATH` environment variable in the startup script of your shell to include `~/.pixi/bin`.
This allows you to invoke `pixi` from anywhere.

=== "Windows"
```powershell
powershell -ExecutionPolicy ByPass -c "irm -useb https://pixi.sh/install.ps1 | iex"
```

The above invocation will automatically download the latest version of `pixi`, extract it, and move the `pixi` binary to `LocalAppData/pixi/bin`.
The command will also add `LocalAppData/pixi/bin` to your `PATH` environment variable, allowing you to invoke `pixi` from anywhere.

!!! tip

You might need to restart your terminal or source your shell for the changes to take effect.

## Update

Updating is as simple as installing, rerunning the installation script gets you the latest version.

```shell
pixi self-update
```
Or get a specific pixi version using:
```shell
pixi self-update --version x.y.z
```

!!! note
If you've used a package manager like `brew`, `mamba`, `conda`, `paru` etc. to install `pixi`
you must use the built-in update mechanism. e.g. `brew upgrade pixi`.


## Alternative Installation Methods

Although we recommend installing pixi through the above method we also provide additional installation methods.

### Homebrew

Pixi is available via homebrew. To install pixi via homebrew simply run:

```shell
brew install pixi
```

### Windows Installer

We provide an `msi` installer on [our GitHub releases page](https://github.com/prefix-dev/pixi/releases/latest).
The installer will download pixi and add it to the path.

### Winget

```
winget install prefix-dev.pixi
```

### Install From Source

pixi is 100% written in Rust, and therefore it can be installed, built and tested with cargo.
To start using pixi from a source build run:

```shell
cargo install --locked --git https://github.com/prefix-dev/pixi.git pixi
```

We don't publish to `crates.io` anymore, so you need to install it from the repository.
The reason for this is that we depend on some unpublished crates which disallows us to publish to `crates.io`.

or when you want to make changes use:

```shell
cargo build
cargo test
```

If you have any issues building because of the dependency on `rattler` checkout
its [compile steps](https://github.com/conda/rattler/tree/main#give-it-a-try).


## Installer Script Options

=== "Linux & macOS"

The installation script has several options that can be manipulated through environment variables.

| Variable | Description | Default Value |
|----------------------|------------------------------------------------------------------------------------|-----------------------|
| `PIXI_VERSION` | The version of pixi getting installed, can be used to up- or down-grade. | `latest` |
| `PIXI_HOME` | The location of the binary folder. | `$HOME/.pixi` |
| `PIXI_ARCH` | The architecture the pixi version was built for. | `uname -m` |
| `PIXI_NO_PATH_UPDATE`| If set the `$PATH` will not be updated to add `pixi` to it. | |
| `TMP_DIR` | The temporary directory the script uses to download to and unpack the binary from. | `/tmp` |

For example, on Apple Silicon, you can force the installation of the x86 version:
```shell
curl -fsSL https://pixi.sh/install.sh | PIXI_ARCH=x86_64 bash
```
Or set the version
```shell
curl -fsSL https://pixi.sh/install.sh | PIXI_VERSION=v0.18.0 bash
```

=== "Windows"

The installation script has several options that can be manipulated through environment variables.

| Variable | Environment variable | Description | Default Value |
|------------------|----------------------|-----------------------------------------------------------------------------------|-----------------------------|
| `PixiVersion` | `PIXI_VERSION` |The version of pixi getting installed, can be used to up- or down-grade. | `latest` |
| `PixiHome` | `PIXI_HOME` | The location of the installation. | `$Env:USERPROFILE\.pixi` |
| `NoPathUpdate` | | If set, the `$PATH` will not be updated to add `pixi` to it. | |

For example, set the version using:

```powershell
iwr -useb https://pixi.sh/install.ps1 | iex -Args "-PixiVersion v0.18.0"
```


## Autocompletion

To get autocompletion follow the instructions for your shell.
Afterwards, restart the shell or source the shell config file.


### Bash (default on most Linux systems)

Add the following to the end of `~/.bashrc`:

```bash title="~/.bashrc"

eval "$(pixi completion --shell bash)"
```
### Zsh (default on macOS)

Add the following to the end of `~/.zshrc`:


```zsh title="~/.zshrc"

autoload -Uz compinit && compinit # redundant with Oh My Zsh
eval "$(pixi completion --shell zsh)"
```

### PowerShell (pre-installed on all Windows systems)

Add the following to the end of `Microsoft.PowerShell_profile.ps1`.
You can check the location of this file by querying the `$PROFILE` variable in PowerShell.
Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or
`~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.

```pwsh
(& pixi completion --shell powershell) | Out-String | Invoke-Expression
```

### Fish

Add the following to the end of `~/.config/fish/config.fish`:

```fish title="~/.config/fish/config.fish"

pixi completion --shell fish | source
```

### Nushell

Add the following to your Nushell config file (find it by running `$nu.config-path` in Nushell):

```nushell
mkdir $"($nu.data-dir)/vendor/autoload"
pixi completion --shell nushell | save --force $"($nu.data-dir)/vendor/autoload/pixi-completions.nu"
```

### Elvish

Add the following to the end of `~/.elvish/rc.elv`:

```elv title="~/.elvish/rc.elv"

eval (pixi completion --shell elvish | slurp)
```
5 changes: 0 additions & 5 deletions docs/advanced/shebang.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
part: pixi/advanced
title: Self-contained scripts
description: Learn how to write self-contained shell scripts using `pixi exec`
---

# Using `pixi exec` to create self-contained scripts

Expand Down
Loading
Loading