Skip to main content

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

Project description

trap

CI PyPI Python License: MIT

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 trap-cli

# from git (latest main)
uv tool install "git+https://github.com/trapstreet/trap.git"

The command is tp.

How it works

trap runs your solution as a subprocess with one env var (TRAP_MANIFEST — an input dir and an output dir), captures what it writes, then optionally scores it through a judge (per case) and a grader (overall). See the full flow and IO contract.

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

trap_cli-0.0.3.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

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

trap_cli-0.0.3-py3-none-any.whl (50.6 kB view details)

Uploaded Python 3

File details

Details for the file trap_cli-0.0.3.tar.gz.

File metadata

  • Download URL: trap_cli-0.0.3.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 trap_cli-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ae7f0596ff1c4d939718dafe0e968113c9d03730d389a1adc4deb204b5372690
MD5 2251d951aeae8c7ab5a83b190446be7f
BLAKE2b-256 50f2b6f7b8a87cd6ca8198b00b511bf08fa6328ad8c1be7cfc697fb8aa8416ed

See more details on using hashes here.

File details

Details for the file trap_cli-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: trap_cli-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 50.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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 trap_cli-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 94e222ba087f784fa4bf33131eaf76bfd20f94a9f8176a4a217ee71c4c4f5e26
MD5 0cf9a81687ccf3c84813c717aee9812b
BLAKE2b-256 38f52078ba4d2f5f284fbc71495bda75028c7c93c17ae3fbe9fa02412a9afcf7

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