A Visual Studio Code extension to create or update confluence pages directly from your code using openAI GPT model and confluence APIs
🚀 Features
- Generate feature and technical documentation using JIRA and Confluence integration.
- Sync the current open document (Markdown, HTML, or plain text) to Confluence.
- Automatically detects whether the page exists:
- If it exists → updates the content.
- If it doesn't → creates a new page.
- Uses
.env file for clean configuration.
- Displays success or error messages in the VS Code UI.
⚙️ Requirements
- A Confluence API token: Get one here
- A
.env configuration file (see below).
- The target Confluence space and title.
- TypeScript and necessary type definitions (e.g.,
@types/jsdom ).
🛠️ Setup
1. Clone or download the extension
# Clone the repository
git clone <your-fork-or-path>
cd tech-doc-generator
npm install
2. Create a .env file in the root
CONFLUENCE_BASE_URL=https://yourcompany.atlassian.net/wiki
CONFLUENCE_SPACE_KEY=ENG
CONFLUENCE_FOLDER_ID=folder_id_to_store_all_docs
OPENAI_API_KEY=your_api_token
JIRA_API_TOKEN=your_jira_api_token
JIRA_EMAIL=your_email
JIRA_DOMAIN=your_jira_domain
💡 You can use .env.example as a template.
3. Launch the extension
In VS Code, press F5 to open the Extension Development Host.
💡 How to Use
Open a file you want to sync (e.g., documentation.md ).
Run the command:
Sync Confluence Page
From the Command Palette (Ctrl+Shift+P or Cmd+Shift+P ).
You'll see a confirmation toast if it succeeds, or an error message if it fails.
Commands
- Generate Feature Documentation:
docugen.generateFeatureDoc
- Generate Tech Documentation:
docugen.generateTechDoc
📁 File Structure
├── .env.example # Sample environment configuration
├── package.json # Extension metadata and dependencies
├── src
│ ├── extension.ts # Main extension logic
│ └── utils # Utility functions
│ ├── getJiraParentOrEpic.ts
│ ├── confluenceSearch.ts
│ └── utils.ts
📌 Notes
- This extension uses the Confluence REST API's
storage representation (HTML/XML).
- If you're working with Markdown, you can convert it before upload (feature coming soon!).
- Currently supports one title per sync (defined via ENV).
- Utilizes OpenAI GPT for generating formatted documentation.
📬 License
MIT — © 2024 Your Name or Company
| |