Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
wash UX improvements, writing up a README (#80)
Browse files Browse the repository at this point in the history
* removed all wascc mentions, fixes #73

* included newline between spinner and text output in ctl, fixes #71

* reduced default timeout to 1 second, fixes #77

* update README

added contributions section

* addressed PR comments, included tools README
  • Loading branch information
brooksmtownsend authored Feb 8, 2021
1 parent b3ddc17 commit 1c4ff69
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 206 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "wash-cli"
version = "0.1.17"
version = "0.1.18"
authors = ["Brooks Townsend <[email protected]>"]
edition = "2018"
repository = "https://github.com/wasmcloud/wash"
description = "wasmCloud Shell (wash) CLI tool"
license = "Apache-2.0"
readme = "README.md"
keywords = ["webassembly", "wasmcloud", "wash"]
keywords = ["webassembly", "wasmcloud", "wash", "cli"]
categories = ["wasm", "command-line-utilities"]

[badges]
Expand Down
201 changes: 26 additions & 175 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,187 +1,38 @@
# wash
wasmCloud Shell - A single CLI to handle all of your wasmCloud tooling needs
![Latest Release](https://img.shields.io/github/v/release/wasmcloud/wash?color=success&include_prereleases)
![Rust Build](https://img.shields.io/github/workflow/status/wasmcloud/wash/Rust/main)
[![Rust Version](https://img.shields.io/badge/rustc-1.49.0-orange.svg)](https://blog.rust-lang.org/2020/12/31/Rust-1.49.0.html)
![Contributors](https://img.shields.io/github/contributors/wasmcloud/wash)
![Good first issues](https://img.shields.io/github/issues/wasmcloud/wash/good%20first%20issue?label=good%20first%20issues)
```
_____ _ _ _____ _ _ _
/ ____| | | | / ____| | | | |
__ ____ _ ___ _ __ ___ | | | | ___ _ _ __| | | (___ | |__ ___| | |
\ \ /\ / / _` / __| '_ ` _ \| | | |/ _ \| | | |/ _` | \___ \| '_ \ / _ \ | |
\ V V / (_| \__ \ | | | | | |____| | (_) | |_| | (_| | ____) | | | | __/ | |
\_/\_/ \__,_|___/_| |_| |_|\_____|_|\___/ \__,_|\__,_| |_____/|_| |_|\___|_|_|
```
## Why wash
`wash` is a bundle of command line tools that, together, form a comprehensive CLI for [wasmCloud](https://github.com/wasmcloud/wasmcloud) development. Everything from generating signing keys to a fully interactive REPL environment is contained within the subcommands of `wash`. Our goal with `wash` is to encapsulate our tools into a single binary to make developing WebAssembly with wasmCloud painless and simple.

## Installing wash
```
cargo install --git https://github.com/wasmcloud/wash --tag v0.1.16
cargo install --git https://github.com/wasmcloud/wash --tag v0.1.18
```

## Using wash
```
wash <subcommand> [args]
```

## Subcommands

`wash` has multiple subcommands, each specializing in one specific area of the wasmCloud development process.
### claims

```
USAGE:
wash claims inspect [FLAGS] <file>
FLAGS:
-h, --help Prints help information
-r, --raw Extract the raw JWT from the file and print to stdout
ARGS:
<file> The WASM file to inspect
```

```
USAGE:
wash claims sign [FLAGS] [OPTIONS] <module> <output> --name <name>
FLAGS:
-f, --blob_store Enable access to the blob store capability
-e, --events Enable access to an append-only event stream provider
-z, --extras Enable access to the extras functionality (random nos, guids, etc)
--help Prints help information
-h, --http_client Enable the HTTP client standard capability
-s, --http_server Enable the HTTP server standard capability
-k, --keyvalue Enable the Key/Value Store standard capability
-l, --logging Enable access to logging capability
-g, --msg Enable the Message broker standard capability
-p, --prov Indicates whether the signed module is a capability provider instead of an actor (the default is actor)
OPTIONS:
-c, --cap <capabilities>... Add custom capabilities
-x, --expires <expires-in-days> Indicates the token expires in the given amount of days. If this option is left
off, the token will never expire
-i, --issuer <issuer-key-path> Issuer seed key path (usually a .nk file). If this option is left off, `wash` will attempt to locate an account key at `$HOME/.wash/keys/<module>_account.nk`, and if it is not found then an issuer key will be generated and placed in `$HOME/.wash/keys/<module>_account.nk`. You can also override this directory by setting the `WASH_KEYS` environment variable.
-n, --name <name> A human-readable, descriptive name for the token
-b, --nbf <not-before-days> Period in days that must elapse before this token is valid. If this option is
left off, the token will be valid immediately
-r, --rev <rev> Revision number
-u, --subject <subject-key-path> Subject seed key path (usually a .nk file). If this option is left off, `wash` will attempt to locate a module key at `$HOME/.wash/keys/<module>_module.nk`, and if it is not found then a module key will be generated and placed in `$HOME/.wash/keys/<module>_module.nk`. You can also override this directory by setting the `WASH_KEYS` environment variable.
-t, --tag <tags>... A list of arbitrary tags to be embedded in the token
-v, --ver <ver> Human-readable version string
ARGS:
<module> WASM to read
<output> Target output file. Defaults to `<module_location>/<module>_signed.wasm`
```

```
USAGE:
wash claims token <tokentype>
FLAGS:
-h, --help Prints help information
SUBCOMMANDS:
account Generate a signed JWT for an account
actor Generate a signed JWT for an actor module
operator Generate a signed JWT for an operator
```

Generate JWTs for actors, capability providers, accounts and operators. Sign actor modules with claims including capability IDs, expiration, and keys to verify identity. Inspect actor modules to view their claims.
### ctl
Interact directly with a wasmCloud [control-interface](https://github.com/wasmCloud/wasmCloud/tree/main/crates/control-interface), allowing you to imperatively schedule actors, providers and modify configurations of a wasmCloud host. Can be used to interact with local and remote control-interfaces.
### keys

```
USAGE:
wash keys gen <keytype>
FLAGS:
-h, --help Prints help information
ARGS:
<keytype> The type of keypair to generate. May be Account, User, Module (Actor), Server, Operator, Cluster, Service (Capability Provider)
```

```
USAGE:
wash keys get [OPTIONS] <keyname>
FLAGS:
-h, --help Prints help information
OPTIONS:
-d, --directory <keysdirectory> The directory where keys are stored for listing. Defaults to `$HOME/.wash/keys`, and can also be overwritten by setting the WASH_KEYS environment variable.
ARGS:
<keyname> The name of the key to output
```

```
USAGE:
wash keys list [OPTIONS]
FLAGS:
-h, --help Prints help information
OPTIONS:
-d, --directory <keysdirectory> The directory where keys are stored for listing. Defaults to `$HOME/.wash/keys`, and can also be overwritten by setting the WASH_KEYS environment variable.
```

### lattice

```
USAGE:
wash lattice [FLAGS] [OPTIONS] <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-j, --json Render the output in JSON (if the command supports it)
-V, --version Prints version information
OPTIONS:
-t, --timeout <call-timeout> Lattice invocation / request timeout period, in milliseconds [env:
LATTICE_RPC_TIMEOUT_MILLIS] [default: 600]
-c, --creds <creds> Credentials file used to authenticate against NATS [env: LATTICE_CREDS_FILE]
-n, --namespace <namespace> Lattice namespace [env: LATTICE_NAMESPACE]
-u, --url <url> The host IP of the nearest NATS server/leaf node to connect to the lattice [env:
LATTICE_HOST] [default: 127.0.0.1]
SUBCOMMANDS:
list List entities of various types within the lattice
start Hold a lattice auction for a given actor and start it if a suitable host is found
stop Tell a given host to terminate the given actor
watch Watch events on the lattice
```

Generate ed25519 keys for securely signing and identifying wasmCloud entities (actors, providers, hosts). Read more about our decision to use ed25519 keys in our [ADR](https://wasmcloud.github.io/adr/0005-security-nkeys.html)
### par

```
USAGE:
wash par <SUBCOMMAND> [FLAGS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
create Build a provider archive file
insert Insert a provider into a provider archive file
inspect Inspect a provider archive file
```

Create, modify and inspect [provider archives](https://github.com/wasmCloud/provider-archive), a TAR format that contains a signed JWT and OS/Architecture specific binaries for native capability providers.
### reg

```
USAGE:
wash reg <SUBCOMMAND> <artifact> [FLAGS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
pull Downloads a blob from an OCI compliant registry
push Uploads a blob to an OCI compliant registry
ARGS:
<artifact> URI of the artifact
```

Push and Pull actors and capability providers to/from OCI compliant registries. Used extensively in our own CI/CD and in local development, where a local registry is used to store your development artifacts.
### up
Starts an interactive REPL session for wasmCloud development
```
USAGE:
wash up [FLAGS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
Launch a fully interactive wasmCloud REPL environment, where all of the above subcommands are available to you. `Up` provides you with a wasmCloud host, so you can get started running actors and providers without ever touching a line of code.

SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
```
## Contributing to wash
If you have any feature suggestions, find any bugs, or otherwise have a question, please submit an issue [here](https://github.com/wasmCloud/wash/issues/new). Forking & submitting Pull Requests are welcome, and the [good first issue](https://github.com/wasmCloud/wash/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) label is a great way to find a place to start if you're looking to contribute.
2 changes: 1 addition & 1 deletion build/nfpm.amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: |
wasmCloud Shell
A single CLI to handle all of your wasmCloud tooling needs
vendor: wasmCloud
homepage: https://wascc.dev
homepage: https://wasmcloud.dev
license: Apache-2.0
contents:
- src: target/release/wash
Expand Down
8 changes: 4 additions & 4 deletions build/nfpm.arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ section: default
priority: extra
maintainer: Bill Young <[email protected]>
description: |
waSCC Shell
A single CLI to handle all of your waSCC tooling needs
vendor: waSCC
homepage: https://wascc.dev
wasmCloud Shell
A single CLI to handle all of your wasmCloud tooling needs
vendor: wasmCloud
homepage: https://wasmCloud.dev
license: Apache-2.0
files:
target/armv7-unknown-linux-gnueabihf/release/wash: "/usr/local/bin/wash"
Loading

0 comments on commit 1c4ff69

Please sign in to comment.