Ghostwriter for VS Code
AI-assisted content creation tool powered by GitHub Copilot for interviews and
writing workflows. This extension provides an in-editor experience for
conducting AI-driven interviews and generating polished articles from
transcripts.
Screenshots
Home View
Interview Mode
Writer Mode
Voice Generator Mode
Features
AI-Powered Interview Mode
- Interactive AI Interviews: Conduct dynamic interviews with GitHub Copilot
asking relevant questions
- Smart Conversation Flow: AI adapts questions based on your responses
- Instant Transcript Creation: Transcripts are created immediately when you
provide the interview topic and saved to
.ghostwriter/transcripts/
- Real-time File Updates: Each question and answer is written to the
transcript file as it happens, preventing data loss
- Resume Interrupted Interviews: Resume an interview from where it left off
by selecting an existing transcript file
- Auto-completion Detection: Automatically detects when the interview is
complete
- Model Selection: Choose from available GitHub Copilot models (GPT-4o,
GPT-4o mini, etc.)
- Multi-Language Support: Conduct interviews in over 20 languages including
Spanish, French, German, Chinese, Japanese, and more
- Interviewer Agents: Create, manage, and select custom interviewer prompts
stored in
.ghostwriter/interviewer
- Transcript Management: Automatically saves formatted transcripts to the
.ghostwriter folder
- Hot Module Replacement: Fast development with HMR support
Advanced Writer Mode
- Transcript Selection: Browse interview transcripts from your workspace or
select custom files
- Voice File Integration: Apply writing style from voice files for
consistent tone
- Model Selection: Choose specific GitHub Copilot models for content
generation
- Multi-Language Support: Generate content in over 20 languages including
Spanish, French, German, Chinese, Japanese, and more
- Writer Agents: Create, manage, and select custom writer prompts stored in
.ghostwriter/writer
- Writing Style Options:
- Formal, Casual, or Conversational tone
- Automatic heading generation
- SEO optimization
- Keyword Optimization: Define target keywords for improved search engine
visibility
- Frontmatter Templates: Create reusable YAML frontmatter templates for
consistent article metadata
- Real-time Streaming: Watch your article being generated in real-time
- Direct File Save: Save generated articles directly to your workspace
- Save Settings Templates: Configure default save locations and filename
templates with placeholders like {{slug}} and {{date|yyyy-MM-dd}}
- Image Support: Attach and embed images during writing with automatic
markdown reference insertion
- Image Remapping for Production: Configure production image paths (e.g.,
/uploads/2026/02) when saving articles for deployed environments
- Draft Iteration Mode: Refine your articles conversationally with iterative
improvements
Draft Iteration Mode
- Conversational Refinement: Instead of one-shot generation, refine your
articles with natural language prompts
- "Make the intro more engaging"
- "Add more technical depth to section 3"
- "This sounds too formal, make it more like my other posts"
- Revision History: Track all changes with automatic revision management
- Version Navigation: Browse through previous versions with prev/next
controls
- Side-by-side History: View revision history sidebar showing all refinement
prompts
- Persistent Drafts: Drafts saved to
.ghostwriter/drafts/ and accessible
from home page
- Smart Draft Titles: Drafts automatically use interview topics as titles
for easy identification instead of timestamps
- Export Options: Export final version as markdown with optional image
remapping for production environments at any time
Voice Generator Mode
- Writing Style Analysis: Automatically analyze your existing writing to
create a personalized voice profile
- Smart Content Discovery: Recursively searches for markdown files in your
selected folder
- Recent Content Priority: Analyzes your most recent writing (up to 20
files) to capture your current style
- Comprehensive Voice Profile: Generates detailed analysis including:
- Voice characteristics (tone, pacing, formality)
- Style rules and guidelines
- Lexicon (favorite phrases, words to avoid)
- Structure patterns
- Automatic Storage: Voice profiles saved to
.ghostwriter/voices/ folder
- Easy Integration: Use generated voice files in Writer mode for consistent
content
Image Management
- Interview Image Capture: Attach and embed images during interviews with
automatic markdown reference insertion
- Configurable Storage: Choose where images are stored with VS Code
workspace setting or per-session override
- Automatic Organization: Images automatically saved to
.ghostwriter/attachments/ (or custom folder) with unique filenames
- Production Deployment: Remap image paths for production environments
- Configure production image path prefix (e.g.,
/uploads/2026/02)
- Automatic path replacement in markdown when saving articles
- Ensures proper formatting without double slashes
- MarkdownRenderer Integration: Properly displays embedded images in preview
with async loading and error handling
State Persistence
- Model Preferences: Selected GitHub Copilot model persists across sessions
- Language Preferences: Selected content language persists across sessions
- Frontmatter Templates: Save and reuse frontmatter templates for all
articles
- Agent Selection: Selected interviewer and writer agents persist across
sessions
- Prompt Configuration: Selected prompt configuration persists across
sessions
- Image Settings: Attachment folder and image production path preferences
persist across sessions
Getting Started
- Install the extension
- Ensure you have GitHub Copilot subscription and extension installed
- Open a workspace folder in VS Code
- Use the Command Palette (
Cmd+Shift+P / Ctrl+Shift+P) and run
Ghostwriter: Open Ghostwriter
- Choose between Interview, Writer, or Voice Generator mode
Usage
Conducting an AI Interview
- Open the Ghostwriter panel
- Click on "Start Interview"
- (Optional) Select an attachment folder for images captured during interview
- (Optional) Select or create an interviewer agent to shape the interview
- Select your preferred GitHub Copilot model
- The AI will first ask you for the interview topic
- Once you provide the topic, a transcript file is immediately created in
.ghostwriter/transcripts/ along with a session file
- Answer the AI's questions in the chat interface
- Attach images during the interview using the image button (optional)
- Each question, answer, and image reference is saved to the transcript file
in real-time
- The AI will automatically detect completion and save the final transcript
- If the editor closes unexpectedly, your progress is saved in the transcript
file
Resuming an Interrupted Interview
- Open the Ghostwriter panel
- Click on "Start Interview"
- Click the "Resume Interview" button in the header
- Select the transcript file you want to continue from the dialog
- Click "Resume"
- The interview will continue from where it left off, with all previous Q&As
loaded
Generating Content from Transcripts
- Open the Ghostwriter panel
- Click on "Write Article"
- (Optional) Select or create a writer agent to guide generation
- Select a transcript from your workspace or browse for a custom file
- (Optional) Select a voice file to maintain consistent writing style
- Configure writing options:
- Choose writing style (Formal/Casual/Conversational)
- Select content language (English, Spanish, French, German, etc.)
- Enable/disable headings and SEO optimization
- Add target keywords for SEO
- Configure frontmatter template
- Select your preferred GitHub Copilot model
- Click "Start Writing"
- Watch the article generate in real-time
- (Optional) Attach images to the article using the image button
- Choose to either:
- Click "Iterate Draft" to enter Draft Iteration Mode for refinement
- Click "Save Article" to save directly to your workspace
- If the article contains images, configure the production image path (or
leave empty for relative paths)
Using Draft Iteration Mode
- After generating an article in Writer mode, click "Iterate Draft"
- The draft is automatically saved to
.ghostwriter/drafts/ with the interview
topic as the title (easy to identify related drafts)
- Use the refinement input to conversationally improve your content:
- Example: "Make the intro more engaging"
- Example: "Add more technical depth to section 3"
- Example: "This sounds too formal, make it more conversational"
- Each refinement creates a new revision with full history
- Navigate between revisions using prev/next buttons
- View all revisions in the history sidebar (toggle with History button)
- Export the final version using the "Export" button
- If images are present, configure the production image path (optional)
- Access saved drafts anytime from the "My Drafts" card on the home page
Managing Drafts
- From the home page, click "My Drafts"
- View all saved drafts with preview and metadata
- Click on any draft to continue working on it
- Delete drafts you no longer need
Setting Up Frontmatter Templates
- In the Writer view, expand "Writing Options"
- Click "Add Frontmatter Template"
- Enter your YAML frontmatter template:
---
title: ""
date: ""
tags: []
draft: false
---
- Click "Save Template"
- The template will be applied to all future articles
Generating a Voice Profile
- Open the Ghostwriter panel
- Click on "Generate Voice"
- Select your preferred GitHub Copilot model
- Click "Generate Voice Profile"
- Select a folder containing your writing samples (blog posts, articles, etc.)
- Wait for the AI to analyze your writing style
- Voice profile is automatically saved to
.ghostwriter/voices/voice-YYYY-MM-DD.md
- Review and customize the generated profile if needed
- Use the voice file in Writer mode to maintain your unique style
File Structure
The extension creates a .ghostwriter folder in your workspace root:
.ghostwriter/
├── transcripts/ # Interview transcripts (.md files)
│ # Also stores .json session files with interview metadata
├── voices/ # Voice files for writing style (.md files)
├── interviewer/ # Interviewer agents (.md files)
├── writer/ # Writer agents (.md files)
├── drafts/ # Draft iterations (.json) with revision history
└── attachments/ # Images and files captured during interviews and writing
Note: The attachment folder location can be customized via the
vscode-ghostwriter.attachmentFolder workspace setting or per-interview via UI
selection. The transcript session files (.json) contain interview metadata
including the interview topic, which is automatically used as the draft title.
Commands
Ghostwriter: Open Ghostwriter - Open the main editor panel
Requirements
- VS Code 1.108.1 or higher
- GitHub Copilot subscription
- GitHub Copilot extension installed
- An open workspace folder
Extension Settings
This extension provides the following configuration options:
Workspace Settings
vscode-ghostwriter.attachmentFolder - Custom folder path for saving image
attachments, relative to the workspace root. When empty, defaults to
.ghostwriter/attachments.
vscode-ghostwriter.defaultSaveLocation - Default folder path template for
saving articles, relative to the workspace root. Example:
articles/{{year}}/{{month}}.
vscode-ghostwriter.filenameTemplate - Filename template for saving
articles. Supported variables: {{fileName}}, {{slug}}, {{title}},
{{year}}, {{month}}, {{day}}, {{date|yyyy-MM-dd}}.
State Persistence (Workspace Local State)
- Selected GitHub Copilot model ID - Persists across sessions
- Selected content language - Persists across sessions
- Frontmatter template - Persists your reusable article templates
- Selected interviewer and writer agents - Persists agent preferences
- Attachment Folder Override - Per-interview override for custom image
storage locations
- Image Production Path - Production image path prefix for deployment
environments (e.g.,
/uploads/2026/02)
Development
Building
npm run compile - Compile TypeScript
npm run watch - Watch mode for TypeScript
npm run build:webview - Build webview with Vite
npm run dev - Start Vite dev server with HMR
npm run clean - Remove build artifacts
Contributing
This extension is part of the Ghostwriter ecosystem:
License
This project is licensed under the MIT License - see the LICENSE file
for details.
Enjoy writing with Ghostwriter and GitHub Copilot!
| |