IDE Overview
Learn about WP2Astro's browser-based IDE powered by GitHub Codespaces.
WP2Astro provides a complete development environment that runs entirely in your browser. No installation, no setup, no configuration - just open and start coding.
What is the WP2Astro IDE?
The WP2Astro IDE is a web-based code editor and development environment built on top of GitHub Codespaces. It gives you:
- Monaco Editor: The same powerful editor that powers VS Code
- Live Preview: See your changes instantly
- File Management: Full access to your project files
- Terminal Access: Run any npm or git commands
- Auto-Save: Never lose your work
[screenshot of IDE interface]
How It Works
Cloud Development Environment
Instead of running on your computer, your development environment runs in the cloud:
Your Browser ←→ WP2Astro IDE ←→ GitHub Codespace
↓
Your Astro Site Files
Astro Dev Server
Node.js & npm
Benefits:
- No local installation required
- Works on any device with a browser
- Consistent environment for all users
- Powerful cloud servers handle builds
- Access from anywhere
GitHub Codespaces
Under the hood, WP2Astro uses GitHub Codespaces:
- Virtual Linux machine (Ubuntu)
- 2-4 CPU cores
- 4-8 GB RAM
- Node.js 20 pre-installed
- Astro development server ready to go
Two Editing Modes
WP2Astro offers two ways to edit your site, depending on your needs:
Content Editor (Simple Mode)
Perfect for content creators and non-developers:
- Focus: Writing and editing content
- Interface: Simplified, WYSIWYG-style
- Files: Blog posts and pages only
- Complexity: Low - no code knowledge needed
[screenshot of content editor]
Best for:
- Writers and bloggers
- Content updates
- Quick edits
- Non-technical users
Learn more about Content Editor →
Dev Mode (Advanced Mode)
Full-featured IDE for developers:
- Focus: Complete site development
- Interface: Full code editor with syntax highlighting
- Files: Access to all project files
- Complexity: High - for developers and designers
[screenshot of dev mode]
Best for:
- Developers
- Theme customization
- Component creation
- Advanced configurations
Accessing the IDE
From Your Dashboard
- Go to your WP2Astro dashboard
- Find your project card
- Make sure codespace status is "Running"
- If "Off", click "Start Codespace" and wait 30-60 seconds
- If no codespace, click "Create Codespace"
- Choose your editing mode:
- Click "Content" for Content Editor
- Click "Dev Mode" for full IDE
Codespace Status Indicators
- 🔴 Off: Codespace is stopped (not consuming resources)
- 🟡 Starting: Booting up (wait 30-60 seconds)
- 🟢 Running: Ready to use!
- 🟠 Shutting Down: Stopping (wait before restarting)
IDE Layout
Main Components
The IDE interface consists of several key areas:
+------------------------------------------------+
| Header (Project name, save status, actions) |
+----------+--------------------+----------------+
| | | |
| File | Code Editor | Live |
| Tree | (Monaco) | Preview |
| | | |
| | Multiple tabs | |
| | Syntax highlight | Auto |
| | Auto-complete | Refresh |
| | | |
+----------+--------------------+----------------+
| Terminal (Dev Mode only) |
+------------------------------------------------+
[screenshot of file tree]
1. Header Bar
Located at the top:
- Project Name: Which site you're editing
- Save Status: Shows "Saved" or "Saving..."
- Action Buttons:
- View on GitHub
- Component Builder
- Media Manager
- Git Changes
- Settings
2. File Tree (Left Panel)
Navigate your project structure:
your-project/
src/
pages/ # Your site pages
content/ # Blog posts (MDX)
layouts/ # Page templates
components/ # Reusable components
styles/ # CSS files
public/ # Static assets
astro.config.mjs # Configuration
Actions:
- Click to open files
- Right-click for context menu
- Create new files and folders
- Rename or delete items
3. Code Editor (Center Panel)
Monaco editor with full features:
- Syntax Highlighting: For Astro, TypeScript, CSS, Markdown
- Auto-Completion: Smart suggestions as you type
- Error Detection: Red squiggles for errors
- Multi-Cursor: Edit multiple places at once
- Find & Replace: Search across files
- Tab Management: Work on multiple files
4. Live Preview (Right Panel)
See your changes in real-time:
- Auto-Refresh: Updates as you type
- Responsive View: Test mobile/desktop
- Console: View JavaScript logs
- Reload Button: Force refresh
- Open in New Tab: Full preview
5. Terminal (Bottom Panel - Dev Mode)
Full command-line access:
# Run npm commands
npm install package-name
npm run build
# Git operations
git status
git add .
git commit -m "Update homepage"
# Check versions
node --version
npm --version
astro --versionKey Features
Auto-Save
Every change is automatically saved:
- You type in the editor
- After 500ms of inactivity, WP2Astro saves
- File is written to the codespace
- Green "Saved" indicator appears
- Astro dev server detects change
- Preview updates automatically
No manual save button needed!
Live Preview
See changes instantly:
- Edit any
.astro,.md, or.cssfile - Preview updates within 1-2 seconds
- Hot Module Replacement keeps scroll position
- Works for all pages and components
Syntax Highlighting
Code is color-coded for readability:
---
// Frontmatter (gray)
import Layout from '../layouts/Layout.astro';
const title = "Welcome"; // (blue)
---
<!-- HTML with syntax highlighting -->
<Layout title={title}>
<h1>Hello World</h1> <!-- (green) -->
<p class="intro">Welcome to my site</p>
</Layout>
<style>
.intro { color: blue; } /* (purple) */
</style>Multi-File Tabs
Work on multiple files simultaneously:
- Open files appear as tabs at the top
- Switch between tabs instantly
- Unsaved changes marked with dot (•)
- Close tabs with ✕
- Reopen with file tree
Git Integration (Dev Mode)
Version control built-in:
- View changed files
- Stage changes
- Commit with messages
- Push to GitHub
- View commit history
- Revert changes
Keyboard Shortcuts
Speed up your workflow:
Editor Shortcuts
Cmd/Ctrl + S: Save file (though auto-save handles this)Cmd/Ctrl + F: Find in fileCmd/Ctrl + H: Find and replaceCmd/Ctrl + /: Toggle commentCmd/Ctrl + D: Select next occurrenceAlt + Up/Down: Move line up/downCmd/Ctrl + Z: UndoCmd/Ctrl + Shift + Z: Redo
Navigation Shortcuts
Cmd/Ctrl + P: Quick file openCmd/Ctrl + B: Toggle sidebarCmd/Ctrl + J: Toggle terminalCmd/Ctrl + \: Split editor
Resource Management
Codespace Auto-Stop
GitHub automatically stops codespaces after:
- 4 hours of inactivity
- You can manually stop them sooner
- All files are preserved when stopped
- Restart anytime in seconds
Managing Quota
Monitor your GitHub Codespace usage:
- Free: 120 core-hours/month
- Pro: 180 core-hours/month
Tips to save resources:
- Stop codespaces when not in use
- Delete codespaces you no longer need
- Work locally by cloning the repo (optional)
Performance Tips
Fast Editing Experience
The IDE is optimized for speed:
- Editor loads in < 2 seconds
- File switching is instant
- Preview updates in 1-2 seconds
- Terminal commands run immediately
Build Performance
Astro's development server is fast:
- Initial build: 1-3 seconds
- Hot reload: 50-200ms
- Full rebuild: 2-5 seconds
Slow Preview?
If preview seems sluggish:
- Check your internet connection
- Restart the dev server (terminal:
npm run dev) - Refresh the preview panel
- Check for build errors in terminal
Browser Compatibility
The IDE works best in modern browsers:
- ✅ Chrome 90+ (Recommended)
- ✅ Firefox 88+
- ✅ Safari 14+
- ✅ Edge 90+
Minimum Requirements:
- Modern browser with WebSocket support
- Stable internet connection
- JavaScript enabled
Mobile and Tablet Support
The IDE works on mobile devices, but with limitations:
- Tablets (iPad, Android): Good experience with external keyboard
- Phones: Limited - better for viewing than editing
Recommendation: Use desktop/laptop for best experience
Working Offline
The IDE requires an internet connection:
- Editor runs in the cloud
- Files stored in GitHub
- Preview served from codespace
- No offline mode available
Alternative: Clone your repository and work locally
Security and Privacy
Data Security
- All connections encrypted (HTTPS/WSS)
- Files stored in your GitHub account
- Only you have access to your codespace
- Tokens and credentials encrypted
What WP2Astro Can Access
- Read/write files in your codespace
- Create commits in your repository
- Start/stop your codespaces
- View deployment status
What WP2Astro CANNOT Access
- Other GitHub repositories
- Your GitHub password
- Files outside your project
- Other codespaces
Troubleshooting
IDE Won't Load
- Check codespace status is "Running"
- Wait 60 seconds after starting
- Try refreshing the browser
- Check browser console for errors
Preview Not Updating
- Check terminal for build errors
- Refresh preview panel
- Restart dev server:
npm run dev - Check file actually saved (green indicator)
File Tree Not Showing Files
- Refresh the page
- Check WebSocket connection (green indicator)
- Try closing and reopening the IDE
- Restart the codespace
Terminal Commands Not Working
- Verify you're in Dev Mode (not Content Editor)
- Check the command is correct
- Make sure codespace is fully started
- Try opening new terminal tab
Next Steps
Now that you understand the IDE basics:
- For content creators: Learn about Content Editor
- For developers: Explore Dev Mode
- Learn more: Read about GitHub Codespaces