domo-cli Build Status

The Domo Command Line Interface built as a static x86_64 binary.

$ domo-cli dataset import <DATASET_ID> -f data.csv

Installation

OAuth 2.0

The Domo API uses OAuth 2.0 authentication. domo-cli accepts authentication information by environment variables or arguments.

$ export DOMO_CLIENT_ID=foo
$ export DOMO_CLIENT_SECRET=bar
$ domo-cli ... --client-id=foo --client-secret=bar

The following usages assume that credentials have been granted in one of the above ways.

Usage

domo-cli is itself built as a RESTful design and executed with RESOURCE and ACTION as arguments.

Dataset

$ domo-cli dataset list
$ domo-cli dataset create -f meta.json
$ domo-cli dataset update -f meta.json
$ domo-cli dataset import <DATASET_ID> -f data.csv
$ domo-cli dataset get    <DATASET_ID>
$ domo-cli dataset delete <DATASET_ID>

Token

Althoug domo-cli will automatically update OAuth tokens when it is expired, you can manually update it by token authorize.

$ domo-cli token authorize --client-id=5e847... --client-secret=52ccf...

$ domo-cli token show
fetched at : 2020-06-03 02:09:54 +09:00
expired at : 2020-06-03 03:09:53 +09:00
token      : eyJhbGciOiJSUzI1NiIs...

The token file is stored in .domo directory in default. See the Outdir for details.

Outdir

Internally, domo-cli executes the API with a series of shell commands. And it creates following files in the output directory.

The directory can be specified with the "-O

" option, which defaults to .domo.

Dryrun

domo-cli is a thin wrapper for cURL. It shows a cURL shell command by "-n" arg.

$ domo-cli dataset get <DATASET_ID> -n

Roadmap

Development

$ make
$ make test

Contributing

  1. Fork it (https://github.com/maiha/domo-cli/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors