Getting started with the Baton CLI
In this guide you can find basic information about the Baton CLI. Together we will go through the basic concepts and show you how to install and use the CLI.
How to set up Baton
Setting up Baton requires two steps.
Use this command to install Baton:
$ brew install conductorone/baton/baton
If you don’t have Homebrew installed yet, follow this guide.
batonutility using this command:
$ baton --help
That’s it! Baton is up and running.
How to use the Baton CLI
After successful installation, you will see a list of all available commands in the console.
Using the Baton CLI is very simple:
- Type as a basic command into the console
- Attach the command you want to use.
- Execute command.
c1zfiles contain all of the information that the connector has collected as part of a synchronization process. Using the Baton CLI, you can browse the contents of the
sync.c1zfile and export that data to a .csv or .xlsx file.
baton is a utility for working with the output of a baton-based connector Usage: baton [command] Available Commands: access List effective access for a user completion Generate the autocompletion script for the specified shell diff Perform a diff between sync runs entitlements List entitlements export Export data from the C1Z for upload grants List grants help Help about any command principals List principals resource-types List resource types for the latest (or current) sync resources List resources for the latest sync stats Simple stats about the c1z Flags: -f, --file string The path to the c1z file to work with. (default "sync.c1z") -h, --help help for baton -o, --output-format string The format to output results in: (console, json) (default "console") -v, --version version for baton Use "baton [command] --help" for more information about a command.
|access||List effective access for a user.||-|
|completion||Generate the auto completion script for the specified shell. The shell reads the file and executes individual commands that are placed on separate lines.||-|
|diff||Perform a diff between sync runs. Diff is used to show the changes between two versions of the same file.||-|
|entitlements||List all entitlements.||
|export||Export data from the
|grants||Provides a list of all permissions for an active logged-in user.||
|help||Provides help for any command you use.||All available commands.|
|principals||Provides list of principals.|
|principals compare||Allows you to easily compare the principals that have been granted one entitlement versus the other. Can compare across source files.|
|resource-types||List resource types for the latest (or current) sync.||
|resources||List resources for the latest (or current) synch.||
|stats||Simple stats about the
|users||List user resources with more detail.||
Baton offers a lot of features and benefits for developers. One of the most powerful features is the ability to integrate with third-party systems like GitHub. This allows you to keep track of user rights updates in your GitHub repositories and, for example, see a diff of changes to the system at a set time every day.
Visit our tutorial Export GitHub access updates to a CSV file using Baton for more information.
Another way to use the SDK is to insert SDK as a basic layer in your applications. This can be helpful in case you want to add some extra functionality to your apps without having to start from scratch. By using the SDK as a foundation, you can save yourself time and effort while still being able to take advantage of all the features that Baton offers.
Check out our SDK getting started guide and learn how to integrate the SDK into your application.