---
title: update
description: Update KiLM to the latest version from PyPI.
---

import { LinkCard, Card, CardGrid } from "@astrojs/starlight/components";

The `kilm update` command updates KiLM itself to the latest version available on PyPI. It automatically detects your installation method and uses the appropriate update mechanism.

:::caution[Breaking Change in v0.4.0]
The `kilm update` command behavior changed in KiLM v0.4.0:
- **Now:** Updates KiLM itself (self-update)
- **Previously:** Updated library content (now use `kilm sync`)

A deprecation banner will guide users during the transition period.
:::

## Usage

```bash
kilm update [OPTIONS]
```

## Options

- `--check`:
  Check for available updates without installing them. Shows current version, latest version, and update instructions.
  _Example:_ `kilm update --check`

- `--force`:
  Force update even if already up to date. Useful for reinstalling the current version.
  _Example:_ `kilm update --force`

- `--help`:
  Show the help message and exit.

## Behavior

1.  **Installation Detection:** Automatically detects how KiLM was installed (pipx, pip, uv).
2.  **Version Check:** Queries PyPI for the latest available version using cached requests.
3.  **Update Execution:** For supported methods (pipx, pip, uv), automatically executes the update command.
4.  **Unavailable Methods:** For conda and homebrew (not yet published), provides information about planned availability.

## Supported Installation Methods

| Method | Auto-Update | Update Command |
|--------|-------------|----------------|
| **pipx** ✅ | Yes | `pipx upgrade kilm` |
| **pip** ✅ | Yes | `pip install --upgrade kilm` |
| **pip (venv)** ✅ | Yes | `pip install --upgrade kilm` |
| **uv** ✅ | Yes | `uv tool upgrade kilm` |
| **conda** | Unavailable | N/A (planned for future) |
| **homebrew** | Unavailable | N/A (planned for future) |

## Examples

**Check for updates:**

```bash
kilm update --check
```

**Update KiLM to latest version:**

```bash
kilm update
```

**Force reinstall current version:**

```bash
kilm update --force
```

## Configuration

Update checking behavior can be configured using `kilm config`:

```bash
# Disable update checking
kilm config set update_check false

# Set check frequency
kilm config set update_check_frequency weekly  # daily, weekly, never
```

## Troubleshooting

**Update fails with permission errors:**
- For system pip: Try `pip install --user --upgrade kilm`
- For pipx: Reinstall with `pipx uninstall kilm && pipx install kilm`

**Cannot detect installation method:**
- Install via pipx for best CLI tool experience: `pipx install kilm`

**Network/PyPI connection issues:**
- Check internet connection
- Try again later (PyPI may be temporarily unavailable)