tapid docs

tapid run

Run an explicit root package script with forwarded arguments.

Syntax

tapid run <SCRIPT> [-- <ARGS>...]

Run a root script from package.json in the selected project directory. tapid prepends the managed node_modules/.bin directory to PATH, forwards arguments after --, and returns the child process exit status.

Options

--project-dir PATH

Use a project directory other than the current directory.

How it behaves

The script must exist under the root manifest's scripts object. tapid runs it with the selected project directory as the working directory, passes through stdin, stdout, and stderr, and uses the platform shell: /bin/sh on Unix-like systems and cmd.exe on Windows. The project node_modules/.bin path is prepended to PATH.

Arguments after -- are forwarded to the script. For example, this manifest:

{
  "scripts": {
    "test": "node --test"
  }
}

can receive an extra argument with:

$ tapid run test -- --runInBand

The child process's exit status becomes tapid's exit status. A non-zero script result is therefore visible to CI and calling shell scripts.

Examples

$ tapid run --project-dir ./example test -- --runInBand
$ tapid run dev

Root scripts can execute arbitrary project code through the platform shell. This is compatibility-oriented process execution, not a sandbox or security boundary.

Common failures

  • A missing or invalid project directory stops the command.
  • A missing or invalid package.json stops the command before the script runs.
  • A script name that is not present in scripts is rejected.
  • tapid does not resolve dependencies or run dependency lifecycle scripts as part of run.