Skip to content

jcranokc/Salesforce-Inspector-Ultra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,430 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salesforce Inspector Ultra

Apple Safari extension for macOS, iOS, and iPadOS that adds a metadata layout on top of the standard Salesforce UI to make admin, dev, and integration work faster.

This is a personal fork that combines three lines of work:

  • Salesforce Inspector by Søren Krabbe and Jesper Kristensen — the original extension and design.
  • Salesforce Inspector Reloaded by Thomas Prouvot — the continuing maintained line, Manifest V3 migration, REST Explorer, Dependencies Explorer, Field Creator, Event Monitor, Metadata Retrieve, API Statistics, and the broader feature set this fork starts from.
  • Salesforce Inspector Advanced by Olivier Dufour — the SOQL editor (syntax highlighting + inplace suggestions), the flamechart Apex log viewer + Apex runner, and the flow analysis tooling.

On top of those, I've added a bring-your-own-key AI layer:

  • AI SOQL — natural-language → SOQL in Data Export, with a two-pass flow that picks the most likely SObject from describeGlobal and writes the query against that object's real fields.
  • AI Debug Log chat — ask questions about an open Apex debug log; the assistant sees the log body and answers inline.

Both work with Claude, OpenAI, Gemini, or DeepSeek — you supply your own API key in Options. Nothing is proxied through a third-party server.


Contents

Features

Pages & Tools

  • REST Explorer — call Salesforce REST APIs directly with templates, history, and auto-completion.
  • Dependencies Explorer — what depends on this metadata, and what does this metadata depend on.
  • Field Creator — create fields for standard objects, custom objects, platform events, and custom metadata types, with bulk import.
  • Flow Scanner — analyze Salesforce Flows for best-practice violations and common bugs (DML in loops, DML before callouts, where-used). Originates from the Advanced fork.
  • Debug Logs Viewer — view, filter, and grep Salesforce debug logs. Flamechart Apex log rendering from the Advanced fork; AI Chat over the open log is mine.
  • Event Monitor — subscribe to and display Platform Events in real time, including Change Events and custom channels.
  • Metadata Retrieve — retrieve and deploy metadata with package.xml generation.
  • API Statistics — track REST and SOAP calls with performance metrics and error tracking.
  • Options — favicon color picker per org, export/import configuration, custom shortcuts, default popup tab, hide-buttons, and the AI provider/key settings.

Enhanced Surfaces

  • Show All Data:

    • Field usage analysis — % of records that have a value for each field.
    • Save field selection across sessions, keyboard shortcut to save edits, back-to-record navigation.
  • Popup:

    • Org tab with org and instance information.
    • Shortcuts tab with searchable setup navigation.
    • Reset Password, Unfreeze User, Copy Id in the User tab.
  • Data Export (docs):

    • SOQL editor with syntax highlighting and inplace suggestions (Advanced).
    • AI SOQL generation from natural-language prompts using your configured provider (mine).
    • Multiple query tabs with drag & drop reordering and editable names.
    • Auto-populate from Salesforce List View context.
    • Query performance metrics with batch statistics.
    • Filter results by column.
  • Data Import (docs):

    • SOAP headers for assignment rules, duplicate rules, and owner change.
    • Auto-detect SObject from Id.
    • Grey out columns that weren't imported.
    • Guess file format on paste (CSV, JSON, Excel).
    • Undelete support.
  • Org Limits:

    • Real-time refresh, URL-persisted filters, restyled UI, correct display when limits are exceeded.

Other

  • Per-org favicon and banner customization.
  • Configurable API Version.
  • OAuth2 connected-app flow for orgs with API Access Control enabled.
  • Manifest V3 compatible (used as the basis for Safari Web Extension conversion).

Security, Privacy & AI Usage

This extension talks directly between Safari and Salesforce. There is no intermediary server.

  • Some preferences and metadata-cache entries are saved in browser storage to avoid redundant queries. None of it is Salesforce SObject data (Account, Contact, etc.).
  • All Salesforce API calls re-use the access token already in the browser's cookie jar (on macOS) or one minted via the connected-app OAuth flow (required on iOS/iPadOS and for orgs with API Access Control enabled). Cookie read permission for Salesforce domains is required for this.
  • The extension does not collect analytics, telemetry, or usage data of any kind.

AI Feature Privacy

The AI features (AI SOQL and AI Debug Log Chat) are opt-in and inert by default. They only activate when you:

  1. Explicitly configure an API key for one of the supported providers (Anthropic Claude, OpenAI, Google Gemini, or DeepSeek) in the extension Options.
  2. Manually trigger a request (e.g., clicking "Generate SOQL" or sending a chat message).

What is sent to the AI provider:

  • Your natural-language question or prompt.
  • Contextual Salesforce metadata needed to answer the request — this may include SObject and field names (schema information) when generating SOQL, or the content of an open debug log when using AI Chat.
  • No other Salesforce record data (Account, Contact, Opportunity, etc.) is ever sent.

What is NOT sent:

  • Your Salesforce session token, credentials, or cookies.
  • Browsing history, extension configuration, or usage analytics.
  • Data to any server other than the provider's official API endpoint.

Your API key is stored locally in browser storage and is transmitted only to the provider you selected. There is no proxy, relay, or third-party service involved.

Note: By using the AI features, you acknowledge that the prompt content described above is sent to a third-party AI provider subject to that provider's terms of service and data handling policies. Review your provider's privacy policy before use, especially if your Salesforce org contains regulated or sensitive data.

For the full privacy policy, see PRIVACY.md.

Installation

This fork is distributed as a Safari Web Extension built with Xcode. It is not published to the App Store — you build and install it locally from source.

Prerequisites

Requirement Minimum Version Notes
macOS 14.0 (Sonoma) or later Required for building. Ventura may work but is untested.
Xcode 15.0 or later Install from the Mac App Store or Apple Developer Downloads.
Xcode Command Line Tools Run xcode-select --install if not already present.
Safari 17.0 or later Ships with macOS Sonoma+.
Apple Developer account Free or paid A free account works for personal/local use. A paid ($99/yr) account is needed to install on physical iOS/iPadOS devices.
Node.js + npm Node 18+ Only needed if you plan to run linting or tests.

macOS — Build & Install from Source

  1. Clone the repository:

    git clone https://github.com/jcranokc/Salesforce-Inspector-Ultra.git
    cd Salesforce-Inspector-Ultra
  2. Convert the web extension into an Xcode project:

    xcrun safari-web-extension-converter ./addon \
      --project-location ./SafariExtension \
      --app-name "SF Inspector Ultra" \
      --bundle-identifier com.yourname.sfinspector \
      --macos-only \
      --no-open

    Replace com.yourname.sfinspector with your own reverse-DNS identifier.

  3. Open the generated Xcode project:

    open ./SafariExtension/*.xcodeproj
  4. Set your signing team in Xcode:

    • Select the project in the navigator.
    • For each target (the host app and the extension), go to the Signing & Capabilities tab.
    • Select your Team (your Apple ID / Developer account).
    • Ensure Automatically manage signing is checked.
    • If you see provisioning profile errors, Xcode will typically resolve them automatically once a team is selected.
  5. Build and run (⌘R or Product → Run):

    • Xcode will build the host app and the embedded extension.
    • The host app will launch — you can close it. Its only purpose is to register the extension with Safari.
  6. Enable the extension in Safari (see Enable the Extension in Safari below).

iOS / iPadOS — Build & Install from Source

Note: On iOS/iPadOS, the cookie-reuse authentication method may not work due to Safari's stricter cookie isolation. You will likely need to use the Connected App OAuth flow instead.

  1. Clone and convert (same as macOS, but omit --macos-only):

    git clone https://github.com/jcranokc/Salesforce-Inspector-Ultra.git
    cd Salesforce-Inspector-Ultra
    
    xcrun safari-web-extension-converter ./addon \
      --project-location ./SafariExtension \
      --app-name "SF Inspector Ultra" \
      --bundle-identifier com.yourname.sfinspector \
      --no-open

    This generates targets for both macOS and iOS/iPadOS.

  2. Open the project in Xcode:

    open ./SafariExtension/*.xcodeproj
  3. Select your iOS device or simulator as the run destination in the Xcode toolbar.

  4. Set your signing team for all targets (see step 4 above). For physical devices, you need a paid Apple Developer account ($99/yr).

  5. Build and run (⌘R):

    • On a simulator, the app installs and runs automatically.
    • On a physical device, you may need to trust the developer certificate: go to Settings → General → VPN & Device Management on the device and trust your developer profile.
  6. Enable the extension in Safari (see below).

Enable the Extension in Safari

macOS

  1. If you are running an unsigned/local build, you must enable developer extensions each time you open Safari:

    • Open Safari → Settings (⌘,) → Advanced tab → check Show features for web developers.
    • In the menu bar: Develop → Allow Unsigned Extensions (you'll need to authenticate). This resets when Safari restarts.
  2. Go to Safari → SettingsExtensions tab.

  3. Check the box next to SF Inspector Ultra to enable it.

  4. When prompted, grant the extension access to Salesforce domains (you can choose "Always Allow on Every Website" or selectively allow specific Salesforce domains).

iOS / iPadOS

  1. Open SettingsAppsSafariExtensions.
  2. Tap SF Inspector Ultra and toggle it on.
  3. Set website access permissions — choose All Websites or add your specific Salesforce domains.

Upstream (Chrome/Firefox)

If you'd rather use the upstream Reloaded extension for Chrome or Firefox instead of this Safari fork, those builds live here:

They do not include the Advanced features or the AI layer described above.

Use with a Connected App

For orgs with API Access Control enabled, or on iOS/iPadOS where cookie reuse is restricted, you need an OAuth connected app. Follow the upstream how-to: Use SF Inspector with a Connected App.

Development

  1. Install Node.js + npm.
  2. npm install.

Safari (macOS)

  1. Run the converter (see Installation above).
  2. Build and run in Xcode (⌘R).
  3. Enable Allow Unsigned Extensions in Safari's Develop menu (resets each Safari session).
  4. After making changes to files in addon/, rebuild in Xcode. The extension reloads automatically.

Safari (iOS/iPadOS)

  1. Run the converter without --macos-only.
  2. Select your iOS device or simulator in Xcode.
  3. Build and run (⌘R).
  4. Enable the extension in Settings → Apps → Safari → Extensions.

Chrome (for cross-platform testing)

  1. Open chrome://extensions/, enable Developer mode.
  2. Load unpacked → pick addon/.

Firefox (for cross-platform testing)

  1. Swap manifest-firefox.jsonmanifest.json.
  2. about:debuggingThis FirefoxLoad Temporary Add-on…addon/manifest.json.

Tests

See tests/HOW_TO_RUN_TESTS.md.

Linting

npm run eslint

Project structure

When adding features, prefer existing utilities in addon/utils.js and SLDS classes from addon/styles/slds/slds.css over reinventing them.

Safari-specific notes

  • The xcrun safari-web-extension-converter tool generates a native macOS/iOS host app wrapper around the addon/ directory. You don't modify the generated Xcode project files directly for extension logic — all extension code stays in addon/.
  • Safari uses the WebExtensions browser.* API namespace. The codebase already supports this (it also supports Firefox).
  • Service worker lifecycle may differ from Chrome. If the background script is evicted, Safari will restart it on the next event.
  • The Develop → Web Extension Background Content menu in Safari lets you attach Web Inspector to the extension's service worker for debugging.

Design Principles

(Inherited from the upstream. Not always lived up to — improvements welcome.)

  • Stay inactive until the user interacts. The extension can break Salesforce because it relies on monkey-patching and internal APIs — installing it should never break anything on its own.
  • For manual, ad-hoc tasks. Not an automation surface.
  • Efficiency over discoverability. Advanced things may be hidden; primary things must be central and fast.
  • Surface context automatically when useful (autocomplete everywhere) without overwhelming.
  • Provide raw API access. Enhancements shouldn't bury the underlying call — even if SOQL parsing fails, the result should still render.
  • Implementing features Salesforce already ships is fine if we can make them faster or smarter.
  • Work for as many users as possible — admins, standard users, person accounts, multi-currency, professional edition, slow networks.
  • Conservative about API request count and complexity, but not at the expense of the other principles.

Acknowledgements

This extension is a derivative work standing on three sets of shoulders:

  • Søren Krabbe and Jesper Kristensen — created the original Salesforce Inspector. Every piece of the popup's design language, the Show All Data view, the inspect-inline pattern, and the cookie-reuse auth approach traces back to their work.
  • Thomas Prouvot — has maintained and substantially extended the project as Salesforce Inspector Reloaded, including the MV3 migration, REST Explorer, Dependencies Explorer, Field Creator, Event Monitor, Metadata Retrieve, API Statistics, the popup overhaul, and the favicon/banner customization. The bulk of the code in this fork is his.
  • Olivier Dufour — built Salesforce Inspector Advanced, which contributed the SOQL editor (syntax highlighting + inplace suggestions), the flamechart Apex log viewer, the Apex runner, and the static flow analysis logic.

The AI SOQL flow and the AI debug-log chat are my additions on top.

If you find this useful, please also consider starring or contributing back to the upstream projects — that's where the foundation comes from.

Third-Party Libraries

This extension uses the following third-party libraries:

For full license text and file mapping, see THIRD_PARTY_NOTICES.md.

License

MIT. Original copyright held by the upstream authors; modifications in this fork are likewise MIT.

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages