AuthMe VS Code Extension
VS Code extension for handling AuthMe authentication and project setup for Salesforce development.
Features
- Handles authentication URI redirects from AuthMe
- Automated project setup and configuration
- Salesforce DX integration
- GitHub Copilot instructions setup for Salesforce projects
- Org context management
- Automatic Apex Documentation generation
- Advanced Apex Log Management - Bulk download, organize, and manage debug logs
- Settings Persistence - Save and reuse download preferences for quick access
Installation
Install the extension from the VS Code marketplace by searching for "AuthMe".
- Request the latest
.vsix
file from your administrator
- Install the extension using one of these methods:
where
x.x.x
is the version number
Org Context & Copilot Integration
The extension generates and maintains an org context that enhances GitHub Copilot's understanding of your Salesforce org. This context includes:
- Org metadata structure
- Custom objects and fields
This context is automatically provided to GitHub Copilot, enabling it to:
- Generate more accurate and org-specific code suggestions
- Provide contextual help based on your org's specific metadata
- Better understand custom objects and fields in your code
The org context is automatically refreshed based on the authme.org.cacheExpirationDays
setting, or can be manually refreshed using the Authme: Refresh Org Context
command.
Configuration
The extension provides the following configuration options:
authme.workspace.path
: Path to your Salesforce DX workspace folder
authme.org.autoContext
: Automatically build org context when setting up new projects (Default: true)
authme.org.cacheExpirationDays
: Number of days after which the org metadata cache expires (1-30 days, Default: 7)
authme.copilot.autoSetup
: Automatically setup Copilot instructions when creating new projects (Default: true)
Commands
Access these commands through the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
Authme: Setup packages
- Initial setup of required packages
Authme: upgrade sfdx
- Upgrade to latest SFDX version
Authme: Refresh Org Context
- Force refresh the current org context
Authme: Setup/Update Copilot Instructions
- Configure or update GitHub Copilot instructions
Authme: Generate Apex Documentation
- Generate documentation for the active Apex class
Authme: Upsert Fields metadata to Salesforce
- Upsert field descriptions and metadata from local schema files to Salesforce
Authme: Download Apex Logs
- Download Apex logs with configurable options
Authme: Download Apex Logs (Last Settings)
- Quick download using previously saved settings
URI Handler
The extension handles AuthMe authentication URIs in the following format:
vscode://authme.authme?projectName=<project>&username=<username>&instance_url=<url>&sid=<sessionId>&orgId=<orgId>&autoformat=true
Parameters:
projectName
: Salesforce project name (used for folder creation)
username
: Salesforce username
instance_url
: Salesforce instance URL
sid
: Access token or valid session ID
orgId
: Salesforce organization ID
autoformat
: Enable automatic formatting (optional)
Apex Documentation
The extension provides automated Apex documentation generation for your Apex classes. Use the Authme: Generate Apex Documentation
command on any .cls
file to:
- Add class-level documentation with meaningful descriptions
- Generate method documentation with parameter and return type descriptions
- Preserve existing documentation
- Automatically detect and document:
- Batch classes
- Interfaces
- Virtual classes
- Method parameters and return types
Documentation is generated following Salesforce's ApexDoc format and includes:
@description
- Automatically generated based on class/method names
@param
- Parameter descriptions with types
@return
- Return value descriptions
@group
- Optional grouping (when specified)
@see
- Related classes (for batch classes)
Apex Log Management
The extension provides comprehensive Apex log management capabilities for debugging and analysis:
Features
- Bulk Downloads: Download all or filtered Apex logs with parallel processing
- Smart Organization: Automatically organized logs with meaningful filenames
- Progress Tracking: Real-time download progress with ETA calculations
- Settings Persistence: Save and reuse download preferences
- Large File Support: Efficient handling of multi-MB debug logs
- Quick Access: One-click downloads with saved settings
Download Options
- Output Directory: Customize where logs are saved (relative to project root)
- Log Limit: Download all logs or specify a maximum number
- Parallel Downloads: Configure concurrent downloads (1-10) for faster processing
- Auto-Delete: Optionally remove logs from Salesforce after download
File Organization
project-root/
├── apex_logs/
│ └── 20250121_153045/ # Timestamped folders
│ ├── download_summary.txt # Download statistics
│ ├── apexlog_ids.csv # Log IDs (if delete option used)
│ └── 2025-01-21T10-30-45_John_Doe_Execution_03s123.log
Workflow
- First Time: Use "Download Apex Logs" to configure all settings
- Quick Downloads: Use "Download Apex Logs (Last Settings)" for one-click access
- Review Settings: Preview last used settings before confirming download
The log management system uses JSForce for reliable log discovery and the Salesforce CLI for efficient file downloads, ensuring compatibility with large orgs and extensive logging.
License
See LICENSE file for details.