PlayBot - The Google Play Robot
A CLI and JavaScript library to manage Google Play tasks. Uses Selenium for easy maintenance and flexibility.
Requirements
PlayBot requires NodeJS.
Installation
$ npm install playbot
# or
$ npm install playbot -g
Usage
Commands
app:create
- Creates an entry for a new app on Google Playapp:update
- Updates an existing entry for an app on Google Playapp:delete
- Deletes an existing entry for an app on Google Playapp:publish
- Publishes an existing entry for an app on Google Playapp:unpublish
- Unpublishes an existing entry for an app on Google Playapp:list
- Lists existing app entries on Google Play Dev Console
JSON Manifests
Most commands take in options - you can either pass them individually, or use a JSON manifest file like this:
For example, the following commands are equivalent usng this JSON manifest:
$ playbot app:create --title 'My new app' --short_description 'This app is great!'$ playbot app:create --manifest ./manifest.json
// JavaScriptPlayBotapp;PlayBotapp;
CLI
PlayBot installs an playbot
command, which you can explore with -h
flags:
$ playbot -h Commands: app:create Create App app:update Update App app:delete Delete App app:publish Publish App app:unpublish Unpublish App app:list List Apps help Display global or [command] help documentation. Global Options: --manifest FILE.json Use a JSON file to load options
Authentication
For every command, you can pass --username
and --password
flags to enter you auth credentials; you can also set $PLAYBOT_USERNAME
and $PLAYBOT_PASSWORD
environment variables.
JavaScript/Node
The Node package uses a PlayBot
object, and its properties map to the CLI commands:
var PlayBot = ;PlayBotapp;
Authentication
The JavaScript library has a few shortcuts for logging in to Google Play:
// pass as optionsPlayBotapp; // run in closurePlayBot; // set globallyPlayBot;
Output
The :list
commands are meant to return some data. If you're using the JavaScript library, you'll receive an Array
when the command is done; if you're using the CLI, the command will output a JSON object with one entry.
PlayBotapp;
$ playbot app:list{"apps": ["com.usepropeller.myapp"]}
If you're using any other command (which generally create side-effects), the end result will be true
in Javascript, or exit code 0 on the CLI.
Verbose & Pretty Output
You can base a --verbose
flag (or a verbose: true
option in JavaScript) to see all of the output as each script processes. There are two output formats, json
and pretty
, which you are set with either the --format
flag or format: 'format_string'
options in JavaScript.
Contact
License
PlayBot is available under the MIT license. See the LICENSE file for more info.