Salesforce CLI plugin for surgical deployments with field-level delta detection.
Modern Salesforce deployment tools (SF CLI, sfdx-git-delta) detect changes at the file level. If you modify one field in an object with 200 fields, you deploy the entire object file.
sf-precise-deploy analyzes metadata at the field level, enabling surgical deployments:
- 🎯 Deploy only the fields that changed
- 🔪 Generate field-level destructive changes
- ⚡ Reduce deployment conflicts and time
- 🔄 Git-based or directory-based comparison
- 🛡️ Comprehensive error handling
Parses metadata XML to detect changes within files:
- CustomField
- ValidationRule
- RecordType
- WorkflowRule
- And more...
Auto-generates destructiveChanges.xml with individual field deletions instead of entire objects.
Apply transformations to metadata before deployment:
- Variable substitution
- Environment-specific modifications
- Profile/permission set sanitization
Three modes to fit your workflow:
- Git-only: Fast, uses git history (file-level)
- Smart: Retrieves only changed files, field-level diffs
- Full audit: Complete org comparison
sf plugins install @flossware/sf-precise-deploysf precise delta \
--source-dir force-app/main/default \
--target-dir retrieved/main/defaultsf precise git-delta --from origin/main --to HEAD# Git-based
sf precise deploy --target-org myOrg --git-ref origin/main
# Directory-based
sf precise deploy \
--target-org myOrg \
--source-dir force-app \
--target-dir retrieved| Command | Description |
|---|---|
sf precise delta |
Analyze field-level changes between directories |
sf precise git-delta |
Analyze field-level changes between git refs |
sf precise deploy |
Deploy with field-level delta detection |
Run sf precise <command> --help for detailed options.
40+ metadata child element types across:
- Objects (fields, validation rules, record types, etc.)
- Workflows (alerts, field updates, rules)
- Flows (decisions, formulas, variables, etc.)
- Profiles & Permission Sets
- Custom Metadata
See DEVELOPMENT.md for the complete list.
| Feature | SF CLI | sfdx-git-delta | sf-precise-deploy |
|---|---|---|---|
| Git integration | ❌ | ✅ | ✅ |
| Auto destructiveChanges.xml | ❌ | ✅ Files | ✅ Fields |
| Field-level detection | ❌ | ❌ | ✅ |
| Modern TypeScript | ✅ | ✅ | ✅ |
| Error handling | ✅ | ✅ | ✅ |
Key Differentiator: Field-level destructive changes - nobody else does this.
Contributions welcome! See CONTRIBUTING.md for guidelines.
git clone https://github.com/solenopsis/sf-precise-deploy
cd sf-precise-deploy
npm install
npm run build
npm test
sf plugins link .npm test # Run all tests (40+ tests)
npm run lint # Lint code
npm run build # Compile TypeScriptThis plugin preserves the field-level diff capabilities of Solenopsis, a pioneering Salesforce deployment tool, while modernizing the implementation for the SF CLI ecosystem.
GPL-3.0 - Same as Solenopsis
Scot P. Floess
Star this repo if you find it useful! ⭐