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

# Updating the CLI

> Install the latest version, and make sure background sync runs it.

Update with the same package manager you installed with. For npm:

```bash theme={"theme":"nord"}
npm install -g resumecontext@latest
resumecontext daemon start
```

Check which version you have:

```bash theme={"theme":"nord"}
resumecontext --version
```

## What happens to auto-sync

Auto-sync does not keep an old copy of the CLI running. Every 20 seconds the
background service starts the installed `resumecontext` command, runs one sync
and exits. After an ordinary update, the next sync already runs the new
version, and the projects you set up keep syncing without any further step.

`resumecontext daemon start` afterwards is still worth running. It
re-registers the background service with the version you just installed, and
it prints `Auto-sync was already running` when nothing needed to change.

## If you use a Node.js version manager

The background service remembers the exact Node.js and `resumecontext` paths it
was registered with. With nvm, fnm, Volta or a Homebrew Node.js upgrade, each
Node.js version has its own global packages. Installing the update under a
different Node.js version therefore leaves auto-sync running the old install,
or failing if you then remove that Node.js version.

`resumecontext daemon start`, run with the new version, points the service at
the new install. [`auth`](/docs/cli/auth) and every project command except
[`agents`](/docs/cli/agents) do the same on their own.

Confirm it is running:

```bash theme={"theme":"nord"}
resumecontext daemon status
```

## Where to install

Install the CLI globally with `npm install -g resumecontext`. The background
service runs the exact `resumecontext` command it was set up from, so that
command has to stay in place:

| How you run the CLI                                     | Background sync                                                                                                                                                                                                      |
| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Installed globally (`npm install -g`)                   | Works. Update as shown above.                                                                                                                                                                                        |
| `npx resumecontext`, without installing                 | Not set up. npx runs a temporary download that npm can delete at any time, so the CLI tells you to install globally. Manual `resumecontext sync` still works. The same applies to `pnpm dlx`, `yarn dlx` and `bunx`. |
| Installed inside a folder (`npm install resumecontext`) | Works, but runs from that folder's `node_modules`. Deleting the folder or its `node_modules` stops auto-sync. The CLI warns you when it sets this up.                                                                |

If you installed inside a folder, update from that same folder with
`npm install resumecontext@latest`, then run `npx resumecontext daemon start`.
To switch to a global install, run `npm install -g resumecontext`, then
`resumecontext daemon start`, which points auto-sync at the global install.
You can then delete the folder install.
