CodeDoc AI for Confluence — Complete Setup & User Guide
CodeDoc AI for Confluence automatically generates documentation from your source code repositories and publishes it directly to Confluence. You bring your own AI provider (BYOK — Bring Your Own Key), connect your Git hosting, and the app takes care of the rest: analyzing your codebase, generating structured documentation in Confluence-native format, and keeping it up to date.
Key capabilities:
Every generation is tracked with token usage, file count, AI model used, and a direct link to the created Confluence page.
Here is what generated documentation looks like in Confluence. These pages were created automatically from a Terraform infrastructure-as-code repository using the Developer Documentation preset.
The AI generates a structured overview with a technology table listing all frameworks, tools, and cloud services detected in the codebase.
Auto-generated overview with tech stack table — versions, roles, and descriptions extracted from code
Complex architectures are broken down into core principles, data flow descriptions, and module-by-module documentation with file references.
Architecture section with core principles, component interaction, and key modules
The AI documents APIs, configuration outputs, and software dependencies including version ranges and installation requirements.
API reference with code examples and dependency list
The setup wizard has two steps: connecting an AI provider and connecting a Git provider. Both require an API key or access token from the respective service.
CodeDoc AI uses a Bring Your Own Key (BYOK) model. You need an API key from one of the supported providers. The app never stores your source code — it sends it directly from Git to the AI provider using your key.
Where to get your API key:
Connect your Git hosting service so the app can read your repositories. You need a personal access token or repository access token with read permissions.
https://dev.azure.com/your-org).Each Git provider has its own way of creating tokens. Below is a brief summary — follow the link for full instructions from the provider.
| Provider | Token Type & Required Scope | Instructions |
|---|---|---|
| GitHub | Personal Access Token (classic or fine-grained) Scope: repo (read) |
GitHub Docs |
| GitLab | Personal Access Token Scopes: read_api, read_repository |
GitLab Docs |
| Bitbucket | Repository Access Token or API Token with scopes Scope: Repositories Read |
Bitbucket Docs |
| Azure DevOps | Personal Access Token Scope: Code (Read) |
Microsoft Docs |
email:api_token. Repository Access Tokens cannot browse all repositories — use "Add by URL" instead.
After setup, go to the Repositories tab to add the repositories you want to document.
https://github.com/org/repo).main).This method works for all token types and is the only option when using Bitbucket Repository Access Tokens (which are scoped to a single repository).
A job defines what to document, how to format it, and where to publish it. Go to the Jobs tab and click Create Job.
Job creation: select repositories, preset, language, and trigger
Presets control the structure, tone, and depth of the generated documentation. Each preset produces a different Confluence page layout tailored to its audience.
| Preset | Audience | Description |
|---|---|---|
| Developer Documentation | Developers | Technical details with code examples, architecture overview, API reference, configuration, and troubleshooting. 9 structured sections. |
| Comprehensive Technical | Developers | Full deep-dive covering every module, data model, security implementation, build pipeline, testing strategy, and known limitations. 12 sections. |
| Management Overview | Stakeholders | High-level business view without technical jargon. Covers capabilities, risks, scalability, and strategic recommendations. No code examples. |
| Customer Documentation | External customers | Professional documentation for end users. Features, getting started guide, and integration instructions. No internal implementation details. |
| Compliance & Audit | Security / Compliance | Security controls, data classification, access management, GDPR/ISO 27001/SOC2 mappings, and risk register. |
| Onboarding Guide | New team members | Step-by-step setup, key concepts explained simply, day-to-day workflows, and common mistakes to avoid. |
| Quick Reference | Developers | Minimal and concise: tech stack table, key commands, project structure, and important config values. 5 sections. |
| Custom | Any | Define your own documentation style with a custom prompt (up to 2000 characters). Full control over structure and content. |
Each job has a trigger that determines when it runs.
| Trigger | How it works | Plan |
|---|---|---|
| Manual | Click "Run" on the job to generate documentation on demand. | All plans |
| On Commit | Triggered automatically when code is pushed to the configured branch. Requires a webhook (see below). | Subscription |
| On Merge | Triggered automatically when a pull/merge request is merged into the configured branch. Requires a webhook. | Subscription |
| Scheduled | Runs on a recurring schedule: daily, weekly, or monthly. All times are in UTC. | Subscription |
Webhook triggers allow your documentation to automatically regenerate when code changes. The app provides a single Webhook URL that works for all jobs. You add this URL to your Git repository's webhook settings, and the app matches incoming events to the correct jobs by repository URL and branch.
Webhook URL displayed when selecting On Commit or On Merge trigger
The app processes the following Git events. Configure your webhook to send only the events you need:
| Provider | Push (On Commit) | Merge (On Merge) | Where to Configure |
|---|---|---|---|
| GitHub | push |
pull_request (closed + merged) |
Repository → Settings → Webhooks → Add webhook |
| GitLab | Push Hook |
Merge Request Hook |
Repository → Settings → Webhooks |
| Bitbucket | repo:push |
pullrequest:fulfilled |
Repository → Repository settings → Webhooks |
| Azure DevOps | git.push |
git.pullrequest.merged |
Project settings → Service hooks → Web Hooks |
repo:fork, GitHub issues) will be ignored by the app. If your webhook doesn't trigger a job, check that you selected the correct event type.
application/json.repo:push) — for On Commit triggers.pullrequest:fulfilled) — for On Merge triggers.Scheduled triggers let your documentation regenerate automatically on a recurring basis without any webhook configuration. Three schedule types are available:
| Type | Configuration | Example |
|---|---|---|
| Daily | Select the earliest hour (0–23 UTC) | Every day starting at ~02:00 UTC |
| Weekly | Select day of week + earliest hour | Every Monday starting at ~08:00 UTC |
| Monthly | Select day of month (1–28) + earliest hour | 1st of each month starting at ~06:00 UTC |
Upcoming scheduled jobs with countdown timer and last run time
Before generating documentation, the app analyzes your repository to determine which files to include. You have several options:
Analysis preview showing file count, token estimate, and AI-selected files
/src or /backend).**/*.test.ts or include only src/**.The analysis preview shows the total file count, code file count, and estimated token usage before you run the job. Your file selection is saved with the job and restored when you edit it.
Under Advanced AI Settings, you can set a maximum output token limit (default: 8192). This controls the length of the generated documentation — not the input. Increase this for comprehensive presets or very large codebases.
Each job publishes to a specific Confluence space. You can optionally select a parent page to nest the documentation under an existing page, or choose "Root (no parent)" to create a top-level page.
When you run the same job again, the existing Confluence page is updated in place — no duplicate pages are created.
Enable "Require approval before publishing" when creating or editing a job to activate the review workflow. When enabled, generated documentation is not published immediately — instead, it is saved as a visible Confluence page with a [DRAFT] prefix in the title, and the job enters a Pending Review state.
[DRAFT] title prefix and is visible in your Confluence space for review.[DRAFT] prefix from the title, making the page a regular published page. The job status changes to Completed.The approval workflow is available on both the Dashboard (recent jobs list) and the Jobs tab (full job table). The Dashboard also shows a Pending Review counter tile so you can see at a glance how many drafts are awaiting approval.
Custom Presets let you save a complete documentation configuration as a named, reusable template. Instead of re-configuring documentation style, language, file filters, and output settings for every new job, you create a preset once and load it with one click.
Presets tab — create, edit, duplicate, and delete reusable documentation configurations
Each preset saves the following configuration:
*.test.js, vendor/**).Open the Presets tab in the CodeDoc AI dashboard. Only Admins can create, edit, or delete presets — all users can load them when creating jobs.
Use Edit to update an existing preset, Duplicate to create a copy as a starting point, and Delete to remove one.
When creating a new job, a Load from saved preset dropdown appears at the top of the form (only visible if at least one preset exists). Selecting a preset instantly fills in all matching fields — you can then adjust any individual setting before saving the job.
The Dashboard is the first screen you see when opening CodeDoc AI. It provides an overview of your documentation activity.
Dashboard with generation activity chart and quick-run job list
The Queue & History tab shows everything that's running, queued, completed, or failed.
Shows jobs currently being processed or waiting in line. Each entry displays the job name, a spinner while running, and a Cancel button to remove it from the queue.
Complete generation log with status, model, file count, and token usage
A complete log of every documentation generation with the following details:
Use Clear History to remove all history entries. This does not delete the generated Confluence pages.
When you have jobs with scheduled triggers, this section appears automatically and shows the next run time with a countdown (e.g. "in 3h 45m"), the schedule description, and when the job last ran.
The Settings tab lets you manage all configuration after initial setup.
View your current AI provider and model, or switch to a different one. When you change providers or keys, the app validates the connection and fetches available models. Click Refresh Models to discover newly released models from your provider.
You can connect multiple Git providers simultaneously — for example, a work GitHub and a personal GitLab. Each provider is listed with its type, display label, connected user, and date added.
The Settings page displays your Webhook URL — a single URL that works for all your webhook-triggered jobs. Add this URL to any repository's webhook configuration in your Git provider. The app automatically matches incoming events to the correct jobs based on the repository URL and branch.
Fine-tune how the app handles large repositories:
File contents are transmitted in full to your AI provider. No per-file size truncation is applied — the input token budget is the relevant limit for controlling how much code is sent in total.
| Provider | Notable Models | Key Details |
|---|---|---|
| Anthropic | Claude Opus, Sonnet, Haiku | Excellent for technical documentation. Dynamic model discovery. |
| OpenAI | GPT-4o, GPT-4o-mini, o1, o3 | Filters to chat-capable models. Wide model selection. |
| Google AI | Gemini 2.5 Flash, Gemini Pro | Generous free tier. Filters to content generation models. |
| Provider | URL | Notes |
|---|---|---|
| GitHub | github.com | Personal access token with repo scope. |
| GitLab | gitlab.com | Token with read_api + read_repository. |
| Bitbucket | bitbucket.org | Repository Access Token (Bearer) or API Token with scopes (email:token). |
| Azure DevOps | dev.azure.com | PAT with Code (Read). Organization URL required. |
CodeDoc AI is a paid app with a 30-day free trial. During the trial, all features are fully available — there is no difference between trial and paid subscription. After 30 days, a subscription is required to continue using the full feature set.
Teams with up to 10 users on Atlassian's community plan receive the app at no cost with the same full feature set.
If the trial expires without purchasing a subscription, the app falls back to a limited mode:
CodeDoc AI includes a built-in role system that controls who can access the app and what they can do. Confluence Administrators always have full access. For all other users, access is granted by assigning Confluence groups to one of two roles.
| Role | Who it's for | What they can do |
|---|---|---|
| Administrator | App admins, team leads | Full access — Dashboard, Repositories, Jobs, Queue & History, Settings, Permissions |
| Job Operator | Developers, documentation owners | Dashboard, Repositories (read-only), Jobs (create & run), Queue & History. Cannot access Settings or Permissions. |
| Confluence Administrator | Confluence site/product admins | Always full Administrator access — no configuration needed. |
| No role | All other Confluence users | Access Denied — sees a message with a link to request access from the admin. |
Access is managed entirely through Confluence groups — you assign groups to roles, and manage group members in the native Confluence Admin UI. This means you never need to touch the app when users join or leave; just manage the groups in Confluence as you normally would.
Permissions tab — two dedicated groups assigned to their respective roles. The current user's role (Administrator) is shown in the top-right corner next to the AI provider and model.
codeDocAI-Admins → add to the Administrator Groups sectioncodeDocAI-JobOperator → add to the Job Operator Groups sectionThe current user's role is always visible in the top-right corner of the app, next to the AI provider and model badges. This makes it easy to confirm at a glance which level of access you have.
Understanding how your data flows through CodeDoc AI:
For full details, see our Privacy Policy.
This usually means the AI model returned an empty or malformed response. Common causes:
The AI sometimes produces markup that isn't valid Confluence XHTML. The app includes an automatic XHTML repair engine that detects and fixes broken tags, unclosed elements, and invalid macro syntax. If the error persists after the automatic repair and 3 retries, the app falls back to a simplified format (plain text with headings) to ensure the page is always created. No action required on your part — just re-run the job.
Your AI provider is rate-limiting requests. The app automatically retries up to 3 times with increasing delays (3s, 8s, 15s). If the error persists:
Your AI provider account has no remaining credits. Top up your balance:
The combined source code exceeds the AI model's maximum input size. Solutions:
**/*.min.js, **/vendor/**, **/*.lock)./src) instead of the entire repository.
You configured a webhook event type that the app doesn't recognize. See the supported events table above. Only push and pull_request/merge_request events are processed. Other events (fork, issue, comment, etc.) are ignored.
The webhook fires correctly but no job is matched. Check:
You are likely using an Atlassian Account API token (without scopes). Bitbucket requires either:
email:api_token.Repository Access Tokens are scoped to a single repository and cannot list all repositories. Use "Add by URL" instead. To browse all repositories, you need a user-level API Token with scopes.
Scheduled triggers are checked hourly by the Atlassian platform. Your job will run within approximately 1 hour after the configured time. This is a platform-level constraint. If the job didn't run at all after 2+ hours, check:
AI-generated documentation may contain errors or hallucinations. Always review generated content before sharing it. Tips:
CodeDoc AI itself charges no per-generation fee — you pay only for the Marketplace subscription (free or paid plan). AI costs are billed directly by your AI provider based on token usage. Each generation's token count is tracked in the history so you can monitor costs. A typical documentation generation for a medium repository uses 10,000–50,000 input tokens and 2,000–8,000 output tokens.
Currently, one model is selected globally and used for all jobs. You can change the model at any time in Settings. If you need different models, run the first job, switch models in Settings, then run the second job.
Yes. Each job can include up to 2 repositories. The AI receives code from all selected repositories and generates a single unified documentation page.
CodeDoc AI shows all text-based files from your repository — there is no language whitelist. The file tree displays everything that is not explicitly excluded. The following are automatically filtered out, as they are not useful for documentation:
node_modules/, vendor/, .git/dist/, build/, .next/, target/, __pycache__/ etc.package-lock.json, yarn.lock, Cargo.lock, go.sum etc..pyc, .class, .dll etc.).env, .env.local, .env.production etc..pem, .key, .crt etc.Everything else — JavaScript, TypeScript, Python, Java, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, Dart, Vue, Svelte, HTML, CSS, SCSS, XML, Groovy, Solidity, R, Lua, shell scripts, Terraform, Protobuf, GraphQL, Dockerfiles, and more — is shown and can be selected. The AI model determines how well it understands each file type; popular languages and frameworks work best.
English, German, French, Spanish, Italian, Portuguese, Japanese, Chinese, and Korean are built in. You can also select "Custom" and specify any language — the AI will attempt to generate documentation in that language (quality depends on the AI model's capabilities).
Documentation is published as a regular Confluence page in the space you selected. You can edit, move, or delete it like any other Confluence page. Running the job again will update the existing page (not create a duplicate). If the approval workflow is enabled, the page is created with a [DRAFT] prefix and remains visible in your space until you publish or discard it.
Yes. Enable "Require approval before publishing" in the job settings. The generated page will be saved as a draft with a [DRAFT] prefix. You can view, edit, and approve it from the Dashboard or Jobs tab before it becomes a regular published page. See Approval Workflow for details.
Yes. Each trigger causes a full regeneration — the app re-reads the current code from Git, sends it to the AI, and updates the Confluence page with fresh documentation.
Yes. The app uses your personal access token to authenticate with your Git provider. As long as your token has read access to the repository, it works with both public and private repos.
Go to Confluence Settings → Apps → Manage apps, find CodeDoc AI, and click Uninstall. This removes all app configuration and stored data. Generated Confluence pages remain in your spaces — delete them manually if needed.
Need help? We're here for you.
Privacy Policy · Terms of Service · © 2026 Janek Behrens