> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trytalkvalue.com/llms.txt
> Use this file to discover all available pages before exploring further.

# talkvalue update

> Check whether a newer TalkValue CLI version is available on npm and print the correct install command for your package manager.

Look up the latest published `@talkvalue/cli` version on npm and compare it against the version you are running. If a newer version exists, the response carries a ready-to-copy install command tuned to the package manager that put the CLI on disk: npm, pnpm, yarn, or bun. The command performs no install; it prints the command to run.

## Synopsis

```bash theme={null}
talkvalue update
```

## Options

This command takes no flags beyond the [global flags](/cli/global-flags). Output respects `--format` / `--json`.

## Examples

### 1. Quick check

```bash theme={null}
talkvalue update
```

Prints a single record with the installed version, the latest published version, an `outdated` boolean, and (when out of date) the install command for your package manager.

### 2. Detect outdated in a script

```bash theme={null}
out=$(talkvalue update --json | jq -r '.data.outdated')
if [ "$out" = "true" ]; then
  cmd=$(talkvalue update --json | jq -r '.data.installCommand')
  echo "CLI is out of date. Run: $cmd"
fi
```

Use this guard at the top of automation that depends on a recent CLI feature. Combine with `set -e` and an explicit `exit 1` if you want the script to halt instead of warn.

### 3. CI gate that fails when the CLI is stale

```bash theme={null}
talkvalue update --json | jq -e '.data.outdated == false' \
  || { echo "@talkvalue/cli is out of date in this image"; exit 1; }
```

`jq -e` returns non-zero when the assertion fails, so the CI step fails, signalling the pinned `@talkvalue/cli` version in your image or workflow needs bumping.

## Response

```jsonc theme={null}
{
  "data": {
    "current": "1.5.0",
    "latest": "1.6.2",
    "outdated": true,
    "installCommand": "pnpm add -g @talkvalue/cli@latest"
  }
}
```

`installCommand` is `null` when `outdated` is `false`. The picked package manager is inferred from `npm_config_user_agent`. When the CLI is run directly from the binary the fallback is `npm`. The remote lookup uses a 10-second timeout. Network failures surface as a hard error rather than a stale "up to date" answer.

## See also

* [`talkvalue version`](/cli/commands/version). Print the version that is installed right now.
* [Install](/cli/install). Clean install and upgrade instructions per package manager.
