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

# TUI Troubleshooting

> Fix common Papermap TUI installation, login, workspace, streaming, shell mode, and configuration issues.

Use this guide when the `papermap` command starts but login, workspace loading, streaming, or shell mode does not behave as expected.

## Quick checks

Run these first:

```bash theme={null}
papermap --version
papermap auth whoami
papermap workspace list
```

If `whoami` says you are not signed in, run:

```bash theme={null}
papermap auth login
```

## Common issues

> [accordion] Browser did not open during login
>
> The CLI prints the login URL after attempting to open your browser. Copy the printed URL into your browser manually.
>
> ```bash theme={null}
> papermap auth login
> ```
>
> If you are on SSH or a headless machine, use the password fallback instead.
>
> ```bash theme={null}
> papermap auth login --password
> ```

> [accordion] Login timed out
>
> Browser login waits for a localhost callback for a limited time. Restart login and complete the browser flow promptly.
>
> ```bash theme={null}
> papermap auth login
> ```
>
> Also check that your browser can reach the printed `http://127.0.0.1:<port>/callback` URL after Papermap redirects.

> [accordion] Custom frontend URL is rejected
>
> Browser login only allows production Papermap frontend hosts by default. Internal or development frontends require an explicit opt-in.
>
> ```bash theme={null}
> PAPERMAP_ALLOW_UNTRUSTED_FRONTEND=1 \
>   papermap auth login --frontend-url https://internal-frontend.example
> ```
>
> Only use this with frontends you control.

> [accordion] Session expired
>
> The TUI attempts token refresh before forcing a new sign-in. If refresh fails, sign in again.
>
> ```bash theme={null}
> papermap auth login
> papermap
> ```
>
> If the issue repeats, log out and start with clean local auth state.
>
> ```bash theme={null}
> papermap auth logout
> papermap auth login
> ```

> [accordion] No workspaces appear
>
> Confirm your account has access to workspaces.
>
> ```bash theme={null}
> papermap workspace list
> ```
>
> If the CLI returns no rows, create a database-backed workspace or use the web app to configure sources that require browser-based setup.
>
> ```bash theme={null}
> papermap workspace create
> ```

> [accordion] Workspace picker looks stale
>
> Refresh the local workspace cache, then relaunch the TUI.
>
> ```bash theme={null}
> papermap workspace list
> papermap
> ```
>
> Logout also clears the workspace cache.
>
> ```bash theme={null}
> papermap auth logout
> ```

> [accordion] Workspace creation returns before connection is verified
>
> This is expected. `papermap workspace create` creates the workspace row first, then Papermap verifies the database connection in the background.
>
> If the workspace later cannot answer questions, verify the host, port, database name, username, password, network access, and database permissions.

> [accordion] Shell mode did not start
>
> `!` starts shell mode only from an empty prompt. If your prompt already has text, `!` is typed into the prompt instead.
>
> Clear the prompt with `Ctrl+L`, then press `!` again.

> [accordion] Shell command is stuck or running too long
>
> Press `Esc` to cancel the running shell command. Shell mode uses one-shot commands; there is no persistent shell session inside the TUI.

> [accordion] Windows says pwsh.exe was not found
>
> The default Windows shell is PowerShell 7 (`pwsh`). Install PowerShell 7 or switch shell mode to Command Prompt.
>
> ```yaml theme={null}
> shell:
>   windows: cmd
> ```
>
> Save the file at `C:\Users\<name>\.papermap\config.yaml`, then restart `papermap`.

> [accordion] Credential store fails in CI or a container
>
> Force file-backed credential storage when the OS keyring is unavailable.
>
> ```bash theme={null}
> PAPERMAP_FORCE_FILE_STORE=1 papermap auth login
> ```
>
> Keep `~/.papermap/credentials` private and out of source control.

> [accordion] The terminal is too small
>
> Papermap needs enough room to render the landing panel, chat layout, overlays, and key hints. Resize the terminal to at least roughly `60x20`, then relaunch or continue.

> [accordion] Slash does not open the command palette
>
> `/` opens the command palette only when the prompt is empty and the TUI is not streaming. Clear the prompt with `Ctrl+L`, then press `/`.

> [accordion] Thinking traces are hidden
>
> Press `Ctrl+T` to toggle thinking traces. To show them by default, set this in `~/.papermap/config.yaml`.
>
> ```yaml theme={null}
> show_thinking: true
> ```

## Reset local state

Use logout when you want to clear credentials and workspace cache.

```bash theme={null}
papermap auth logout
papermap auth login
papermap
```

Local paths to inspect when debugging:

| Path | Purpose |
| - | - |
| `~/.papermap/config.yaml` | TUI settings |
| `~/.papermap/credentials` | File fallback credentials |
| `~/.papermap/workspaces.json` | Workspace cache |

> [!WARNING]
>
> Do not paste credential file contents into support tickets or commits. Share error messages and command output only after removing secrets.

## Still need help?

> [card] [Contact Support](mailto:team@papermap.ai)
>
> Send the command you ran, the error output, your operating system, and whether you used browser or password login.

> [card] [Book a Demo](https://calendly.com/admin-pappermap/30min)
>
> Get guided help setting up Papermap for your team.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.