Skip to main content

jnc global

Manages global package installations. Each package (or group of packages) is installed into its own isolated environment, and exposed binaries are placed on your PATH. This is similar to tools like pipx or apt, but powered by the conda ecosystem.

Usage

jnc global <SUBCOMMAND>

Subcommands

install

Install one or more packages into new global environments.
jnc global install [OPTIONS] <PACKAGES>...
OptionShortDescription
--channel-cSpecify the channel to search for packages
--platform-pTarget platform (defaults to current)
--environment-eInstall into a named environment instead of using the package name
--exposeControl which binaries are exposed on PATH

uninstall

Remove one or more global environments and their exposed binaries.
jnc global uninstall <ENVIRONMENTS>...

add

Add packages to an existing global environment.
jnc global add [OPTIONS] <PACKAGES>...
OptionShortDescription
--channel-cSpecify the channel to search for packages
--environment-eTarget environment name
--exposeControl which binaries are exposed on PATH

remove

Remove packages from a global environment.
jnc global remove <PACKAGES>... --environment <ENV>

list

List all global environments and their exposed binaries.
jnc global list

sync

Synchronize installed global environments with the global manifest file. This installs missing environments and removes ones no longer in the manifest.
jnc global sync

edit

Open the global manifest file in your default editor.
jnc global edit

update

Update one or more global environments to the latest compatible versions.
jnc global update [OPTIONS] [ENVIRONMENTS]...
OptionShortDescription
--channel-cSpecify the channel to search for updates
If no environments are specified, all global environments are updated.

tree

Display the dependency tree for a global environment.
jnc global tree --environment <ENV>

expose add

Expose additional binaries from a global environment on your PATH.
jnc global expose add --environment <ENV> <MAPPING>...
Mappings can be a binary name (e.g., python3.12) or a rename mapping (e.g., py=python3.12).

expose remove

Remove exposed binaries from a global environment.
jnc global expose remove --environment <ENV> <NAMES>...

shortcut add

Create a shortcut command that runs a specific binary from a global environment.
jnc global shortcut add --environment <ENV> <NAME> <COMMAND>

shortcut remove

Remove a shortcut from a global environment.
jnc global shortcut remove --environment <ENV> <NAME>

Global Manifest

Global environments are tracked in ~/.pixi/manifests/pixi-global.toml. You can edit this file directly with jnc global edit or share it across machines and run jnc global sync to replicate your setup.

Examples

# Install common CLI tools
jnc global install gh ripgrep bat fd-find

# Install from a specific channel
jnc global install --channel bioconda samtools

# Install multiple packages into a shared environment
jnc global install --environment data-tools python pandas jupyter

# Add a package to an existing environment
jnc global add --environment data-tools matplotlib

# Remove a package from an environment
jnc global remove pandas --environment data-tools

# Uninstall a global environment
jnc global uninstall ripgrep

# List all global environments
jnc global list

# Update all global environments
jnc global update

# Update a specific environment
jnc global update gh

# View the dependency tree
jnc global tree --environment gh

# Expose a specific binary
jnc global expose add --environment python python3.12

# Create a shortcut
jnc global shortcut add --environment python py "python3.12"

# Remove an exposed binary
jnc global expose remove --environment python python3.12

# Edit the global manifest directly
jnc global edit

# Sync environments with the manifest
jnc global sync