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

# magnet logout

> Revoke the stored CLI token and remove it from this machine.

The `magnet logout` command revokes the CLI token issued by [`magnet login`](/cli/login) on the server, then deletes it from `~/.magnet/auth.json`. After logging out, commands that require user authentication will prompt you to log in again.

## Usage

```bash theme={null}
magnet logout
```

<Note>
  `magnet logout` only affects the stored login token. If `MAGNET_API_KEY` is set in your environment, the CLI will still authenticate with that workspace key.
</Note>

## Related

* [`magnet login`](/cli/login)
* [`magnet whoami`](/cli/whoami)
