CLI shim for tool-spec compliant tools. It runs inside Docker containers and handles metadata verification, conversion, input parsing, and parameter binding generation.
Part of the tool-spec ecosystem. See the specification for context.
These templates will use gotap (or already plan to):
- tool_template_python
- tool_template_r
- tool_template_node
- tool_template_typescript
- tool_template_octave
- tool_template_matlab
- tool_template_jupyter
| Command | Purpose |
|---|---|
parse |
Read input.json and tool.yml, validate, output validated parameters and data as JSON to stdout |
generate |
Generate language-specific parameter bindings (Python, R, JavaScript, MATLAB) that call gotap parse |
metadata |
Output tool metadata in schema.org or nfdi4earth format |
verify |
Validate tool-spec metadata and report errors/warnings |
prepare |
Create or update inputs.json via interactive CLI |
run |
Validate inputs and execute the tool entrypoint |
Flags are inherited from the root where relevant: --spec-file, --input-file, --citation-file, --license-file, --output-folder.
Version check: gotap --version or gotap -v.
gotap generate produces parameter access code for Python, R, JavaScript (plain or TypeScript), and MATLAB. Each binding runs gotap parse and returns structured parameters and data paths.
gotap generate --target=python --output=src/parameters.py --spec-file=src/tool.yml
gotap generate --target=r --output=src/parameters.R --spec-file=src/tool.yml
gotap generate --target=node-js --output=src/parameters.js --spec-file=src/tool.yml
gotap generate --target=node-ts --output=src/parameters.ts --spec-file=src/tool.yml
gotap generate --target=matlab --output=get_parameters.m --spec-file=src/tool.ymlnode-js: plain JavaScript (ESM), for Node.js projectsnode-ts: TypeScript with interfaces, for Node.js TypeScript projects
If the spec defines a single tool, you can omit the tool name. Otherwise pass it as the first argument or set RUN_TOOL.
The generate command overwrites the output file if it already exists.
-
Build gotap:
go build -ldflags "-X github.com/hydrocode-de/gotap/cmd.Version=$(git describe --tags --always --dirty)" -o gotap .
-
Regenerate bindings when
tool.ymlchanges:./gotap generate --target=python --output=src/parameters.py --spec-file=src/tool.yml
-
Either:
- Add generated files to
.gitignoreand regenerate as part of the build, or - Commit the generated files so they are always up to date and usable offline.
- Add generated files to
go build -ldflags "-X github.com/hydrocode-de/gotap/cmd.Version=$(git describe --tags --always --dirty)" -o gotap .