Metadata-Version: 2.4
Name: conda-self
Version: 0.3.0
Summary: A self command for conda
Project-URL: documentation, https://conda.github.io/conda-self/
Project-URL: repository, https://github.com/conda/conda-self
License-File: AUTHORS.md
License-File: LICENSE
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# conda-self

Commands to manage your `base` environment safely.

## `conda self`

Manage conda and its plugins in the base environment.

```
$ conda self
usage: conda self [-V] [-h] {install,remove,reset,update} ...

Manage conda and its plugins in the base environment.

options:
  -V, --version         Show the 'conda-self' version number and exit.
  -h, --help            Show this help message and exit.

subcommands:
  {install,remove,reset,update}
    install             Install conda plugins in the base environment.
    remove              Remove conda plugins from the base environment.
    reset               Reset the base environment.
    update              Update conda, one conda plugin, or all packages in the
                        base environment.
```

### Custom channels

`conda self install` and `conda self update` use your configured channels.
To install plugins from a custom channel (e.g. a company or community channel
on anaconda.org or prefix.dev), add it to your configuration first:

```
conda config --add channels my-channel -n base
conda self install my-plugin
```

This keeps channel configuration consistent across install, update, and
dependency resolution.

Channel-qualified package specs (e.g. `conda-forge::my-plugin`) are not
supported and will result in an error.

## Base Environment Protection

To check if your base environment is protected, run:

```
conda doctor -n base base-protection
```

To protect your base environment, run:

```
conda doctor -n base base-protection --fix
```

This will:

1. Try to save a snapshot of base in conda's explicit format
2. Clone your current base environment to a new "default" environment
3. Remove conda packages other than conda, conda-self, configured permanent
   packages, their dependencies, and installed conda packages named in an
   available installer snapshot
4. Mark the base environment as frozen so conda refuses modifications by
   default

To see all available health checks, run:

```
conda doctor --list
```

### Unprotecting base

To remove protection entirely, delete the `conda-meta/frozen` environment
marker file:

```
rm "$(conda info --base)/conda-meta/frozen"
```

To bypass protection for a single command, pass `--override-frozen`. To disable
frozen-environment checks through configuration, set
`CONDA_PROTECT_FROZEN_ENVS=false` or add `protect_frozen_envs: false` to your
`.condarc`.

## Configuration

### Permanent packages

The `current` and `installer-updated` reset modes retain `conda`, `conda-self`,
installed conda plugins, configured permanent packages, and their dependencies.
To configure additional permanent packages, add them to the
`plugins.self_permanent_packages` setting in your `.condarc`:

```yaml
plugins:
  self_permanent_packages:
    - anaconda-anon-usage
```

Or use `conda config`:

```bash
conda config --add plugins.self_permanent_packages anaconda-anon-usage
```

## Installation

1. `conda install -n base conda-self`
2. `conda self --help`

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md)
