New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@toa.io/cli

Package Overview
Dependencies
Maintainers
1
Versions
335
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@toa.io/cli

Toa CLI

latest
Source
npmnpm
Version
0.24.0-alpha.0
Version published
Maintainers
1
Created
Source

Toa Command Line Interface

Common Options

--env
Path to the environment variables file (`.env` format)

Development

compose

Run composition.

toa compose [paths]
paths Glob patterns to look for components.
--kill Shutdown composition after it's started
--dock Run in Docker using current .env.
--context Path to the Context root (default .).
--bindnings Override bindings (obsolete).

Note that your localhost it is accessible from a container as host.docker.internal.

call

Call endpoint.

toa call <endpont> [request]
endpoint endpoint to call.
request Request object.
$ toa call dummies.dummy.create "{ input: { name: 'foo' } }"

env

Export environment to a .env file.

toa env [environment]
environment deployment environment name (default local).
--path path to a Context (default .)
--as output file path (default .env)
--interactive prompt for secret values

Credentials specified in the output file are preserved.

It is recommended to add .env* to .gitignore.

replay

Replay samples. Reports in TAP format.

toa replay [paths...]
paths Path(s) to Component(s) or a Context (default .).
--component <id> Replay samples for a specified component id.
--integration Replay integration tests only.
--autonomous Replay autonomous tests only.
--operation <name> Replay samples for specified operation.
--title <regexp> Regexp to match sample titles.
--dock Run in Docker. Applicable only for component samples.

Examples

$ toa replay
$ toa replay ./path/to/component
$ toa replay ./components/a ./components/b --dock
$ toa replay ./components/*
$ toa replay ./path/to/context
$ toa replay --title "should add numbers"

If the path is a Context root (containing context.toa.yaml file), samples for components within the Context will be found and replayed sequentially.

export manifest

toa export manifest
Print normalized manifest.

--path path to component (default .)
--error print errors only

Operations

Some commands use current kubectl and docker context.

build

Build Docker images.

toa build
--path path to a Context (default .)

deploy

Deploy a Context.

  • Build Docker images.
  • Push Docker images to the registry.
  • Build a Helm chart.
  • Apply the Helm chart to the current Kubernetes context.
toa deploy [environment]
environment deployment environment name (default default).
--path path to a Context (default .)
--namespace Kubernetes namespace to apply the Helm chat to
--wait wait until all Pods [are ready](https://helm.sh/docs/intro/using_helm/#helpful-options-for-installupgraderollback)
--dry do not apply the Helm chart

conceal

Deploy a generic Kubernetes secret with the prefix toa-.

toa conceal <secret> <key-values...>
secret Secret name.
key-values List of keys and values of the secret as key=value.
--namespace Kubernetes namespace where the secret should be deployed.
--interactive prompt for secret values
--environment environment name for interactive mode
--path path to a context for interactive mode

If a secret already exists, then given key-values will be added to it.

Example

$ toa conceal bindings-amqp-default username=developer password=secret

reveal

Outputs keys and values of a secret.

toa reveal <secret>

shell

Run interactive shell inside a disposable pod inside a Kubernetes cluster.

toa shell [image]
image Docker image to Run (default alpine).

Examples

$ toa shell mongo
$ toa shell -- ping 1.1 # extra arguments can be passed

key

Generate a secret PASETO key.

toa key
--public boolean generate a public/private key pair.

FAQs

Package last updated on 16 Nov 2023

Related posts