summaryrefslogtreecommitdiffstats
path: root/docs/overview.mdx
blob: 2746b66ca39f2bc22d141d1778b27527c81d35c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
part: pixi
title: Getting Started
description: Package management made easy
---

Pixi is a package management tool for developers.
It allows the developer to install libraries and applications in a reproducible way.
Use pixi cross-platform, on Windows, Mac and Linux.

# Installation

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

<Tabs groupId="install_os">
    <TabItem value="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`.
        If this directory does not already exist, the script will create it.

        The script will also update your `~/.bash_profile` to include `~/.pixi/bin` in your PATH, allowing you to invoke the `pixi` command from anywhere.

    </TabItem>
    <TabItem value="Windows">
        ```shell
        iwr -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`.
        If this directory does not already exist, the script will create it.

        The command will also automatically add `LocalAppData/pixi/bin` to your path allowing you to invoke `pixi` from anywhere.

    </TabItem>
</Tabs>

:::tip

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

:::

# Autocompletion

To get autocompletion run:

<Tabs groupId="install_os">
    <TabItem value="Linux & macOS">
        ```shell
        # Pick your shell (use `echo $SHELL` to find the shell you are using.):
        echo 'eval "$(pixi completion --shell bash)"' >> ~/.bashrc
        echo 'eval "$(pixi completion --shell zsh)"' >> ~/.zshrc
        echo 'pixi completion --shell fish | source' >> ~/.config/fish/config.fish
        echo 'eval (pixi completion --shell elvish | slurp)' >> ~/.elvish/rc.elv
        ```
    </TabItem>
    <TabItem value="Windows">
        ```powershell
        Add-Content -Path $PROFILE -Value '(& pixi completion --shell powershell) | Out-String | Invoke-Expression'
        ```
    </TabItem>
</Tabs>

And then restart the shell or source the shell config file.

## 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.

### Install from source

pixi is 100% written in Rust, and therefore it can be installed, build 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
```

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
it's [compile steps](https://github.com/mamba-org/rattler/tree/main#give-it-a-try)

## Uninstall

To uninstall pixi from your system, simply remove the binary.

<Tabs groupId="install_os">
    <TabItem value="Linux & macOS">
        ```shell
        rm ~/.pixi/bin/pixi
        ```
    </TabItem>
    <TabItem value="Windows">
        ```shell
        $PIXI_BIN = "$Env:LocalAppData\pixi\bin\pixi"; Remove-Item -Path $PIXI_BIN
        ```
    </TabItem>
</Tabs>

After this command, you can still use the tools you installed with pixi.
To remove these as well, just remove the whole `~/.pixi` directory and remove the directory from your path.


<Cols3>
    <DocLinkCard
        link="/pixi/basic_usage"
        title="Basic usage"
        excerpt="Learn how to use pixi."
    ></DocLinkCard>
    <DocLinkCard
        link="/pixi/cli"
        title="Command reference"
        excerpt="Explains all available pixi subcommands."
    ></DocLinkCard>
    <DocLinkCard
        link="/pixi/examples"
        title="Example projects"
        excerpt="See a few examples of projects run with pixi."
    ></DocLinkCard>
</Cols3>