@playbooks/cli
v0.7.1
Published
A simple CLI for the Playbooks project.
Readme
Overview
The Playbooks CLI gives developers terminal access to their Playbooks account.
Using the CLI, developers can purchase, download, and clone plays from anywhere.
After installation, simply use the playbooks prompt followed by the commands outlined below.
Installation
npm install -g @playbooks/cli
playbooks login
playbooks download <uuid>
Configuration
The Playbooks CLI will look for the following config file ~/.playbooksrc containing your platform secrets.
If one does not exist, the Playbooks CLI will create one when you login.
As an alternative, you can provide a custom config file location using the --config flag as part of any command.
Here is a sample config file located at the default location on your file system:
# ~/.playbooksrc
id=1
name=Eric Hubbell
[email protected]
uuid=eric-hubbell
token=********
...
Table of Contents
- global
- account
- banks
- cards
- clone
- config
- download
- login
- logout
- orders
- ping
- play
- plays
- session
- subscription
- teams
- toggle
Global
A list of global commands and options.
playbooks --help
playbooks --version
playbooks login --help
playbooks login --config ~/path/to/.playbooksrc
playbooks download --help
playbooks download --config ~/path/to/.playbooksrc| Option | Type | Description | | :--- | :--- | :--- | | --config | string | Path to a custom playbooks config file | --help | boolean | Display command info and available options | | --version | boolean | Display current library version |
Commands
A list of Playbooks specific commands.
Account
Display which account is currently active.
playbooks account
playbooks account --select 'id,name,email'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of account fields you'd like to display |
Banks
View your account banks.
playbooks banks
playbooks banks --select 'id,summary,createdAt'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Cards
View your account cards.
playbooks cards
playbooks cards --select 'id,summary,createdAt'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Charges
View your account charges.
playbooks charges
playbooks charges --select 'id,amount,createdAt'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Clone
Clone a play to your Github account.
playbooks clone <uuid>
playbooks clone <uuid> --account playbooks-community --name my-cloned-play| Option | Type | Description | | :--- | :--- | :--- | | --account | string | Clone to a specific account | | --name | string | Rename the cloned play | | --private | boolean | Mark the cloned play as private |
Config
Display your config file.
playbooks config
playbooks config --select 'id,name,email'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Download
Download a play to your local machine.
playbooks download <uuid>
playbooks download <uuid> --path ~/path/to/folder| Option | Type | Description | | :--- | :--- | :--- | | --path | string | Path to custom destination folder | | --name | string | Provide a custom name for the download | | --version | string | Specify a specific version to download |
Downloads
View your account downloads.
playbooks downloads
playbooks downloads --select 'id,amount,createdAt'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Login
Login to your Playbooks account via email / password.
playbooks login
playbooks login --email [email protected] --password ******| Option | Type | Description | | :--- | :--- | :--- | | --email | string | Your email address | | --password | string | Your password |
Logout
Logout of your Playbooks account.
playbooks logout
Oauth
Login to Playbooks via Github OAuth.
playbooks oauth
Orders
View your account orders.
playbooks orders
playbooks orders --select 'id,amount,createdAt'| Option | Type | Description | | :--- | :--- | :--- | | --entity | enum | Filter by entityType | | --select | string[] | A comma separated list of fields you'd like to display
Payouts
View your account payouts.
playbooks payouts
playbooks payouts --select 'id,amount,createdAt'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Ping
Test your connection to the Playbooks API.
playbooks ping
Play
Fetch a specific play
playbooks play <uuid>
playbooks play actix-official-starter --include framework| Option | Type | Description | | :--- | :--- | :--- | | --include | string | A comma separated list of relationships to include | | --select | string[] | A comma separated list of fields you'd like to display
Plays
Fetch a list of plays
playbooks plays
playbooks plays --select 'id,name,uuid,tagline'
playbooks plays --framework 'react'
playbooks plays --language 'typescript'
playbooks plays --team 'mile-hi-labs'
playbooks plays --view 'featured'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display | --framework | string | Fetch by framework identifier | | --language | string | Fetch by language identifier | | --platform | string | Fetch by platform identifier | | --tool | string | Fetch by tool identifier | | --tag | string | Fetch by tag identifier | | --view | enum | Fetch by view |
Session
Fetch and display your current session
playbooks session
playbooks session --select 'id,name,uuid,email'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Subscription
Fetch and display your account subscription
playbooks subscription
playbooks subscription --select 'id,name,uuid,email'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Teams
View a list of your session teams
playbooks teams
playbooks teams --select 'id,name,uuid,email'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Please note: this command is only available when a user account is activated.
Toggle
Toggle your active account.
playbooks toggle
playbooks toggle --uuid 'playbooks-community'| Option | Type | Description | | :--- | :--- | :--- | | --uuid | string | Account identifier
Transfers
View your account transfers.
playbooks transfers
playbooks transfers --select 'id,amount,createdAt'| Option | Type | Description | | :--- | :--- | :--- | | --select | string[] | A comma separated list of fields you'd like to display
Questions
Please reach out to [email protected] with any technical questions and / or issues.
Author
- Playbooks XYZ
- [email protected]
Contributions
Please open a Github Issue describing the PR you want to submit before starting work.
