Up until now when getting started with Salable, you had two choices for configuring your account, products, plans, etc.
1. Salable dashboard
2. Salable CLI
And, these options are fine for a lot of users but they have some issues when you start to dig into them. For instance, what if you want to share a configuration across multiple team members for easy development and testing? Or, what happens if you just want to do everything via code and don't want to waste precious time clicking around a dashboard or running several CLI commands?
The solution: `salable configure`
Up until now, there was no solution but we just recently launched the new `configure` command in our CLI that allows you to write a single configuration file and then deploy the resources within that configuration file to your Salable account.
This means you can now write a single file that defines all of your products, plans, capabilities, features and API keys and have them all automatically created for you by running a single command.
And, what if you want to share that configuration with someone else? Easy, you can commit `.salable.json` into your respository so as soon as someone clones the project they have the file. Alternatively, you can send them the file and once they have the file, they can run `salable configure` when authenticated with their account!
How to use `salable configure`
We've covered the high level of how `salable configure` works but let's run through an actual example so we can see how it works better. First of all, make sure you have [the CLI installed]and [authenticated your account]
Once you have the above CLI steps complete, we can create our configuration file which is called `.salable.json`. You can create this file whether you want and then inside that file is where we define our resources, below is an example configuration.
You'll notice that in this configuration we define a "free" product by setting "paid" to `false`. But, it's worth noting that you can also create paid products by first creating a payment integration in the Salable dashboard.
Once you have the configuration file written, open your terminal and navigate to the directory you created `.salable.json` inside. Then run the command `salable configure` and after a few moments you should see an output like the below that shares the details of the resources created with you.
You can validate this further if you wish by visiting the Salable dashboard and inspecting the resources that have been created.
So, to summarise, you can use `salable configure` to deploy resources to your Salable account by doing the below.
1. Create a Salable account
2. Configure and authenticate the Salable CLI
3. Create a `.salable.json` file
4. Run the `salable configure` CLI command
And then, with the information outputted by `salable configure` you're able to start building your applications and products powered by Salable!
The Future
The current version of `salable configure` has some limitations such as only being able to create new resources in Salable as well as requiring you to visit the Salable dashboard to configure a payment integration for paid products. But, in the future, we're going to resolve both of these issues as well as allow you to easily export a configuration file for your existing resources in your Salable dashboard.
If there is a feature or piece of functionality you'd like to see in or think would be helpful in `salable configure` then make sure to let us know!
You can also watch the above in action in the video below! If you like this content, be sure to like and subscribe to our YouTube channel - we would really appreciate it.
There are many varied ways to interact with the Salable platform, each with their own sets of functionality and recommended uses. In this guide, we’re going to be looking
There are many varied ways to interact with the Salable platform, each with their own sets of functionality and recommended uses. In this guide, we’re going to be looking