Requirements

Opal's CLI requires some standard tools to get started.

You'll need the following:

Install

Installing Opal's CLI is simple using Homebrew:

Shell

brew install opalsecurity/brew/opal-security

Reference

opal

Opal allows you to manage access to all of your sensitive systems in one place.

Usage

$ npm install -g opal-security
$ opal COMMAND
running command...
$ opal (-v|--version|version)
opal-security/0.7.3 darwin-x64 node-v14.16.1
$ opal --help [COMMAND]
USAGE
$ opal COMMAND
...

Commands

  • opal autocomplete [SHELL]

  • opal curl-example

  • opal help [COMMAND]

  • opal iam-roles:start

  • opal kube-roles:start

  • opal login

  • opal logout

  • opal resources:get

  • opal postgres-instances:start

  • opal set-url

  • opal ssh:copyFrom

  • opal ssh:copyTo

  • opal ssh:start

opal autocomplete [SHELL]

display autocomplete installation instructions

USAGE
$ opal autocomplete [SHELL]

ARGUMENTS
SHELL shell type

OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)

EXAMPLES
$ opal autocomplete
$ opal autocomplete bash
$ opal autocomplete zsh
$ opal autocomplete --refresh-cache

See code: @oclif/plugin-autocomplete

opal curl-example

Prints out an example cURL command containing the parameters the CLI uses to query the Opal server.

USAGE
$ opal curl-example

OPTIONS
-h, --help show CLI help

See code: src/commands/curl-example.ts

opal help [COMMAND]

display help for opal

USAGE
$ opal help [COMMAND]

ARGUMENTS
COMMAND command to show help for

OPTIONS
--all see all commands in CLI

See code: @oclif/plugin-help

opal iam-roles:start

Starts a session to assume an IAM role.

USAGE
$ opal iam-roles:start

OPTIONS
-h, --help show CLI help
--id=id (required)

EXAMPLE
opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398

See code: src/commands/iam-roles/start.ts

opal kube-roles:start

Starts a session to assume an IAM role.

USAGE
$ opal kube-roles:start

OPTIONS
-h, --help show CLI help
--id=id (required)

EXAMPLE
opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398

See code: src/commands/kube-roles/start.ts

opal login

Authenticates you with the Opal server.

USAGE
$ opal login

OPTIONS
-h, --help show CLI help

EXAMPLE
$ opal login

See code: src/commands/login.ts

opal logout

Clears locally stored Opal server authentication credentials.

USAGE
$ opal logout

OPTIONS
-h, --help show CLI help

EXAMPLE
$ opal logout

See code: src/commands/logout.ts

opal resources:get

Get resource info for a particular resource.

USAGE
$ opal resources:get

OPTIONS
-h, --help show CLI help
--id=id (required)

EXAMPLE
opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4

See code: src/commands/resources/get.ts

opal postgres-instances:start

Starts a session to query a Postgres database.

USAGE
$ opal postgres-instances:start

OPTIONS
-h, --help show CLI help
--id=id (required)

EXAMPLE
opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398

See code: src/commands/postgres-instances/start.ts

opal set-url

Sets the url of the Opal server. Defaults to https://app.opal.dev.

USAGE
$ opal set-url

OPTIONS
-h, --help show CLI help
--custom=custom
--demo
--dev
--devLocal
--prod

EXAMPLE
$ opal set-host

See code: src/commands/set-url.ts

opal ssh:copyFrom

Use SCP to copy files from a compute instance.

USAGE
$ opal ssh:copyFrom

OPTIONS
-h, --help show CLI help
--dest=dest [default: .] Pick which directory you want your files to be copied to.
--id=id (required)

--src=src (required) The path of the directory or file you would like to copy over SCP. Note we only support one
file or directory at a time.

--user=user [default: ssm-user] Pick which user you want to run SCP over. Keep in mind not all users will have access
to each other's home directory.

EXAMPLE
opal ssh:copyFrom --id 51f7176b-0464-4a6f-8369-e951e187b398 --src instance/dir --dest my/dir

See code: src/commands/ssh/copyFrom.ts

opal ssh:copyTo

Use SCP to copy files to a compute instance.

USAGE
$ opal ssh:copyTo

OPTIONS
-h, --help show CLI help
--dest=dest [default: .] Pick which directory you want your files to be copied to.
--id=id (required)

--src=src (required) The path of the directory or file you would like to copy over SCP. Note we only support one
file or directory at a time.

--user=user [default: ssm-user] Pick which user you want to run SCP over. Keep in mind not all users will have access
to each other's home directory.

EXAMPLE
opal ssh:copyTo --id 51f7176b-0464-4a6f-8369-e951e187b398 --src my/dir --dest instance/dir

See code: src/commands/ssh/copyTo.ts

opal ssh:start

Start an SSH session to access a particular compute instance.

USAGE
$ opal ssh:start

OPTIONS
-h, --help show CLI help
--id=id (required)

EXAMPLE
opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398

See code: src/commands/ssh/start.ts

Did this answer your question?