Skip to content

run-crank/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crank

CircleCI

BDD test automation for integrated SaaS, by Automaton.

Usage

$ 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
...

Commands

crank cog:auth COGNAME

(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

crank cog:install [COGNAME]

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

crank cog:readme [COGNAME]

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

crank cog:scaffold

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

crank cog:step COGNAME

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

crank cog:steps COGNAME

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

crank cog:uninstall COGNAME

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

crank help [COMMAND]

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

crank registry:cogs

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

crank registry:rebuild [COGNAME]

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

crank registry:steps

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

crank run FILE

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

crank update [CHANNEL]

update the crank CLI

USAGE
  $ crank update [CHANNEL]

See code: @oclif/plugin-update

Development

Contributions are welcome and encouraged. For any major changes or additions, please open up an issue first.

  1. Fork and clone this repository
  2. Run npm install to retrieve all packaged dependencies
  3. Run npm test to run any automated tests and check code style
  4. Modify commands and other code in the src folder (tests in test)
  5. Run modified commands by running ./bin/run from the root of your cloned project. For example, ./bin/run cog:step automatoninc/web would run the cog:step command modified within the repo, rather than the global crank cog:step command. Confusingly ./bin/run run is equivalent to running crank run.