mc-sf-query
v1.0.4
Published
A Node.js CLI tool to query Salesforce orgs, describe objects, and list metadata, with HTML output using Tailwind CSS.
Downloads
24
Maintainers
Readme
sf-query
A Node.js CLI tool to query Salesforce orgs, describe objects, and list metadata, with HTML output using Tailwind CSS and DataTables.
Supports CSV export, pagination
Features
- Login with either:
- Access Token & Instance URL (optional API version, default: v64.0)
- Username via Salesforce CLI (
sf force org display -o username --json)
- Execute SOQL queries and render output in HTML
- Describe Salesforce objects and view fields in HTML
- List all objects in your org (
listObjects) - Pagination, column sorting, search, CSV export in HTML table
- Dark theme with sticky header and footer
Installation
npm install -g mc-sf-queryScreenshots
Usage
- Query
mc-sf-query query -o [email protected] -q "SELECT Id, Name FROM Product2"or using direct authentication:
mc-sf-query query --accessToken <token> --instanceUrl https://myorg.my.salesforce.com -q "SELECT Id, Name FROM Product2"Options
| Option | Description |
| --------------------------- | -------------------------------------- |
| -q, --query <soql> | SOQL query to execute |
| -t, --tooling | Use Tooling API |
| --accessToken <token> | Salesforce access token |
| --instanceUrl <url> | Salesforce instance URL |
| --apiVersion <version> | Salesforce API version (default: 64.0) |
| -o, --username <username> | Use Salesforce CLI org credentials |
Describe
mc-sf-query describe -s Product2 -o [email protected]
Displays all fields of the object
- List Objects
mc-sf-query listObjects -o [email protected]
Lists all Salesforce objects in the org, with search and CSV export.

