A sample CLI project build with Poetry.
Project description
sf-helper
A command-line interface (CLI) tool to simplify backing up Salesforce metadata.
Overview
sf-helper is a Python-based CLI tool that helps Salesforce administrators and developers back up metadata from their Salesforce orgs. It streamlines the process of retrieving metadata components, such as objects, workflows, and profiles, and saves them to a local directory for version control or archival purposes.
Features
- Backup Salesforce metadata with a single command.
- Support for multiple metadata types (e.g., Apex classes, custom objects, profiles).
- Configurable output directory for backups.
- Secure storage of Salesforce credentials (API key/token).
Installation
Prerequisites
- Python 3.8 or higher
pip(Python package manager)- Salesforce account with API access
Steps
- Install
sf-helperusing pip:pip install sf-helper
Configuration
Before using sf-helper, set up your Salesforce API key or access token:
sf-helper set-key --api-key <your-api-key>
This stores the API key securely in a configuration file (~/.sf_helper_config.ini).
Usage
Backup Metadata
To back up metadata to a local directory: Not Yet Implemented
sf-helper backup --output-dir ./salesforce-backup
This retrieves metadata from your Salesforce org and saves it to the specified directory.
Specify Metadata Types
Not Yet Implemented To back up specific metadata types (e.g., custom objects and profiles):
sf-helper backup --output-dir ./salesforce-backup --types CustomObject,Profile
View Stored API Key
To check the stored API key:
sf-helper get-key
Help
To see all available commands and options:
sf-helper --help
Example
# Set API key
sf-helper set-key --api-key my-secret-key-123
# Backup all metadata (Not yet implemented)
sf-helper backup --output-dir ./my-backups
# Backup specific metadata types (Not yet implemented)
sf-helper backup --output-dir ./my-backups --types ApexClass,CustomObject
Contributing
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m 'Add YourFeature'). - Push to the branch (
git push origin feature/YourFeature). - Open a pull request.
License
This project is licensed under the MIT License.
Support
For issues or questions, please open an issue on the GitHub repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sf_helper-0.0.2.tar.gz.
File metadata
- Download URL: sf_helper-0.0.2.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e4945f80b984e1ab677430d7c85c609f023eb20940ba33fa1ecb8d3c9e4ca28
|
|
| MD5 |
dd5beeefc4dfcfb1c0902db6a59db602
|
|
| BLAKE2b-256 |
023c43d327abc2ce4d7b282d63e62cc585d51fc9aeb75ff940367152a34dad3a
|
File details
Details for the file sf_helper-0.0.2-py3-none-any.whl.
File metadata
- Download URL: sf_helper-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18910636876fcfb0bdd405ca235d17faf2acf34ca8c0b336f548f324a5b8d408
|
|
| MD5 |
1ec911fd5181ea31b8a893e9eb308ed2
|
|
| BLAKE2b-256 |
094d1a7ab4748db086b567c741d01cc9e919bacd4b5deb461ae6266cd322f2cb
|