BDD test automation for integrated SaaS, by Automaton.
$ curl -s https://get.crank.run/install.sh | sh
$ crank COMMAND
running command...
$ crank (-v|--version|version)
crank/x.y.z darwin-x64 node-vA.B.C
$ crank --help [COMMAND]
USAGE
$ crank COMMAND
...
crank cog:auth COGNAME
crank cog:install [COGNAME]
crank cog:readme [COGNAME]
crank cog:scaffold
crank cog:step COGNAME
crank cog:steps COGNAME
crank cog:uninstall COGNAME
crank help [COMMAND]
crank registry:cogs
crank registry:rebuild [COGNAME]
crank registry:steps
crank run FILE
crank update [CHANNEL]
(Re-)Authenticate an installed Cog.
USAGE
$ crank cog:auth COGNAME
ARGUMENTS
COGNAME The name/version of the Cog to authenticate.
EXAMPLE
$ crank cog:auth MyCog
See code: src/commands/cog/auth.ts
Install a Cog on this system. Make sure to run npm install
beforehand or it may get stuck while trying to use a local version.
USAGE
$ crank cog:install [COGNAME]
ARGUMENTS
COGNAME The name:version of the Cog to install (e.g. org-name/cog-name:1.0.0)
OPTIONS
-f, --force Install this Cog over any preexisting installation with the same name
--debug More verbose output to aid in diagnosing issues using Crank
--ignore-auth Suppress prompts for Cog auth details
--local-start-command=local-start-command Command to start the local Cog (used in combo with --source=local)
--source=source [default: docker] Use if you are installing a locally developed Cog.
EXAMPLE
$ crank install --source=local
See code: src/commands/cog/install.ts
Adds usage instructions to README.md in current directory
USAGE
$ crank cog:readme [COGNAME]
ARGUMENTS
COGNAME The name of the Cog the README.md represents
DESCRIPTION
The readme must have any of the following tags inside of it for it to be replaced or else it will do nothing:
### Authentication
<!-- authenticationDetails -->
### Steps
<!-- stepDetails -->
See code: src/commands/cog/readme.ts
Generate boilerplate code for a new Cog in a language of your choice.
USAGE
$ crank cog:scaffold
OPTIONS
-o, --output-directory=output-directory [default: /Users/eapeterson/Sites/automaton/crank] The directory where
scaffolded code will be placed (defaults to the current working directory).
--copyright-owner=copyright-owner Name of the copyright owner to include in the license file, if specified.
--[no-]include-example-step Scaffolded code will include an example step and tests (prepend with --no- to
negate)
--[no-]include-mit-license Scaffolded code will include MIT license text in LICENSE file at the project
root.
--language=typescript The programming language you want to use to build your cog.
--name=name The friendly, human name of your cog
--org=org Your organization's name (e.g. from docker hub or github)
EXAMPLE
$ crank cog:scaffold
See code: src/commands/cog/scaffold.ts
Run a single Cog step interactively.
USAGE
$ crank cog:step COGNAME
OPTIONS
-s, --use-ssl Use SSL to secure communications between crank and all cogs (useful for testing SSL support for cogs
you are building).
--debug More verbose output to aid in diagnosing issues using Crank
--step=step The stepId of the step you wish to run
EXAMPLES
$ crank cog:step MyCog
$ crank cog:step MyCog --step=MyStepId
See code: src/commands/cog/step.ts
Run multiple Cog steps interactively.
USAGE
$ crank cog:steps COGNAME
OPTIONS
-s, --use-ssl Use SSL when invoking all Cogs (useful for testing SSL support for Cogs you are building).
--debug More verbose output to aid in diagnosing issues using Crank
--step=step The stepId of the step you wish to run. Provide multiple steps by passing this flag multiple times.
EXAMPLE
$ crank cog:steps MyCog
See code: src/commands/cog/steps.ts
Uninstall a Cog from this system.
USAGE
$ crank cog:uninstall COGNAME
OPTIONS
--debug More verbose output to aid in diagnosing issues using Crank
--force Will uninstall the Cog without prompting for confirmation
--ignore-auth Will retain any Cog auth details in cache
--keep-docker-image Will keep the docker image associated with the Cog
EXAMPLE
$ crank uninstall automatoninc/my-cog
See code: src/commands/cog/uninstall.ts
display help for crank
USAGE
$ crank help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
List Cogs that are currently installed on this machine
USAGE
$ crank registry:cogs
OPTIONS
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
$ crank registry:cogs
$ crank registry:cogs --extended --no-truncate
See code: src/commands/registry/cogs.ts
Rebuild the Cog registry (not unlike blowing on an old video game cartridge)
USAGE
$ crank registry:rebuild [COGNAME]
ARGUMENTS
COGNAME The name of a specific Cog whose registry entry should be rebuilt
EXAMPLES
$ crank registry:rebuild
$ crank registry:rebuild my-org/my-cog
See code: src/commands/registry/rebuild.ts
List steps that are currently available on this machine
USAGE
$ crank registry:steps
OPTIONS
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
$ crank registry:steps
$ crank registry:steps --extended --no-truncate
See code: src/commands/registry/steps.ts
Run a .crank.yml scenario file or folder of files.
USAGE
$ crank run FILE
OPTIONS
-s, --use-ssl Use SSL to secure communications between crank and all cogs (useful for testing SSL support for
cogs you are building).
-t, --token=token Set one or more contextual token values for this scenario; provide several by passing this flag
multiple times.
--debug More verbose output to aid in diagnosing issues using Crank
EXAMPLES
$ crank run /path/to/scenario.crank.yml
$ crank run --use-ssl /path/to/scenario-folder
$ crank run scenario.crank.yml --token utmSource=Email -t "utmCampaign=Test Campaign"
See code: src/commands/run.ts
update the crank CLI
USAGE
$ crank update [CHANNEL]
See code: @oclif/plugin-update
Contributions are welcome and encouraged. For any major changes or additions, please open up an issue first.
- Fork and clone this repository
- Run
npm install
to retrieve all packaged dependencies - Run
npm test
to run any automated tests and check code style - Modify commands and other code in the
src
folder (tests intest
) - Run modified commands by running
./bin/run
from the root of your cloned project. For example,./bin/run cog:step automatoninc/web
would run thecog:step
command modified within the repo, rather than the globalcrank cog:step
command. Confusingly./bin/run run
is equivalent to runningcrank run
.