Skip to main content

tp — non-invasive CLI testing framework for AI workflows. Submits results to trapstreet.run.

Project description

trap

Lives at trapstreet-mvp/cli/ — part of the trapstreet monorepo.

Non-invasive CLI testing framework for AI prompts, agents, and workflows.

trap treats any solution as a black box — it invokes it as a subprocess, captures outputs, then optionally scores them through a language-agnostic judge and grader. The solution doesn't need to import trap or know it exists.

Install

# requires uv — https://docs.astral.sh/uv/getting-started/installation/

# from PyPI
uv tool install trapstreet-cli

# from git (latest main)
uv tool install "git+https://github.com/AntiNoise-ai/trapstreet-mvp.git#subdirectory=cli"

The command is tp.

How it works

inputs/{case_id}/   ──[INPUTS env var]──▶  solution  ──[OUTPUTS env var]──▶  .trap/{task}/{ts}/{case_id}/
expected/{case_id}/                                                                 │
       │                                                                            │
       └──────────────────────── judge  ◀──────────────────────────────────────────┘
                                   │
                            {metrics: any JSON}
                                   │
                  [collect all cases, hand to grader]
                                   │
                                grader

Two roles, two directories, one IO contract:

  • Solution author — writes trap.yaml and the solution code
  • Task author — writes traptask.yaml, inputs/, expected/, and optional judge/grader scripts

Quick start

# from examples/echo/solution/
tp run           # run all cases
tp run -t smoke  # run only cases tagged `smoke`

Documentation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trapstreet_cli-0.3.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trapstreet_cli-0.3.0-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file trapstreet_cli-0.3.0.tar.gz.

File metadata

  • Download URL: trapstreet_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for trapstreet_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5b21e9f348d68dbfaa8b9a9465607c9ec69393564aa7d4f57304b8e727a4f7d4
MD5 5cbc20fedf427903baabf3e5d911e5be
BLAKE2b-256 11a82bc5df9fff6e156c9e504513b8c063c9716a42372dae02f91d7083df6007

See more details on using hashes here.

File details

Details for the file trapstreet_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: trapstreet_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 33.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for trapstreet_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb51d409225eb8d28917ca7b7e996a7528f88fdf01831dd009a356c2d79d1bc
MD5 574bff2b6974f880e1b1b6fa5ce80533
BLAKE2b-256 f2f26cad00454e52ecf87398993cb3497d35f3a5efe9e112f015ee8407565eab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page