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

# Command reference

> OpenWiki command-line usage, flags, and connector subcommands

OpenWiki ships as a single `openwiki` binary for interactive chat and one-shot documentation runs. For installation and first use, see [Quickstart](/oss/openwiki/quickstart).

## Core commands

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# Interactive chat in code mode (current repository)
openwiki
openwiki "Please generate documentation for this repository"

# Personal mode
openwiki personal
openwiki personal --init
openwiki personal --update

# Explicit code mode
openwiki code --init
openwiki code --update
openwiki code --update --print

# Defaults to code mode
openwiki --init
openwiki --update

# One-shot print mode
openwiki -p "Summarize what you can do"

# Explore the wiki locally
openwiki visualize
openwiki visualize openwiki --port 4400 --no-open

# Help
openwiki --help
```

### Common flags

| Flag                       | Description                                                                                                                                                                             |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--init`                   | Generate initial documentation. Defaults to code mode. In a TTY without `--print`, streams agent output and exits automatically on success. `--init` and `--update` cannot be combined. |
| `--update`                 | Update existing documentation. Defaults to code mode. In a TTY without `--print`, streams agent output and exits automatically on success. `--init` and `--update` cannot be combined.  |
| `--mode <personal\|code>`  | Choose personal brain or repository docs.                                                                                                                                               |
| `-p`, `--print`            | Run once, print the final assistant output, and exit. Provide a message or command. Interactive chat without `--print` stays open for follow-ups.                                       |
| `--modelId` / `--model-id` | Choose a model ID for the run.                                                                                                                                                          |
| `--telemetry-file=<path>`  | Also write the telemetry payload for the run to a local JSON file.                                                                                                                      |
| `-h`, `--help`             | Print usage.                                                                                                                                                                            |

## Visualize

You can visualize the generated wiki as an interactive node graph and live Markdown reader.

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
openwiki visualize
openwiki visualize openwiki --port 4400 --no-open
openwiki visualize ~/.openwiki/wiki
```

For details, see [Visualize your wiki](/oss/openwiki/visualize).

## Auth and connectors

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# List supported auth providers and status
openwiki auth

# Browser OAuth; save tokens to ~/.openwiki/.env and create connector config when possible
openwiki auth gmail
openwiki auth notion
openwiki auth slack
openwiki auth x

# Regenerate connector config from saved auth env vars
openwiki auth configure <provider> [--force]

# List live MCP tools for MCP-backed providers
openwiki auth tools <provider>

# Run source-specific connector ingestion
openwiki ingest <source|source-instance|all>

# HTTPS tunnel for Slack OAuth; saves OPENWIKI_HTTPS_OAUTH_REDIRECT_URI
openwiki ngrok start [url] [--port <port>]
```

## Cron (macOS)

Manage optional connector schedules for [personal mode](/oss/openwiki/personal-mode) sources. On macOS, OpenWiki can install schedules as user LaunchAgents that periodically refresh a source (for example Gmail or web search). Use these commands to list, pause, resume, or delete them:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
openwiki cron list
openwiki cron pause <source|all>
openwiki cron resume <source|all>
openwiki cron delete <source|all>
```

`cron delete` removes the saved schedule and unloads its LaunchAgent. It does not remove auth, connector config, raw data, or wiki content.

## Slash commands (interactive)

In interactive chat mode, you can use the following commands:

* `/api-key`: Update the current provider API key (masked prompt)
* `/langsmith-key`: Update or clear LangSmith tracing credentials (masked prompt)
* `/provider` and `/model`: Change provider or model for the session (persisted to `~/.openwiki/.env`)
* `/init` and `/update`: Launch init or update from the session
* `/exit`: Exit the app

## See also

* [Personal mode](/oss/openwiki/personal-mode)
* [Model providers](/oss/openwiki/providers)
* [Automate updates](/oss/openwiki/automate-updates)

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/openwiki/cli-reference.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
