Repository: astral-sh/uv
File: crates/uv-cli/src/lib.rs (Rust)

Code before:
    /// them on each run. However, it typically _is_ faster to cache wheels that are built from
    /// source, since the wheel building process can be expensive, especially for extension
    /// modules.
    ///
    /// In `--ci` mode, uv will prune any pre-built wheels from the cache, but retain any wheels
    /// that were built from source.
    #[arg(long)]
    pub ci: bool,

    /// Force removal of the cache, ignoring in-use checks.
    ///
    /// By default, `uv cache prune` will block until no process is reading the cache. When
    /// `--force` is used, `uv cache prune` will proceed without taking a lock.
    #[arg(long)]
    pub force: bool,
}

#[derive(Args, Debug)]
pub struct SizeArgs {
    /// Display the cache size in human-readable format (e.g., `1.2 GiB` instead of raw bytes).
    #[arg(long = "human", short = 'H', alias = "human-readable")]
    pub human: bool,

    /// Number of threads to use when calculating the cache size
    #[arg(long)]
    pub threads: Option<usize>,
}

#[derive(Args)]
pub struct PipNamespace {
    #[command(subcommand)]
    pub command: PipCommand,
}

#[derive(Subcommand)]
pub enum PipCommand {
    /// Compile a `requirements.in` file to a `requirements.txt` or `pylock.toml` file.
    #[command(
        after_help = "Use `uv help pip compile` for more details.",
        after_long_help = ""
    )]
    Compile(PipCompileArgs),
    /// Sync an environment with a `requirements.txt` or `pylock.toml` file.
    ///
    /// When syncing an environment, any packages not listed in the `requirements.txt` or
    /// `pylock.toml` file will be removed. To retain extraneous packages, use `uv pip install`
    /// instead.
    ///
    /// The input file is presumed to be the output of a `pip compile` or `uv export` operation,
    /// in which it will include all transitive dependencies. If transitive dependencies are not
    /// present in the file, they will not be installed. Use `--strict` to warn if any transitive

Review comment (suggestion):
suggestion(non-blocking): Assuming this flag does get added, I believe this be should be named something like `concurrency` to align with other similarly named sibling settings (e.g. concurrent-installs).

Code after:
    /// them on each run. However, it typically _is_ faster to cache wheels that are built from
    /// source, since the wheel building process can be expensive, especially for extension
    /// modules.
    ///
    /// In `--ci` mode, uv will prune any pre-built wheels from the cache, but retain any wheels
    /// that were built from source.
    #[arg(long)]
    pub ci: bool,

    /// Force removal of the cache, ignoring in-use checks.
    ///
    /// By default, `uv cache prune` will block until no process is reading the cache. When
    /// `--force` is used, `uv cache prune` will proceed without taking a lock.
    #[arg(long)]
    pub force: bool,
}

#[derive(Args, Debug)]
pub struct SizeArgs {
    /// Display the cache size in human-readable format (e.g., `1.2 GiB` instead of raw bytes).
    #[arg(long = "human", short = 'H', alias = "human-readable")]
    pub human: bool,
}

#[derive(Args)]
pub struct PipNamespace {
    #[command(subcommand)]
    pub command: PipCommand,
}

#[derive(Subcommand)]
pub enum PipCommand {
    /// Compile a `requirements.in` file to a `requirements.txt` or `pylock.toml` file.
    #[command(
        after_help = "Use `uv help pip compile` for more details.",
        after_long_help = ""
    )]
    Compile(PipCompileArgs),
    /// Sync an environment with a `requirements.txt` or `pylock.toml` file.
    ///
    /// When syncing an environment, any packages not listed in the `requirements.txt` or
    /// `pylock.toml` file will be removed. To retain extraneous packages, use `uv pip install`
    /// instead.
    ///
    /// The input file is presumed to be the output of a `pip compile` or `uv export` operation,
    /// in which it will include all transitive dependencies. If transitive dependencies are not
    /// present in the file, they will not be installed. Use `--strict` to warn if any transitive
    /// dependencies are missing.
    #[command(
        after_help = "Use `uv help pip sync` for more details.",
        after_long_help = ""