-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hi! Some completions for a unknown CLI tool I use everyday 😇. It's been a while since I don't make a PR here, hehe
- Loading branch information
Showing
2 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Botmaker-CLI | ||
|
||
The [Botmaker-cli](https://www.npmjs.com/package/@botmaker.org/botmaker-cli) comes from | ||
a package in NPM `@botmaker.org/botmaker-cli` and it's intended to interact with | ||
bots created in the botmaker web platform. | ||
This CLI can: | ||
|
||
- run client actions | ||
- download the code of a bot (with the import token) | ||
- upload the code from the local to the remote | ||
- set the customer variables (impersonate other user variables in the local env) | ||
- show a status of the client actions | ||
- create a new client action | ||
- and rename an existing client action | ||
|
||
This `bmc` module particulary adds the completions for the [nushell](nushell.sh/) shell | ||
|
||
## How to install | ||
|
||
1- Install nushell in your computer | ||
2- Download the file in this folder `bmc-completions.nu`. | ||
3- Edit your `config.nu` to source that file in this folder. | ||
|
||
```nu | ||
source ~/your/location/to/bmc-completions.nu | ||
``` | ||
|
||
4- Restart your shell and you should be good to go! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# completions for botmaker-cli | ||
|
||
def "nu-complete list client actions" [] { | ||
glob **/*.js --depth 2 | path basename | ||
} | ||
|
||
export extern "bmc" [ | ||
command?: string # command | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Run a Botmaker Client Action Script | ||
export extern "bmc run" [ | ||
source: string@"nu-complete list client actions" # client action to run | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Import a new bussiness from a token | ||
export extern "bmc import" [ | ||
apiToken: string # command | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Load context for a customer | ||
export extern "bmc set-customer" [ | ||
customerId: string # command | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Show change status | ||
export extern "bmc status" [ | ||
caName?: string@"nu-complete list client actions" # client action to check | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Diff client actions states | ||
export extern "bmc diff" [ | ||
caName: string@"nu-complete list client actions" # client action to check | ||
code: string # command | ||
--help # Show help | ||
--version # Show version number | ||
--vs-code(-v) # Open in vs-code | ||
] | ||
|
||
# Pull incoming changes | ||
export extern "bmc pull" [ | ||
caName?: string@"nu-complete list client actions" # client action to pull | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Create a new client action | ||
export extern "bmc new" [ | ||
caName: string # command | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Push changes in client action | ||
export extern "bmc push" [ | ||
caName?: string@"nu-complete list client actions" # client action to push | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Publish changes in client action | ||
export extern "bmc publish" [ | ||
caName: string@"nu-complete list client actions" # client action to publish | ||
--help # Show help | ||
--version # Show version number | ||
] | ||
|
||
# Renames the given client action | ||
export extern "bmc rename" [ | ||
caOldName: string@"nu-complete list client actions" # client action to rename | ||
caNewName: string # new name | ||
--help # Show help | ||
--version # Show version number | ||
] |