Metadata-Version: 2.4
Name: conda-self
Version: 0.2.0
Summary: A self command for conda
Project-URL: documentation, https://conda-incubator.github.io/conda-self
Project-URL: repository, https://github.com/conda-incubator/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 your conda 'base' environment safely.

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

Manage your conda 'base' environment safely.

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             Add conda plugins to the 'base' environment.
    remove              Remove conda plugins from the 'base' environment.
    reset               Reset 'base' environment to essential packages only.
    update              Update 'conda' and/or its plugins 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.

Inline channel 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 base-protection
```

To protect your base environment, run:

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

This will:
1. Clone your current base environment to a new "default" environment
2. Reset base to essential packages only
3. Freeze the base environment to prevent modifications

To see all available health checks, run:

```
conda doctor --list
```

### Unprotecting base

To remove protection entirely, delete the frozen file:

```
rm $CONDA_PREFIX/conda-meta/frozen
```

To bypass protection for a single command, pass `--override-frozen` or set
`CONDA_OVERRIDE_FROZEN=1`. To disable it permanently, add `override_frozen: true`
to your `.condarc`.

## Configuration

### Permanent packages

By default, `conda self reset` keeps only `conda`, `conda-self`, and their
plugins installed. To keep additional packages (and their dependencies) in
the base environment, add them to the `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)
