domo-cli v0.6.0
domo-cli
The Domo Command Line Interface built as a static x86_64 binary.
$ domo-cli dataset import <DATASET_ID> -f data.csv
Installation
- x86_64 static binary: https://github.com/maiha/domo-cli/releases
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
- Available actions : list, create, update, import, get, delete
$ 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 authentication tokens
- history of executed shell commands
- intermediate files needed to execute the API
The directory can be specified with the "-O
.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
- token
- authorize
- show
- dataset
- create
- update
- import
- delete
- list
- get
Development
- using Crystal on docker
$ make
$ make test
Contributing
- Fork it (https://github.com/maiha/domo-cli/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- maiha - creator and maintainer
domo-cli
- 1
- 0
- 0
- 0
- 7
- about 2 years ago
- June 2, 2020
MIT License
Fri, 22 Nov 2024 22:16:29 GMT