Wisco
Wisco is a small Ruby CLI for working with Workato connector projects.
It helps with three common tasks:
- Detecting a connector file and creating local project configuration
- Inspecting connector structure from the command line
- Running connector field and execute flows through the Workato Connector SDK CLI
The tool is designed for local development against a connector project directory and uses a per-project config file named .wisco.json.
Features
-
initdiscovers a connector file and writes.wisco.json -
listprints a structural overview of a connector -
list actionsandlist triggersrender markdown-friendly tables -
list allcombines overview, actions, and triggers output -
exec --mode=fieldsgenerates fixture files for input and output fields -
exec --mode=executeruns connector methods with prepared input files
Requirements
- Ruby
2.7.6 - Bundler
- The gems listed in Gemfile
Current runtime dependencies:
activesupport ~> 7.0.0workato-connector-sdk 1.3.19
Installation
Clone the repository and install dependencies:
bundle installRun the CLI from the repository root:
bundle exec ruby wisco.rb --helpOn Windows, you can also use wisco.bat.
Quick Start
From inside a Workato connector project directory:
bundle exec ruby /path/to/wisco.rb init
bundle exec ruby /path/to/wisco.rb listThe init command creates a .wisco.json file in the target directory. That file stores the detected connector path and filename so later commands can load the connector consistently.
Example:
{
"connector": {
"path": "/path/to/connector/project",
"file": "connector.rb"
}
}Commands
init [path]
Detects a connector file and creates or updates .wisco.json.
If no path is provided, the current directory is used.
Examples:
bundle exec ruby wisco.rb init
bundle exec ruby wisco.rb init ./my-connectorlist [path]
Prints a tree view of the top-level connector structure.
Examples:
bundle exec ruby wisco.rb list
bundle exec ruby wisco.rb list ./my-connectorlist actions [path]
Prints actions as a markdown table.
bundle exec ruby wisco.rb list actionslist triggers [path]
Prints triggers as a markdown table.
bundle exec ruby wisco.rb list triggerslist all [path]
Prints the overview, actions, and triggers together.
bundle exec ruby wisco.rb list allexec <path> [target_dir]
Runs connector execution flows.
Accepted path forms:
actions.some_actiontriggers.some_triggeractionstriggers-
some_actionorsome_triggerwhen the key is unique across sections
Field mode
Use field mode to generate fixture files for a connector method:
bundle exec ruby wisco.rb exec actions.get_users --mode=fieldsThis creates files under fixtures/<section>/<key>/, including:
input_fields.jsonoutput_fields.jsonexecute_input.json
The generated execute_input.json starts with a sentinel comment so you can distinguish an untouched template from real input.
Execute mode
Use execute mode to run one or more prepared inputs:
bundle exec ruby wisco.rb exec actions.get_users --mode=execute
bundle exec ruby wisco.rb exec actions.get_users --mode=execute --input=execute_input.jsonOutputs are written into the same fixture directory as:
output_<input>.json-
error_<input>.txtwhen execution fails
Exec options
-
--mode=executeruns the action or trigger execution path -
--mode=fieldsfetches input and output field schemas -
--input=file.jsonselects a specific execute input file -
--overwrite=trueoverwrites a generated execute input template -
--debugprints execution details
Configuration
Wisco uses .wisco.json in the target connector directory.
At minimum, it stores:
connector.pathconnector.file
It may also contain connection data used during execution.
Typical Workflow
bundle exec ruby wisco.rb init
bundle exec ruby wisco.rb list all
bundle exec ruby wisco.rb exec actions.get_users --mode=fields
# edit fixtures/actions/get_users/execute_input.json
bundle exec ruby wisco.rb exec actions.get_users --mode=executeProject Structure
wisco.rb
wisco.bat
lib/
config.rb
connector.rb
commands/
init.rb
list.rb
exec.rb
helpers/
Development Notes
- The project uses
Workato::CLI::ExecCommandfrom the Workato Connector SDK. - Connector files are evaluated locally to discover and load connector definitions.
-
connector.rbis preferred during detection, but other.rbfiles in the target directory are also considered.