The Problem with the Existing Apex Workflow
If you've done any meaningful Apex development, you know the drill:
- Open Salesforce Developer Console (slow, clunky, no PMD)
- Switch to VS Code + Salesforce Extension Pack (heavy, requires local setup)
- Run PMD separately with a Java runtime (extra install, extra config)
- Run tests via SFDX CLI (terminal required)
- Repeat across orgs
Every step is friction. And if you're working across multiple orgs or on a machine that isn't fully set up, that friction compounds fast.
I wanted something simpler: open Chrome, open my Salesforce org, start coding.
What I Built
ApexForge is a Chrome extension that brings a full Apex development environment directly into your browser. No IDE. No CLI. No Java.
Here's what it does:
📂 Apex File Explorer
Browse every Apex Class and Trigger in your connected org. Search, sort, open files in the editor, or jump to the Salesforce record page — all without leaving the extension.
✏️ Code Editor (VS Code-like)
A fully featured editor inside the popup:
- Apex syntax highlighting (keywords, SOQL, methods)
- Find (
Ctrl+F) and Find & Replace (Ctrl+H) - Go to Line (
Ctrl+G) - Minimap, Split View, Word Wrap
- Format Document
- Save & Deploy directly to your org
- Refresh from org at any time
🔍 PMD Analysis — In the Browser, No Java Required
This was the hardest part to build. PMD normally requires a Java runtime and a JAR file. I ported 12 PMD rules across 6 categories to run entirely in JavaScript inside the extension:
| Category | Rules |
|---|---|
| Performance | AvoidSoqlInLoops, AvoidDmlInLoops |
| Error Prone | AvoidHardcodingId, EmptyCatchBlock, NullAssignment |
| Best Practices | ApexUnitTestClassShouldHaveAsserts, AvoidGlobalModifier |
| Security | ApexSharingViolations, ApexCRUDViolation |
| Code Size | ExcessiveClassLength, TooManyFields |
| Design | AvoidDeeplyNestedIfStmts |
Run analysis on a single file or scan your entire org in one pass. Click any violation to jump to that exact line in the editor.
▶ Apex Test Runner
Execute unit tests without opening a terminal:
- Async execution via
runTestsAsynchronouswith a live progress bar - Sync execution via
runTestsSynchronousfor quick feedback - Auto-detects test classes by naming convention
- Pass / Fail / Skip badges with stack traces
- Code coverage visualisation — per test class and aggregate
💡 Apex Advisor
Real-time analysis as you type. Detects:
- Bulkification issues
- Missing sharing declarations
- SOQL/SOSL/DML patterns
- Method signature problems
Comes with auto-fix suggestions and code snippet templates.
Security & Privacy
I care about this a lot, especially since the extension touches Salesforce session data:
- Session IDs stored in
chrome.storage.local— encrypted by the OS keychain - All API calls use HTTPS — no plaintext
- No data sent to any third-party server. Ever.
- No analytics. No telemetry. No backend services.
- Network access scoped only to
*.salesforce.comand*.force.com - The editor runs in a sandboxed iframe
- Your Apex code never leaves your browser except to your own Salesforce org
How It Works
- Install ApexForge and pin it to your Chrome toolbar
- Open any Salesforce app from the App Launcher
- Click the ApexForge icon — it auto-detects your org from the active tab
- Browse, edit, analyse, and test your Apex
The only requirement is a valid Salesforce Session ID (obtainable from Developer Console, DevTools, or SFDX CLI) and API access enabled on your org.
Why I'm Sharing This
I built this as a personal tool and kept making it better. At some point it felt like something the Salesforce developer community could genuinely use — especially for quick edits, code reviews on the go, or orgs where you can't install a full local dev environment.
It's free and open source.
🔗 Install ApexForge on the Chrome Web Store
If you work with Salesforce Apex regularly, give it a try. I'd love feedback — what rules are missing from the PMD analyser, what editor features you'd want, anything.
Drop a comment or reach out directly. Happy to discuss the technical implementation too if anyone's curious how the browser-native PMD port works.
Top comments (0)