Skip to content

feat: support PIXI_NO_INSTALL environment variable#5919

Open
Shardz4 wants to merge 2 commits intoprefix-dev:mainfrom
Shardz4:arnav-v2
Open

feat: support PIXI_NO_INSTALL environment variable#5919
Shardz4 wants to merge 2 commits intoprefix-dev:mainfrom
Shardz4:arnav-v2

Conversation

@Shardz4
Copy link
Copy Markdown
Contributor

@Shardz4 Shardz4 commented Apr 19, 2026

Closes #5837.

Description

This PR adds support for the PIXI_NO_INSTALL environment variable to mirror the existing --no-install CLI flag.

Previously, pixi supported setting lockfile configurations through environment variables for --frozen (PIXI_FROZEN) and --locked (PIXI_LOCKED), but did not have an equivalent for --no-install. Users wanting a strictly read-only environment could not configure --no-install via .envrc alongside the other variables.

This change fixes that by tying the PIXI_NO_INSTALL env var directly to the clap argument parsing for all commands utilizing no_install.

Changes Made:

  • Added env = "PIXI_NO_INSTALL" to NoInstallConfig in crates/pixi_cli/src/cli_config.rs.
  • Added the same env var attribute to the standalone no_install argument in update.rs (Args) and workspace/platform.rs (AddArgs and RemoveArgs).
  • Updated the lockfile documentation in docs/workspace/lockfile.md to document the new PIXI_NO_INSTALL variable.

Fixes #5837

How Has This Been Tested?

  • Confirmed all commands with a --no-install flag correctly display [env: PIXI_NO_INSTALL=] in their --help output (e.g., pixi add --help, pixi run --help, pixi workspace platform add --help).
  • End-to-end functionality verification: Tested PIXI_NO_INSTALL=true pixi add <pkg> and confirmed that while the manifest and lockfile are updated, the environment creation/installation step in .pixi/envs/default is successfully bypassed.
  • Tested the control case (without the env var) and confirmed the environment installs correctly.
  • Ran cargo check -p pixi_cli and cargo test -p pixi_cli to ensure there are no regressions or syntax errors.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Google Deepmind Antigravity Agent/ Claude Opus 4.6(thinking)

Prompt:

Add env var PIXI_NOINSTALL
Issue #5837 — Add env var PIXI_NOINSTALL
Problem Summary
Pixi has three related CLI flags that control lock-file and installation behavior.
The issue requests a PIXI_NOINSTALL (or similar) env var so that --no-install behavior can be set via environment variables — just like --frozen and --locked already can.

Shardz4 added 2 commits April 19, 2026 19:03
Closes prefix-dev#5837.

Adds the PIXI_NO_INSTALL environment variable to control the --no-install flag behavior natively via clap.
- Added to NoInstallConfig in crates/pixi_cli/src/cli_config.rs
- Handled standalone defaults in update.rs and workspace/platform.rs
- Documented feature in docs/workspace/lockfile.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add env var PIXI_NOINSTALL

1 participant