Giter Club home page Giter Club logo

binocle's Introduction

binocle

Brilliant Instance Navigation, Organisation and Cleaning Looker Executable

oclif Version Downloads/week License

This CLI tool was initially developed during the Hack@Home 2021 Hackathon organized by Looker.
It uses the environment variables described in the Looker Codegen SDK.

It aims at providing a set of tools to better understand, organise and document your Looker instance.

Usage

$ npm install -g binocle
$ binocle COMMAND
running command...
$ binocle (-v|--version|version)
binocle/0.2.1 darwin-arm64 node-v19.6.0
$ binocle --help [COMMAND]
USAGE
  $ binocle COMMAND
...

Commands

binocle copy ID [TYPE] [FOLDER_ID]

Copies a dashboard into a specified folder.

USAGE
  $ binocle copy ID [TYPE] [FOLDER_ID]

ARGUMENTS
  ID
  TYPE       (l|d) [default: l] look (l) or dashboard (d)
  FOLDER_ID

OPTIONS
  -c, --client_id=client_id          (required) API3 credential client_id
  -h, --help                         show CLI help
  -r, --rename                       Allows to rename the content that will be copied.
  -s, --client_secret=client_secret  (required) API3 credential client_id
  -u, --base_url=base_url            (required) Sets base url like https://my.looker.com:19999

See code: src/commands/copy.ts

binocle edit ID [TYPE]

Edit queries of Looks and Dashboard tiles.

USAGE
  $ binocle edit ID [TYPE]

ARGUMENTS
  ID
  TYPE  (l|d) [default: l] look (l) or dashboard (d)

OPTIONS
  -b, --bulk                         Allows to edit dashboard tiles in bulk.
  -c, --client_id=client_id          (required) API3 credential client_id

  -e, --edit_dashboard_properties    Allows to edit the properties of the dashboard before editing the dashboard
                                     elements. (Ex : Edit filters)

  -h, --help                         show CLI help

  -p, --get_properties               Display the properties of the content you want to edit, before editing it.

  -r, --rename                       Allows to rename the content that will be copied.

  -s, --client_secret=client_secret  (required) API3 credential client_id

  -u, --base_url=base_url            (required) Sets base url like https://my.looker.com:19999

See code: src/commands/edit.ts

binocle help [COMMAND]

display help for binocle

USAGE
  $ binocle help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

binocle ls [FOLDER_ID]

Lists the content of the selected folder and its subfolders.

USAGE
  $ binocle ls [FOLDER_ID]

OPTIONS
  -c, --client_id=client_id          (required) API3 credential client_id
  -d, --depth=depth                  [default: 2] Sets the subfolders depth to display. Unlimited depth : -1
  -h, --help                         show CLI help
  -i, --image                        Creates an image of the listing in the current directory
  -s, --client_secret=client_secret  (required) API3 credential client_id
  -u, --base_url=base_url            (required) Sets base url like https://my.looker.com:19999
  --show_content                     Displays Looks and Dashboards in the listing

DESCRIPTION
  Use the options to save the output to a png image, display the looks and dashboards and set the depth in the folder 
  binocle must search in. Click on the contents and folders ids in your terminal (provided it supports it, use iTerm2 
  for instance) to open them in your default browser.

EXAMPLE
  $ binocle ls 123 -d 2
  ๐Ÿ“ Folder A #123 (D:0 - L:0)
  |   ๐Ÿ“ Folder B #145 (D:0 - L:2)
  |   |   ๐Ÿ“ Folder D #547 (D:0 - L:3)
  |   ๐Ÿ“ Folder C #156 (D:1 - L:7)

See code: src/commands/ls.ts

binocle pause CONTENT_ID [TYPE] [USER_ID]

Gets all schedules of a Look/Dashboard and enables pausing/unpausing them. NB: if any runs were skipped while it was paused, it will run once after being unpaused.

USAGE
  $ binocle pause CONTENT_ID [TYPE] [USER_ID]

ARGUMENTS
  CONTENT_ID
  TYPE        (l|d) [default: l] look (l) or dashboard (d)
  USER_ID     If no user_id is provided defaults to the API3 Key owner

OPTIONS
  -c, --client_id=client_id          (required) API3 credential client_id
  -h, --help                         show CLI help
  -r, --revert                       Revert: displays paused schedules and enabling unpausing them
  -s, --client_secret=client_secret  (required) API3 credential client_id
  -u, --base_url=base_url            (required) Sets base url like https://my.looker.com:19999

ALIASES
  $ binocle schedule:pause

See code: src/commands/pause.ts

binocle restore ID [TYPE]

Check if a look or dashboard has been deleted by id and restore it if possible in a chosen folder.

USAGE
  $ binocle restore ID [TYPE]

ARGUMENTS
  ID
  TYPE  (l|d) [default: l] look (l) or dashboard (d)

OPTIONS
  -c, --client_id=client_id          (required) API3 credential client_id
  -h, --help                         show CLI help
  -s, --client_secret=client_secret  (required) API3 credential client_id
  -u, --base_url=base_url            (required) Sets base url like https://my.looker.com:19999

See code: src/commands/restore.ts

binocle share

Shares a folder and its parents up until the shared/users root folder to a group or a user. It deactivates the inheritance of access levels from parents for all these folders.

USAGE
  $ binocle share

OPTIONS
  -c, --client_id=client_id          (required) API3 credential client_id
  -e, --edit_right                   Shares the folder with edit rights (and parents with view rights)
  -f, --folder_id=folder_id          (required) API3 credential client_id
  -g, --is_group                     The provided id is the one of a group, not a user
  -h, --help                         show CLI help
  -i, --id=id                        (required) Group or user id
  -s, --client_secret=client_secret  (required) API3 credential client_id
  -u, --base_url=base_url            (required) Sets base url like https://my.looker.com:19999

See code: src/commands/share.ts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.