CodeDoc AI for Confluence — Get connected in 5 minutes
Before you start: You need two things: (1) an API key from your AI provider
and (2) a personal access token from your Git hosting service. Both are free to create and
take about 2 minutes each. The setup wizard in the app walks you through each step.
Step 1: Connect Your AI Provider
Select the AI service you want to use. CodeDoc AI supports Anthropic Claude, OpenAI GPT, and Google Gemini.
Your API key stays in your provider account — CodeDoc AI never stores your source code.
Click Create Key, give it a name (e.g. “CodeDoc AI”), and copy the key.
In the CodeDoc AI setup wizard, select Anthropic as your AI provider.
Paste the key into the API Key field and click Connect & Validate.
Select your preferred Claude model from the dropdown that appears.
Cost tip: Claude Haiku is the most affordable model and fast enough for most documentation jobs.
Typical cost: $0.01–0.05 per generation for a medium-sized repository.
Billing required: Anthropic requires a credit card on file even for low usage.
Add a payment method at platform.claude.com/settings/billing
before generating your key.
Click Create API key. Select a Google Cloud project or create a new one.
Copy the key and paste it into the CodeDoc AI setup wizard.
Select Google as your AI provider, paste the key, and click Connect & Validate.
Select your preferred Gemini model from the dropdown.
Free tier available: Google Gemini offers a generous free tier — ideal for trying CodeDoc AI
at zero AI cost. The free tier has rate limits but is sufficient for occasional documentation runs.
Step 2: Connect Your Git Provider
Select your Git hosting service. CodeDoc AI only needs read access to your repositories —
no write permissions are required.
Give it a name (e.g. “CodeDoc AI”), set an expiration date, and tick the repo scope.
Click Generate token and copy the value — it starts with ghp_ and is shown only once.
In CodeDoc AI, paste the token into the Personal Access Token field and click Connect & Validate.
You should see your GitHub username confirmed.
Fine-grained tokens: You can also use a fine-grained personal access token for better security.
Select the specific repositories you want to grant access to and enable Contents: Read permission.
Click Create personal access token. Copy the value — it starts with glpat- and is shown only once.
In CodeDoc AI, paste the token and click Connect & Validate.
Self-hosted GitLab: CodeDoc AI supports self-hosted GitLab instances.
Enter your instance URL in the Base URL field that appears after selecting GitLab.
Bitbucket — Two Token Options
Bitbucket supports two different token types. Choose one based on how you want to use CodeDoc AI:
In CodeDoc AI, enter the token as your-email@example.com:the-api-token (colon-separated, no spaces).
This gives access to all your Bitbucket workspaces and supports the Browse Repositories feature.
Important: Repository Access Tokens (Option A) cannot browse all repositories —
use the Add by URL option in CodeDoc AI’s Repositories tab.
User API Tokens (Option B) support browsing all workspaces freely.
Click your profile icon (top right) → Personal access tokens.
Click + New Token, give it a name, and set the Code scope to Read only.
Click Create and copy the token — it is shown only once.
In CodeDoc AI, paste the token and also enter your Organization URL: https://dev.azure.com/your-org.
Click Connect & Validate.
Organization URL required: The Organization URL field is mandatory for Azure DevOps.
It looks like https://dev.azure.com/mycompany — find it in your browser’s address bar
when logged into Azure DevOps.
Access Control (Optional)
By default, only Confluence Administrators can access CodeDoc AI. To grant access to other users,
go to the Permissions tab and assign Confluence groups to one of two roles:
Administrator — Full access including Settings and Permissions.
Job Operator — Can create and run documentation jobs, but cannot change Settings or Permissions.
Add the groups that should have access — then manage their members in the
Confluence Admin UI (→ Confluence Settings → Groups). No changes to the app are needed
when users join or leave a group.
Tip: Create a dedicated group like codedoc-ai-operators in Confluence and add it to the
Job Operator role. Your Confluence admin can then manage access without touching the app.
What’s Next
Once both providers are connected, the wizard closes and you land on the Dashboard. From there:
Go to the Repositories tab and add the repos you want to document.
Go to Jobs → Create Job — select your repos, choose a documentation template, and set a trigger.
Click Run Now or wait for your trigger to fire (schedule, webhook, etc.).
Your documentation appears as a Confluence page in the space you selected.
Tip: Google Gemini’s free tier is perfect for a first test run at zero cost.
You can switch to Anthropic or OpenAI later in Settings → AI Provider.