Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AuthmeNew to Visual Studio Code? Get it now.
Authme

Authme

Preview

avidev9

|
62 installs
| (1) | Free
authme extension for vscode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AuthMe VS Code Extension

VS Code extension for handling AuthMe authentication and project setup for Salesforce development.

Works With

Salesforce Dev Pack

This extension works seamlessly with the Salesforce Dev Pack extension, which provides additional development tools and utilities for Salesforce. The Dev Pack is automatically recommended when you install AuthMe.

Features

Core 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

Developer Tooling (New in 0.2.0)

  • 🎨 EditorConfig - Automatic .editorconfig generation with consistent formatting rules for Apex, LWC, Aura, Visualforce, and metadata files
  • ⚡ VS Code Tasks - 25+ one-click Salesforce operations (deploy, test, analyze, format, org management)
  • ✂️ Code Snippets - 15+ production-ready templates for Apex test classes, batch classes, trigger handlers, LWC components, and more
  • 🔍 Enhanced Settings - Optimized search (excludes .authme, .sfdx, etc.), file associations, and Salesforce extension configuration

Installation

Install the extension from the VS Code marketplace by searching for "AuthMe".

  1. Request the latest .vsix file from your administrator
  2. Install the extension using one of these methods:
    • Through VS Code UI:
      1. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
      2. Type "Install from VSIX"
      3. Select the downloaded .vsix file
    • Through command line:
      code --install-extension authme-x.x.x.vsix
      
      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

GitHub Copilot Customization Framework

The extension provides a comprehensive GitHub Copilot customization framework following GitHub's official guidelines for custom instructions and agents. This framework is designed to be extensible and Salesforce-specific.

Framework Architecture

.github/
├── copilot-instructions.md          # Repository-wide instructions
├── instructions/                     # Path-specific instructions
│   ├── apex-classes.instructions.md
│   ├── test-classes.instructions.md
│   ├── triggers.instructions.md
│   ├── lwc.instructions.md
│   ├── aura.instructions.md
│   ├── objects.instructions.md
│   └── flows.instructions.md
└── agents/                          # Custom agents (GitHub Copilot Agents)
    ├── code-review.agent.md
    ├── test-writer.agent.md
    ├── doc-generator.agent.md
    ├── security-auditor.agent.md
    ├── planner.agent.md
    ├── bug-fix.agent.md
    ├── cleanup.agent.md
    ├── apex-developer.agent.md
    └── lwc-developer.agent.md

Instructions

Repository-Wide Instructions (.github/copilot-instructions.md)

  • High-level project overview with org-specific metadata
  • Build and validation commands
  • Core Salesforce development principles
  • Dynamic content including actual object counts and cache status

Path-Specific Instructions (.github/instructions/*.instructions.md)

Path-specific instructions provide contextual guidance when working in specific areas:

File Applies To Purpose
apex-classes.instructions.md force-app/**/classes/** Service classes, security, bulkification
test-classes.instructions.md force-app/**/classes/**/*Test*.cls Testing guidelines, schema validation
triggers.instructions.md force-app/**/triggers/** Trigger framework patterns, handler best practices
lwc.instructions.md force-app/**/lwc/** Component architecture, LDS, accessibility
aura.instructions.md force-app/**/aura/** Aura component patterns
objects.instructions.md force-app/**/objects/** Object/field schema guidelines
flows.instructions.md force-app/**/flows/** Flow development best practices

Custom Agents

The extension generates GitHub Copilot Custom Agents (.agent.md files) that provide specialized AI assistance for different tasks. Agents can use specific tools and hand off work to other agents.

Available Agents

Agent Category Tools Description
code-review Quality shell, read Comprehensive code reviews with SF Code Analyzer integration
test-writer Testing read, edit, shell Apex test class generation with coverage analysis
doc-generator Documentation read, edit ApexDoc and inline documentation generation
security-auditor Security read, search CRUD/FLS, SOQL injection, and sharing rule audits
planner Planning read, search Task breakdown and implementation planning
bug-fix Quality read, edit, search, shell Systematic bug diagnosis and fixes
cleanup Quality read, edit, search Code cleanup, unused code removal, standardization
apex-developer Development read, edit, search, shell Full Apex development workflows
lwc-developer Development read, edit, search, shell LWC component development

Agent Tools Reference

Tool Purpose
read Read files from the workspace
edit Create or modify files
search Search across the codebase
shell Run terminal commands (SF CLI, etc.)
web Fetch external documentation
todo Manage task lists

Using Agents

In GitHub Copilot Chat, you can invoke agents by name:

@code-review Review the AccountService class for security issues
@test-writer Create comprehensive tests for ContactTriggerHandler
@apex-developer Create a batch class to update all Account records

Agents automatically hand off to related agents when appropriate:

  • code-review → security-auditor, test-writer
  • test-writer → code-review
  • apex-developer → test-writer, code-review

Benefits

  • Context-Specific: Right guidance appears for the file type you're working on
  • Dynamic Content: Instructions include actual project metadata and org information
  • Version Tracking: Smart updates that preserve user customizations
  • Configurable: Enable/disable different instruction types via settings
  • Extensible: Framework designed for easy addition of new agents and instructions

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.

Developer Tooling

The extension automatically sets up a complete development environment with best-practice configurations:

EditorConfig

Automatically generates .editorconfig to ensure consistent code formatting across your team:

  • Apex files: 4-space indentation
  • LWC (JS/HTML/CSS): 2-space indentation
  • Aura components: 2-space indentation
  • Metadata files: 2-space indentation
  • UTF-8 encoding, LF line endings, trim trailing whitespace

VS Code Tasks (25+ Operations)

Access via Cmd+Shift+P > Run Task or keyboard shortcuts:

Deployment

  • Deploy Source to Org
  • Deploy This Source File
  • Validate Deployment
  • Quick Deploy

Testing

  • Run All Apex Tests (with coverage)
  • Run Apex Test Class
  • Run This Apex Test Class
  • Get Apex Test Coverage

Code Quality

  • Run Code Analyzer (all files or current file)
  • Format with Prettier (all files or current file)

LWC

  • Generate Component
  • Run Jest Tests / Coverage

Org Management

  • Open Default Org
  • List All Orgs
  • Display Org Info

Code Snippets

Type these prefixes for instant code templates:

Apex

  • testclass → Full test class with @TestSetup and success/failure tests
  • batchclass → Database.Batchable implementation
  • triggerhandler → Complete trigger handler with all contexts
  • serviceclass → Service class with sharing
  • testfactory → Test data factory method
  • soqlsafe → SOQL with security and error handling
  • dmlpartial → DML with partial success handling

LWC

  • lwccomponent → Component JavaScript boilerplate
  • lwcwire → Wire adapter with error handling
  • lwcevent → Event handler method
  • lwccustomevent → Custom event dispatch
  • lwctest → Jest test template
  • lwchtml → HTML template with lightning-card

Enhanced Settings

Automatically configured:

  • Search Optimization: Excludes .authme, .sfdx, .sf, .localdevserver, apex_logs, test-results from search
  • File Associations: Auto-detects Apex (.cls, .trigger), SOQL, SOSL, Visualforce syntax
  • Salesforce Extensions: Disables push-on-save, enables SObject refresh on startup

Configuration

The extension provides the following configuration options:

General Settings

  • authme.workspace.path: Path to your Salesforce DX workspace folder

Org Context Settings

  • 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)

Copilot Instructions Settings

  • authme.copilot.autoSetup: Automatically setup Copilot instructions when creating new projects (Default: true)
  • authme.copilot.enableRepositoryWide: Enable repository-wide instructions (.github/copilot-instructions.md) (Default: true)
  • authme.copilot.enablePathSpecific: Enable path-specific instructions for Apex, LWC, Triggers, etc. (Default: true)
  • authme.copilot.enableAgentInstructions: Enable AI agent instructions (AGENTS.md) for backward compatibility (Default: true)
  • authme.copilot.enableCustomAgents: Enable custom agents (.github/agents/*.agent.md) for specialized AI assistance (Default: true)

Ollama Integration (Optional)

  • authme.ollama.enabled: Enable AI-enhanced documentation using Ollama (Default: false)
  • authme.ollama.endpoint: Ollama API endpoint URL (Default: http://localhost:11434)
  • authme.ollama.model: Ollama model to use for documentation generation (Default: codellama)

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

  1. First Time: Use "Download Apex Logs" to configure all settings
  2. Quick Downloads: Use "Download Apex Logs (Last Settings)" for one-click access
  3. 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.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft