{"id":46236705,"url":"https://github.com/freepicheep/nu-salesforce","last_synced_at":"2026-03-03T19:11:22.831Z","repository":{"id":339057294,"uuid":"1160295924","full_name":"freepicheep/nu-salesforce","owner":"freepicheep","description":"A nushell module to interact with Salesforce data through the Salesforce REST API.","archived":false,"fork":false,"pushed_at":"2026-02-17T23:38:09.000Z","size":17,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-18T00:51:35.862Z","etag":null,"topics":["data-analysis","nu","nushell","salesforce","salesforce-api","scripting","shell"],"latest_commit_sha":null,"homepage":"","language":"Nushell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freepicheep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-17T19:17:36.000Z","updated_at":"2026-02-17T23:34:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/freepicheep/nu-salesforce","commit_stats":null,"previous_names":["freepicheep/nu-salesforce"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/freepicheep/nu-salesforce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freepicheep%2Fnu-salesforce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freepicheep%2Fnu-salesforce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freepicheep%2Fnu-salesforce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freepicheep%2Fnu-salesforce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freepicheep","download_url":"https://codeload.github.com/freepicheep/nu-salesforce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freepicheep%2Fnu-salesforce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30056056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","nu","nushell","salesforce","salesforce-api","scripting","shell"],"created_at":"2026-03-03T19:11:22.120Z","updated_at":"2026-03-03T19:11:22.812Z","avatar_url":"https://github.com/freepicheep.png","language":"Nushell","funding_links":[],"categories":["Scripts"],"sub_categories":[],"readme":"# nu-salesforce\n\nA [Nushell](https://www.nushell.sh/) module for interacting with the Salesforce REST API. Query data, manage records, and call endpoints without leaving your shell.\n\n## Features\n\n- **Authentication** — Log in via username/password + security token (SOAP) or a direct session ID.\n- **SOQL \u0026 SOSL** — Run queries and searches with built-in auto-pagination.\n- **SObject CRUD** — Create, read, update, upsert, and delete records.\n- **REST / Apex / Tooling** — Make arbitrary calls to any Salesforce REST endpoint.\n- **Org Utilities** — Inspect API limits, describe SObjects, and list recently changed records.\n\n## Installation\n\n**Using Quiver (an experimental project manager for nu)**\n\nFirst, install Quiver if you haven't already.\n\n1. brew: `brew install freepicheep/tap/quiver`\n2. mise: `mise use -g github:freepicheep/quiver`\n3. cargo: `cargo install --git https://github.com/freepicheep/quiver`\n4. shell script: `curl --proto '=https' --tlsv1.2 -LsSf https://github.com/freepicheep/quiver/releases/latest/download/quiver-installer.sh | sh`\n\nThen, in your project directory, run `qv init`. This creates the `nupackage.toml` for managing dependencies and publishing your package if you choose to do so. Then, all you have to do is run `qv add freepicheep/nu-salesforce` to install this module into your project's `.nu-env/modules/` directory. Follow the instructions in the Quiver README for running code with your managed Nu environment.\n\n**Git Clone**\n\nClone this repository (or copy the `nu-salesforce` directory) somewhere on your machine, then import it in your Nushell session or config:\n\n```nu\nuse /path/to/nu-salesforce *\n```\n\n## Quick Start\n\n```nu\n# 1. Authenticate\nsf login --username \"user@example.com\" --password \"xxxxxxxx\" --token \"xxxxxxxx\"\n\n# 2. Query records\nsf query \"SELECT Id, Name FROM Account LIMIT 10\"\n\n# 3. Create a record\nsf create Account { Name: \"Acme Corp\", Industry: \"Technology\" }\n\n# 4. Update a record\nsf update Account 001XXXXXXXXXXXX { Name: \"Updated Name\" }\n\n# 5. Delete a record\nsf delete Account 001XXXXXXXXXXXX\n\n# 6. Call a generic REST endpoint\nsf rest \"limits/\"\n\n# 7. Check your session\nsf whoami\n\n# 8. Log out\nsf logout\n```\n\n### Credential Management\n\n**With Email, Password, and Security Token**\n\nIf you store your Salesforce username, password, and security token in a `.env` file, you can use the `load-env-file` function to add those to your environment variables.[^1]\n\n**Your `.env` File**\n```env\nSALESFORCE_USERNAME='user@example.com'\nSALESFORCE_PASSWORD='xxxxxxxx'\nSECURITY_TOKEN='xxxxxxxx'\n```\n\n**In Your Script**\n```nu\nuse /path/to/nu-salesforce * \n\n# load your salesforce credentials from the .env file\nload-env-file\n\n# login to salesforce with your credentials\nsf login --username $env.SALESFORCE_USERNAME --password $env.SALESFORCE_PASSWORD --token $env.SECURITY_TOKEN\n```\n\n**With Session Id and Instance**\n\nIf you want to login using a session id, you can obtain it several ways. One way is to run the following script in an \"Execute Anonymous Window\" and copy the id from the debug output in the console.\n\n```apex\nString id = UserInfo.getSessionId().Substring(15);\n\nSystem.debug('My session id: ' + id);\n```\n\nYour instance is usually `yourdomain.my.salesforce.com`.\n\nYou can then log in to nu-salesforce like this:\n\n```nu\nsf login --session 'your_session_id' --instance 'yourdomain.my.salesforce.com'\n```\n\n## Commands\n\n| Command | Description |\n| --- | --- |\n| `sf login` | Authenticate to Salesforce |\n| `sf logout` | Clear the current session |\n| `sf whoami` | Show session information |\n| `sf query` | Run a SOQL query |\n| `sf query-more` | Fetch the next page of query results |\n| `sf search` | Run a SOSL search |\n| `sf quick-search` | Shorthand SOSL search |\n| `sf get` | Get a record by ID |\n| `sf get-by-custom-id` | Get a record by external ID |\n| `sf create` | Create a new record |\n| `sf update` | Update an existing record |\n| `sf upsert` | Upsert a record via external ID |\n| `sf delete` | Delete a record |\n| `sf describe` | Describe an SObject's metadata |\n| `sf metadata` | Get lightweight SObject metadata |\n| `sf deleted` | List records deleted in a date range |\n| `sf updated` | List records updated in a date range |\n| `sf rest` | Generic REST API call |\n| `sf apex` | Call an Apex REST endpoint |\n| `sf tooling` | Call the Tooling API |\n| `sf limits` | Show org API usage limits |\n| `sf describe-all` | Describe all available SObjects |\n| `load-env-file` | Loads key-value data from a .env file |\n\n## Learning More\n\nEvery command has built-in documentation. Use `help` to view a command's description, flags, and examples:\n\n```nu\nhelp sf query\nhelp sf create\nhelp sf login\n```\n\n## Disclaimers\n\nMost of the original code was written with Claude Opus 4.6 using Google's Antigravity. I used the excellent [simple-salesforce](https://github.com/simple-salesforce/simple-salesforce) python library to guide the llm on creating this module. I have not fully tested every feature yet and am not responsible for any unexpected behavior or misuse of this module.\n\n## License\n\nMIT\n\n[^1]: Thanks to `@pixl_xip` on the nushell Discord for this handy function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreepicheep%2Fnu-salesforce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreepicheep%2Fnu-salesforce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreepicheep%2Fnu-salesforce/lists"}