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

# Generate Repository Wiki (RepoWiki)

> qodercli wiki generates a structured wiki for the repository locally; downloaded on-demand as an External Command, it operates entirely offline, ensuring code never leaves your local environment.

<div id="overview">
  # Generate Repository Wiki
</div>

RepoWiki uses the `qodercli wiki` subcommand to **generate wiki documentation locally** for your code repository. The entire generation process is completed locally, ensuring your code never leaves your environment.

`wiki` is an **External Command**: it is not bundled with the main program. Instead, upon first use, it downloads and installs the platform-specific tool on demand from the official distribution source, and then runs it directly on your local machine.

<div id="requirements">
  # Prerequisites
</div>

* Sign-in and Authentication is completed. The `wiki` command requires authentication, which can be provided by signing in via `qodercli` or setting `QODER_PERSONAL_ACCESS_TOKEN`. For details, see [Sign-in and Authentication](/en/cli/01-getting-started/auth).
* An internet connection is required for the first use to download the wiki tool (only the tool itself is downloaded; no code is uploaded).

<div id="quick-start">
  # Quick Start
</div>

Run the following command in the root directory of the target repository:

```bash theme={null}
qodercli wiki
```

On the first run, the CLI will automatically download and install the tool, and then start generating the wiki for the repository in the current directory.

<div id="arguments">
  # Passing Arguments
</div>

All arguments after `wiki` are **passed through as-is** to the underlying wiki tool:

```bash theme={null}
qodercli wiki [arguments supported by this tool...]
```

The arguments supported by the underlying tool (such as output location, language, etc.) are defined by the tool itself. Please refer to its help information:

```bash theme={null}
qodercli wiki --help
```

<div id="workspace">
  # Specifying the Working Directory
</div>

By default, the wiki is generated for the repository in the current working directory (`process.cwd()`). To specify a different directory, use `--cwd` or `--workspace` **before** `wiki`:

```bash theme={null}
qodercli --cwd /path/to/repo wiki
qodercli --workspace /path/to/repo wiki
```

Note the position: the working directory argument placed before `wiki` is parsed by the CLI; arguments placed after `wiki` are passed through to the underlying tool.

<div id="install-management">
  # Installation and Version Management
</div>

The `wiki` tool is managed through the CLI's external command mechanism. You can explicitly manage it using the `qodercli external` series of subcommands:

```bash theme={null}
qodercli external list              # List available external commands and their installation status
qodercli external update wiki       # Install or update wiki to the target version (alias: install)
qodercli external remove wiki       # Remove the installed wiki
```

The installed content is located in `external-commands/wiki/` under the Global Configuration Directory and is retained by version directory.

<div id="privacy">
  # Code Never Leaves Your Environment
</div>

Wiki generation is a local operation: after downloading and installation, the wiki tool reads the repository and generates documentation on the local file system without uploading any repository code. The network is only used to download the tool itself and for necessary authentication.

<div id="network">
  # Network and Proxy
</div>

The tool download uses your system network settings. The CLI passes common proxy and certificate Environment Variables through to the external command, including `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`, and `NODE_EXTRA_CA_CERTS`. For troubleshooting in restricted network environments, see Network Troubleshooting.

To customize or disable the Registry source, you can use the following Environment Variables:

* `QODER_EXTERNAL_COMMAND_REGISTRY_URL` — Overrides the Registry URL; set to `off`/`none`/`false`/`0` to disable remote refresh.
* `QODER_EXTERNAL_COMMAND_REGISTRY_FILE` — Loads the Registry from a local file.

<div id="faq">
  # FAQ
</div>

**Does entering `qodercli wiki` prompt that the command does not exist?**
Ensure the CLI is updated to the latest version (older versions may not include this command). You can run `qodercli --help` to check if `wiki` is in the command list.

**Authentication failed?**
Ensure you are signed in or have correctly set `QODER_PERSONAL_ACCESS_TOKEN` (make sure there are no spaces before or after the token). For details, see Sign-in Troubleshooting.

**Download failed on the first run?**
Check your network and proxy settings, and configure the proxy Environment Variables mentioned above if necessary before retrying. To adjust the Registry source, use the `QODER_EXTERNAL_COMMAND_REGISTRY_URL` / `QODER_EXTERNAL_COMMAND_REGISTRY_FILE` Environment Variables (see above).

**How to update the wiki tool version?**
Use `qodercli external update wiki` to update to the latest version.

<div id="next-steps">
  # Next Steps
</div>

* Sign-in and tokens: [Sign-in and Authentication](/en/cli/01-getting-started/auth).
* Network and proxy configuration: Network and Proxy.
* Command line startup arguments: CLI Startup Arguments Reference.
