This CLI tool allows you to interact with the Simpli.fi API, performing actions such as listing campaigns and creating new campaigns.
This package relies onto the Simpli.fi API Client package, which is a wrapper around the Simpli.fi API.
To install the CLI tool globally, run:
npm install -g simpl.fi-api-client
The general syntax for using the CLI is:
simplifi [options] --action <action>
-o, --org-id <id>
(required): Your Simpli.fi Organization ID-k, --api-key [key]
: App API Key for Simpli.fi-u, --user-key [key]
: User API Key for Simpli.fi-a, --action <action>
: Action to perform (e.g., list-campaigns, create-campaign)-f, --file <file>
: File to read for specific actions (e.g., a JSON file for create-campaign)-s, --save-output
: Save output to a file-V, --version
: Output the version number-h, --help
: Display help for command
You can set the following environment variables instead of passing them as command-line options:
APP_API_TOKEN
: For the App API KeyUSER_API_KEY
: For the User API Key
If these environment variables are set, the CLI will use them automatically.
To list all campaigns:
simplifi -o <your-org-id> --action list-campaigns
To create a new campaign:
simplifi -o <your-org-id> --action create-campaign
Note: The create-campaign action is currently a placeholder and needs to be implemented with the necessary options for campaign details.
- List campaigns using environment variables for API keys:
export APP_API_TOKEN=your_app_token
export USER_API_KEY=your_user_key
simplifi -o 12345 --action list-campaigns
- List campaigns with API keys provided as options:
simplifi -o 12345 -k your_app_token -u your_user_key --action list-campaigns
- Save output to a file:
simplifi -o 12345 --action list-campaigns --save-output
To contribute to this project:
- Clone the repository
- Install dependencies with
npm install
orbun install
- Make your changes
- Build the project with
bun run build
- Test your changes