---
url: https://ws.kloudkit.com/tools/features.md
description: >-
  Opt-in features let you install and configure extra packages and tooling in
  Kloud Workspace on demand, keeping the base image lean.
---

# Features

Features add optional tools to the workspace when you need them, so the base image stays lean.
Each feature is an *Ansible playbook* that `ws-cli` runs to install and configure the tool.

## Install a Feature

Install a feature when a container first starts, or by hand in a running workspace.

### Install at Boot

When a container first starts, Kloud Workspace installs the *features* listed in:

```sh{2}
docker run \
  -e WS_FEATURES_ADDITIONAL_FEATURES="dotnet jupyter" \
  ghcr.io/kloudkit/workspace:v0.6.2
```

### Manual Installation

To install a feature by hand, run `ws-cli feature install`:

```sh
ws-cli feature install php
```

A feature installs into the container, not into a persistent volume, so a recreated container no longer
has it.
List the features you always need in `WS_FEATURES_ADDITIONAL_FEATURES` to install them on every new
container.

## Find a Feature

`ws-cli` lists the features you can install and the options each one takes:

```sh
ws-cli feature list
ws-cli feature info dotnet
```

* **`feature list`:** every feature by name, marking your own and overridden playbooks.
* **`feature info <name>`:** the feature's description and the variables it accepts.
* **`feature store`:** the artifacts in the configured [feature store](/tools/feature-store).

The built-in playbooks are in the `/usr/share/workspace/features.d` directory.

## Optional Variables

Some playbooks accept variables for customization, the ones `ws-cli feature info` lists.
Pass them with the `--opt` flag *(equivalent to Ansible's `--extra-vars`)*, zero or more times:

```sh
ws-cli feature install dotnet --opt version=9.0
```

### Skipping Sections

Beyond the core tool, a playbook may also install VS Code extensions, configure shell completion, or
enable a vendor APT repository.
Skip any of these with the matching flag; the tool itself still installs:

```sh
ws-cli feature install bun --skip-extensions --skip-completion
```

| Flag                | Skips                            |
| ------------------- | -------------------------------- |
| `--skip-extensions` | VS Code extension installs       |
| `--skip-completion` | Shell completion setup           |
| `--skip-repository` | Vendor APT repository enablement |

::: warning

`--skip-repository` skips enabling the vendor APT repository the package install
then reads from.

Use it only when the package is already present or mirrored through a [feature store](/tools/feature-store).

:::

### Options at Boot

At boot, pass options through the per-feature `WS_FEATURES_<NAME>_OPTS` variable.
`<NAME>` is the feature name in upper case, with `-` replaced by `_` *(`image-extras` reads
`WS_FEATURES_IMAGE_EXTRAS_OPTS`)*.
It holds one or more `key=value` pairs joined with `;`, and each pair becomes one `--opt`.
A skip flag becomes `skip_<section>=true`:

```sh{2,3}
docker run \
  -e WS_FEATURES_DOTNET_OPTS="version=9.0" \
  -e WS_FEATURES_BUN_OPTS="skip_extensions=true;skip_completion=true" \
  -e WS_FEATURES_ADDITIONAL_FEATURES="dotnet bun" \
  ghcr.io/kloudkit/workspace:v0.6.2
```

## Custom Features

Save your own playbooks under `~/.ws/features.d/` and install them by name, exactly like the
built-in features, with no `--root` needed.

The directory is searched alongside the built-in features; if a name exists in both, your copy wins,
so you can override a shipped feature by dropping a same-named playbook there.

Scaffold a starting playbook with `ws-cli feature new` and redirect it into place.
Keep `hosts: workspace` and `gather_facts: false` unchanged, then extend the
`tasks:` block.

::: code-group

```sh [Scaffold]
ws-cli feature new redis > ~/.ws/features.d/redis.yaml
```

```yaml [Playbook]
---
- name: Install redis
  gather_facts: false
  hosts: workspace

  tasks:
    - name: Say hello
      ansible.builtin.debug:
        msg: Hello world! 👋
```

```sh [Install]
ws-cli feature install redis
```

:::

To install a playbook from a different directory instead, point `--root` at it.
Any directory you have access to works, and only that directory is searched.
This command looks for a playbook at `/alternate/php.yaml`:

```sh
ws-cli feature install php --root /alternate
```

### Features Directory

`ws-cli` reads the built-in playbooks from the directory in this variable, alongside `~/.ws/features.d`:

Point it at a directory of your own playbooks to replace the shipped set for every `ws-cli feature`
command.

## Available Features

::: info
To suggest a feature or contribute one, see the [contribution guide](/contribute/).
:::

A ✅ in the **Store** column marks a feature the [feature store](/tools/feature-store) carries.

| Feature                                     | Description                                |   Since   | Store |
| ------------------------------------------- | ------------------------------------------ | :-------: | :---: |
| [**`additional-apt →`**](/tools/apt)        | Extra APT packages by name                 | *v0.4.0*  |       |
| `bun`                                       | Bun JavaScript runtime and package manager | *v0.2.0*  |   ✅   |
| [**`cloudflared →`**](/tools/cloudflared)   | Cloudflare tunnel CLI                      |           |   ✅   |
| `codex`                                     | codex CLI                                  | *v0.0.20* |       |
| `conan`                                     | Conan CLI and related tools                |           |       |
| `continue`                                  | cn CLI and continue extension              | *v0.0.21* |       |
| [**`cpp →`**](/tools/cpp)                   | C++ and related tools                      |           |   ✅   |
| `dagger`                                    | dagger.io CLI and SDK                      |           |       |
| `doctl`                                     | DigitalOcean CLI                           | *v0.2.0*  |       |
| [**`dotnet →`**](/tools/dotnet)             | .NET SDK, runtime, and ASP.NET Core        |           |   ✅   |
| `gcloud`                                    | Google Cloud CLI for GCP                   |           |   ✅   |
| [**`gh →`**](/tools/github-cli)             | GitHub CLI                                 |           |   ✅   |
| `glab`                                      | GitLab CLI                                 | *v0.2.0*  |   ✅   |
| `helm-extras`                               | Helm plugins and related extensions        | *v0.2.0*  |   ✅   |
| [**`image-extras →`**](/tools/image-extras) | syft, grype, dive, osv-scanner             | *v0.3.0*  |       |
| `jf`                                        | JFrog CLI                                  |           |   ✅   |
| `jupyter`                                   | Jupyter packages and related extensions    |           |       |
| `oc`                                        | OpenShift CLI                              | *v0.2.0*  |   ✅   |
| `opencode`                                  | OpenCode CLI and related extension         | *v0.1.1*  |       |
| `php`                                       | PHP and related extensions                 |           |   ✅   |
| `rclone`                                    | rclone CLI                                 |           |   ✅   |
| `restic`                                    | Restic CLI                                 |           |   ✅   |
| [**`rust →`**](/tools/rust)                 | Rust and Cargo                             |           |       |
| `snyk`                                      | Snyk CLI and related extension             | *v0.0.20* |       |
| `sops`                                      | SOPS CLI                                   | *v0.0.21* |   ✅   |
| `talos`                                     | Talos CLI                                  |           |   ✅   |
| `terraform`                                 | Terraform packages and related extensions  |           |   ✅   |
| `tshark`                                    | Wireshark terminal CLI                     | *v0.3.0*  |   ✅   |

## Feature Store

To install features from a mirror on your own network instead of from each vendor, run a
[feature store](/tools/feature-store) and point the workspace at it.
