Skip to content

Commit fe74fb5

Browse files
committed
Standardize CLI naming to conda workspace / conda task
Use full command names throughout docs and README. The cw/ct shortcuts are mentioned once as aliases rather than used as the primary form.
1 parent f99ebb0 commit fe74fb5

10 files changed

Lines changed: 114 additions & 110 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/).
2121
- Initial implementation of conda-workspaces plugin
2222
- `conda workspace` subcommand with `init`, `install`, `list`, `info`,
2323
`add`, `remove`, `clean`, `run`, and `activate` subcommands
24-
- `cw` standalone CLI shortcut
24+
- `conda workspace` standalone CLI (also available as `cw`)
2525
- Parser support for `pixi.toml`, `conda.toml`, and `pyproject.toml`
2626
manifests
2727
- Multi-environment workspace model with composable features

DESIGN.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ multi-environment workspace management to conda. It reads pixi-compatible
1111
manifest files (`pixi.toml`, `conda.toml`, `pyproject.toml`) and manages
1212
project-local conda environments under `.conda/envs/`.
1313

14-
The plugin registers two subcommands: `conda workspace` (with `cw` as a
15-
standalone shortcut) for environment management (`init`, `install`,
16-
`lock`, `list`, `envs`, `info`, `add`, `remove`, `clean`, `run`,
17-
`shell`, `activate`) and `conda task` (with `ct` as a shortcut) for
18-
task execution (`run`, `list`, `add`, `remove`, `export`).
14+
The plugin registers two subcommands: `conda workspace` for environment
15+
management (`init`, `install`, `lock`, `list`, `envs`, `info`, `add`,
16+
`remove`, `clean`, `run`, `shell`, `activate`) and `conda task` for
17+
task execution (`run`, `list`, `add`, `remove`, `export`). Standalone
18+
shortcuts `cw` and `ct` are also available as aliases.
1919

2020
## Goals
2121

@@ -120,18 +120,19 @@ supported. This is structurally identical to pixi.toml but:
120120
settings, conda-build integration)
121121
- Provides a non-pixi-branded option for teams that only use conda
122122

123-
### 5. Standalone CLI Shortcut (`cw`)
123+
### 5. Standalone CLI Aliases (`cw` / `ct`)
124124

125-
The `cw` console script provides a standalone entry point that doesn't
126-
require going through `conda workspace ...`. This is registered via
125+
The primary CLI forms are `conda workspace` and `conda task`. For
126+
convenience, `cw` and `ct` console scripts provide standalone aliases
127+
that don't require the `conda` prefix. These are registered via
127128
`[project.scripts]` in pyproject.toml:
128129

129130
```toml
130131
[project.scripts]
131132
cw = "conda_workspaces.__main__:main"
132133
```
133134

134-
Similarly, `ct` provides a shortcut for `conda task`.
135+
`ct` is the equivalent alias for `conda task`.
135136

136137
### 6. Task System Architecture
137138

@@ -178,8 +179,8 @@ overrides or Jinja2 conditionals.
178179
3. **Lock files** — conda-workspaces generates a `conda.lock` in
179180
rattler-lock v6 format (the same structure as `pixi.lock`) after
180181
every install. The `--locked` flag installs from the lockfile
181-
without running the solver, and `cw lock` regenerates the lockfile
182-
on demand.
182+
without running the solver, and `conda workspace lock` regenerates
183+
the lockfile on demand.
183184

184185
4. **Plugin, not standalone** — conda-workspaces is a conda plugin;
185186
pixi is a standalone tool that replaces conda entirely for its users.

README.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ depends-on = ["test", "lint"]
4545
Install and manage your environments, then run tasks:
4646

4747
```console
48-
$ cw install # solve + install + generate conda.lock
49-
$ cw envs # list defined environments
50-
$ conda task run check # runs lint and test in dependency order
51-
$ cw shell -e test # spawn a shell with test env activated
52-
$ cw install --locked # reproducible install from conda.lock
48+
$ conda workspace install # solve + install + generate conda.lock
49+
$ conda workspace envs # list defined environments
50+
$ conda task run check # runs lint and test in dependency order
51+
$ conda workspace shell -e test # spawn a shell with test env activated
52+
$ conda workspace install --locked # reproducible install from conda.lock
5353
```
5454

5555
## Why?
@@ -76,7 +76,7 @@ and task running inside the conda CLI without switching tools.
7676
- Task dependencies with topological ordering (`depends-on`)
7777
- Jinja2 templates in commands (`{{ conda.platform }}`, conditionals)
7878
- Task arguments with defaults, input/output caching, and per-platform overrides
79-
- Standalone `cw` / `ct` CLIs and `conda workspace` / `conda task` plugin subcommands
79+
- `conda workspace` / `conda task` subcommands (also available as `cw` / `ct` aliases)
8080

8181
## Installation
8282

@@ -86,25 +86,25 @@ conda install -c conda-forge conda-workspaces
8686

8787
## CLI
8888

89-
conda-workspaces registers as `conda workspace` and `conda task`, and
90-
provides `cw` and `ct` as standalone shortcuts.
89+
conda-workspaces registers `conda workspace` and `conda task` subcommands,
90+
and also provides `cw` and `ct` as shorter aliases.
9191

9292
### Workspace commands
9393

9494
| Command | Description |
9595
|---|---|
96-
| `cw init` | Initialize a new workspace manifest |
97-
| `cw install` | Create/update workspace environments |
98-
| `cw install --locked` | Install from lockfile (skip solving) |
99-
| `cw lock` | Generate/update `conda.lock` |
100-
| `cw list` | List packages in an environment |
101-
| `cw envs` | List defined environments |
102-
| `cw info [ENV]` | Show environment details |
103-
| `cw add SPECS...` | Add dependencies |
104-
| `cw remove SPECS...` | Remove dependencies |
105-
| `cw shell [ENV]` | Spawn a shell with an environment activated |
106-
| `cw activate [ENV]` | Print activation instructions |
107-
| `cw clean` | Remove installed environments |
96+
| `conda workspace init` | Initialize a new workspace manifest |
97+
| `conda workspace install` | Create/update workspace environments |
98+
| `conda workspace install --locked` | Install from lockfile (skip solving) |
99+
| `conda workspace lock` | Generate/update `conda.lock` |
100+
| `conda workspace list` | List packages in an environment |
101+
| `conda workspace envs` | List defined environments |
102+
| `conda workspace info [ENV]` | Show environment details |
103+
| `conda workspace add SPECS...` | Add dependencies |
104+
| `conda workspace remove SPECS...` | Remove dependencies |
105+
| `conda workspace shell [ENV]` | Spawn a shell with an environment activated |
106+
| `conda workspace activate [ENV]` | Print activation instructions |
107+
| `conda workspace clean` | Remove installed environments |
108108

109109
### Task commands
110110

@@ -116,8 +116,6 @@ provides `cw` and `ct` as standalone shortcuts.
116116
| `conda task remove NAME` | Remove a task from the manifest |
117117
| `conda task export` | Export tasks to `conda.toml` format |
118118

119-
The `ct` shortcut works like `conda task`: `ct run check`, `ct list`, etc.
120-
121119
## What it doesn't do
122120

123121
conda-workspaces is a workspace manager and task runner, not a package

docs/features.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ env = { DEBUG = "1" }
329329
```
330330

331331
Activation settings are merged across features when composing an
332-
environment. After `cw install`, environment variables are written to
332+
environment. After `conda workspace install`, environment variables are written to
333333
the prefix state file (available via `conda activate`) and activation
334334
scripts are copied to `$PREFIX/etc/conda/activate.d/`.
335335

@@ -365,19 +365,19 @@ conda's default channel priority applies.
365365
## Lock
366366

367367
conda-workspaces generates a `conda.lock` file in YAML format based on
368-
the rattler-lock v6 specification. The `cw lock` command runs the solver
368+
the rattler-lock v6 specification. The `conda workspace lock` command runs the solver
369369
and records the solution — it does not require environments to be
370370
installed first.
371371

372372
```bash
373373
# Generate or update the lockfile
374-
cw lock
374+
conda workspace lock
375375

376376
# Install from lockfile, validating freshness against the manifest
377-
cw install --locked
377+
conda workspace install --locked
378378

379379
# Install from lockfile as-is without checking freshness
380-
cw install --frozen
380+
conda workspace install --frozen
381381
```
382382

383383
The lockfile contains all environments and their resolved packages:
@@ -415,7 +415,7 @@ checks entirely and install the lockfile as-is.
415415
You can also point to a specific manifest with `--file` / `-f`:
416416

417417
```bash
418-
cw install -f path/to/conda.toml
418+
conda workspace install -f path/to/conda.toml
419419
```
420420

421421
## Project-local environments
@@ -435,6 +435,6 @@ my-project/
435435
└── src/
436436
```
437437

438-
Environments are standard conda prefixes. Use `cw run -e <name> -- CMD`
439-
to run a command in an environment, `cw shell -e <name>` for an
438+
Environments are standard conda prefixes. Use `conda workspace run -e <name> -- CMD`
439+
to run a command in an environment, `conda workspace shell -e <name>` for an
440440
interactive shell, or `conda activate .conda/envs/<name>` directly.

docs/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ test = { features = ["test"] }
5757
Then install and use your environments:
5858

5959
```bash
60-
cw install # solve + install + generate conda.lock
61-
cw run -e test -- pytest -v # run a command in an environment
62-
cw shell -e test # spawn a shell with test env activated
63-
cw install --locked # reproducible install from conda.lock
64-
cw list # list packages in default env
65-
cw envs # list defined environments
66-
cw info # workspace overview
60+
conda workspace install # solve + install + generate conda.lock
61+
conda workspace run -e test -- pytest -v # run a command in an environment
62+
conda workspace shell -e test # spawn a shell with test env activated
63+
conda workspace install --locked # reproducible install from conda.lock
64+
conda workspace list # list packages in default env
65+
conda workspace envs # list defined environments
66+
conda workspace info # workspace overview
6767
```
6868

6969
## Define tasks
@@ -112,7 +112,7 @@ This means:
112112
- Task dependencies, caching, Jinja2 templates, and platform overrides
113113
all work out of the box
114114
- Ships as a conda plugin (`conda workspace`, `conda task`) and
115-
standalone `cw` / `ct` CLIs
115+
standalone `conda workspace` / `conda task` CLIs (also available as `cw` / `ct`)
116116

117117
Read more in [](motivation.md).
118118

docs/motivation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ definitions, and installation. Running `pixi install` uses rattler
3131
| Define tasks | `pixi.toml` `[tasks]` | Same manifest file |
3232
| Solve dependencies | rattler (bundled) | conda / libmamba (existing) |
3333
| Install packages | rattler (into `.pixi/envs/`) | conda (into `.conda/envs/`) |
34-
| Manage environments | `pixi install` | `cw install` (delegates to conda) |
34+
| Manage environments | `pixi install` | `conda workspace install` (delegates to conda) |
3535
| Run tasks | `pixi run <task>` | `conda task run <task>` |
36-
| Run commands in env | `pixi run CMD` | `cw run -- CMD` or `cw shell -e ENV -- CMD` |
37-
| Activate | `pixi shell` | `cw shell` / `conda activate .conda/envs/<name>` |
36+
| Run commands in env | `pixi run CMD` | `conda workspace run -- CMD` or `conda workspace shell -e ENV -- CMD` |
37+
| Activate | `pixi shell` | `conda workspace shell` / `conda activate .conda/envs/<name>` |
3838

3939
This approach has advantages:
4040

@@ -68,7 +68,7 @@ conda-workspaces reads the same manifest format as pixi. A project with a
6868
`pixi.toml` can use both tools:
6969

7070
- pixi users run `pixi install` and `pixi run` as usual
71-
- conda users run `cw install` and `conda task run` using conda's solver
71+
- conda users run `conda workspace install` and `conda task run` using conda's solver
7272

7373
This coexistence is possible because each tool stores environments in a
7474
different directory (`.pixi/envs/` vs `.conda/envs/`), so they don't

docs/quickstart.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,23 @@ test = { features = ["test"] }
125125

126126
::::
127127

128+
:::{tip}
129+
`cw` and `ct` are available as shorter aliases for `conda workspace`
130+
and `conda task`.
131+
:::
132+
128133
Or use the init command to scaffold one:
129134

130135
```bash
131-
cw init
132-
# or: cw init --format conda
133-
# or: cw init --format pyproject
136+
conda workspace init
137+
# or: conda workspace init --format conda
138+
# or: conda workspace init --format pyproject
134139
```
135140

136141
## Install environments
137142

138143
```bash
139-
cw install
144+
conda workspace install
140145
```
141146

142147
This creates project-local conda environments under `.conda/envs/` for
@@ -146,24 +151,24 @@ generated automatically after solving.
146151
You can point to a specific manifest with `--file` / `-f`:
147152

148153
```bash
149-
cw install -f path/to/conda.toml
154+
conda workspace install -f path/to/conda.toml
150155
```
151156

152157
To recreate environments from scratch, use `--force-reinstall`:
153158

154159
```bash
155-
cw install --force-reinstall
160+
conda workspace install --force-reinstall
156161
```
157162

158163
## Lock
159164

160165
![lockfile demo](../demos/lockfile.gif)
161166

162-
The `cw lock` command runs the solver and records the solution in
167+
The `conda workspace lock` command runs the solver and records the solution in
163168
`conda.lock` without installing any environments:
164169

165170
```bash
166-
cw lock
171+
conda workspace lock
167172
```
168173

169174
## Reproducible installs
@@ -173,14 +178,14 @@ lockfile is still fresh relative to the manifest — if the manifest has
173178
changed, the install fails:
174179

175180
```bash
176-
cw install --locked
181+
conda workspace install --locked
177182
```
178183

179184
Use `--frozen` to install from the lockfile as-is, without checking
180185
freshness:
181186

182187
```bash
183-
cw install --frozen
188+
conda workspace install --frozen
184189
```
185190

186191
## Run in workspace environments
@@ -194,46 +199,46 @@ conda task run -e test pytest -v
194199
Run a one-shot command in an environment:
195200

196201
```bash
197-
cw run -e test -- python -c "import numpy; print(numpy.__version__)"
202+
conda workspace run -e test -- python -c "import numpy; print(numpy.__version__)"
198203
```
199204

200205
Or spawn an interactive shell:
201206

202207
```bash
203-
cw shell -e test
208+
conda workspace shell -e test
204209
```
205210

206211
## Add dependencies
207212

208213
```bash
209-
cw add numpy
214+
conda workspace add numpy
210215
```
211216

212217
Add to a specific feature:
213218

214219
```bash
215-
cw add --feature test pytest
220+
conda workspace add --feature test pytest
216221
```
217222

218223
Add a PyPI dependency:
219224

220225
```bash
221-
cw add --pypi requests
226+
conda workspace add --pypi requests
222227
```
223228

224229
## List packages and environments
225230

226231
```bash
227-
cw list # packages in default env
228-
cw list -e test # packages in test env
229-
cw envs # list defined environments
232+
conda workspace list # packages in default env
233+
conda workspace list -e test # packages in test env
234+
conda workspace envs # list defined environments
230235
```
231236

232237
## Workspace overview
233238

234239
```bash
235-
cw info
236-
cw info -e test # details for a specific environment
240+
conda workspace info
241+
conda workspace info -e test # details for a specific environment
237242
```
238243

239244
## Next steps

0 commit comments

Comments
 (0)