DocUbot — Documentation Generator Agent
DocUbot is a VS Code extension that automatically generates complete technical documentation for your project using GitHub Copilot. It scans your repository, analyzes the code structure, and produces professional Markdown documentation, which can be saved locally and pushed to a Confluence page via the internal Doc-AI API.
Features
@doc chat participant — trigger documentation generation directly from the GitHub Copilot Chat panel
- Project scanning — automatically reads your repository structure and key source files
- AI-powered documentation — generates a full Markdown document including architecture, modules, technologies, endpoints, and usage
- Local file output — documentation is saved to
docs/documentation.md in your workspace (can be disabled)
- Confluence integration — saves the generated documentation to a configurable Confluence path via the Doc-AI API
- Okta authentication — secure API calls using PKCE OAuth 2.0 flow with Okta
Requirements
- VS Code
^1.90.0
- GitHub Copilot extension installed and active
- An active Okta session (see the Okta Setup section below)
Okta Setup
Before using @doc, you must configure and authenticate with Okta. The extension uses the PKCE OAuth 2.0 flow to obtain a secure access token.
Run the command Okta: Configure from the Command Palette (Ctrl+Shift+P).
You will be prompted to fill in the following values:
| Parameter |
Description |
Default value |
| Okta Domain |
Your Okta tenant domain |
gem-beta.oktapreview.com |
| Authorization Server ID |
ID of the Okta authorization server |
aus3v6rg3e9zNHMxe0x6 |
| Client ID |
OAuth 2.0 application client ID |
2-b-doc-gen-ai-extension-5UT3EO53MPV0E27 |
| Callback Port |
Local HTTP port used during the OAuth redirect |
52871 |
| Scopes |
Space-separated list of OAuth scopes |
api.doc-ai |
| Redirect Path |
Path on the local callback server |
/callback |
These values can also be set directly in your VS Code workspace settings under the oktaAuth.* namespace.
2. Log in to Okta
Run the command Okta: Login from the Command Palette (Ctrl+Shift+P).
This will:
- Open a browser tab pointing to the Okta authorization page.
- After you authenticate in the browser, Okta redirects back to
http://127.0.0.1:<port><redirectPath>.
- The extension exchanges the authorization code for an access token and stores it securely in VS Code's secret storage.
- A confirmation message "Connection successful!" is shown.
Automatic prompt — if you type @doc in the Copilot Chat panel without an active session, the login flow is automatically triggered before any documentation is generated.
3. Verify / Logout
- Check current session — a session is active as long as the stored access token has not expired. Token expiry is checked automatically at each
@doc invocation.
- Log out — run the command
Okta: Logout to delete the stored session and force a new login on the next use.
Troubleshooting
| Error |
Solution |
Invalid Okta domain |
Re-run Okta: Configure and enter a valid domain (e.g. gem-beta.oktapreview.com) |
Missing Okta clientId |
Re-run Okta: Configure and enter your Client ID |
User is not assigned to the client application |
Ask your Okta administrator to assign your user to the application |
State mismatch |
Potential CSRF issue — retry the login flow |
Token exchange failed |
Check your Client ID and Authorization Server ID |
Using @doc
- Open the GitHub Copilot Chat panel (
Ctrl+Alt+I).
- Type
@doc followed by any optional instruction (or just press Enter).
- If no Okta session is active, the login flow starts automatically.
- The extension scans your repository, generates documentation with Copilot, and streams the result directly in the chat.
- Once generation is complete:
- The documentation is saved locally to
docs/documentation.md at the root of your workspace (enabled by default, see below).
- It is also pushed to Confluence via the Doc-AI API using the configured project URL and Confluence path.
Local Documentation File
At the start of each @doc generation, you will be asked:
Save documentation locally?
- Yes — write the documentation to
docs/documentation.md at the root of your workspace (default)
- No — only push to Confluence, no local file is created
The local file is created (or overwritten) on each generation when you choose Yes.
All Available Settings
| Setting |
Type |
Default |
Description |
oktaAuth.oktaDomain |
string |
gem-beta.oktapreview.com |
Okta tenant domain |
oktaAuth.clientId |
string |
2-b-doc-gen-ai-extension-5UT3EO53MPV0E27 |
OAuth 2.0 Client ID |
oktaAuth.authServerId |
string |
aus3v6rg3e9zNHMxe0x6 |
Authorization Server ID |
oktaAuth.port |
number |
52871 |
Local callback port |
oktaAuth.scopes |
array |
["api.doc-ai"] |
OAuth scopes requested at login |
oktaAuth.redirectPath |
string |
/callback |
Local redirect path |
oktaAuth.documentationProjectUrl |
string |
Azure DevOps repo URL |
Project URL sent with the saved documentation |
oktaAuth.documentationConfluencePath |
string |
Default Confluence path |
Confluence path where documentation is saved |
oktaAuth.documentationIsNew |
boolean |
true |
Default answer for the "is new documentation" prompt |