Skip to main content

TypeSafe agent CLI

typesafe is an agent CLI for TypeSafe Jev.

It is meant to be invoked by coding agents (Grok, Codex, Claude Code, Cursor, and anything else that can run a shell command). You can run it yourself while you debug; the usual caller is an agent.

Jev does not chat. The agent gathers a small JSON document (state) and typed questions (noul, choice, score). This CLI sends that to POST /v1/systemone and prints probabilities on stdout. Jev never sees the repo unless the agent copies the relevant slices into state.

You do not hand-write production payloads every day. Install the typesafe-cli skill, and the agent writes the JSON (in a temp directory, not in git). The files under examples/ exist so you can see the shape, and so you can run a call without inventing one.

JSON shape

Two files. Names are yours; types are not.

state.json — named fields the questions will point at:

{
  "message": "I was charged twice for order A-104. Please refund the duplicate.",
  "policy": "Duplicate charges are eligible for an immediate refund."
}

questions.json — one judgment per id. instructions should backtick those fields (`message`):

{
  "refund_requested": {
    "type": "noul",
    "instructions": "Does `message` request a refund?"
  },
  "intent": {
    "type": "choice",
    "instructions": "What does `message` ask for?",
    "criteria": {
      "refund": "The customer wants money returned",
      "information": "Explanation only",
      "other": "Something else"
    }
  }
}

Full copies, including a code-change example with files[].hunk:

Sample Files
Support ticket examples/ticket/state.json, questions.json
Skill / code slice examples/code-change/state.json, questions.json
How to run them examples/README.md
WORKDIR="${TMPDIR:-/tmp}/codex/typesafeai-cli"
mkdir -p "$WORKDIR"
cp examples/ticket/*.json "$WORKDIR/"
typesafe ask --state-file "$WORKDIR/state.json" --questions-file "$WORKDIR/questions.json"

One-liners skip files: typesafe noul "Does this request a refund?" --state "I was charged twice."

If data.model looks like jev-1.13.0, the request reached TypeSafe. auth status does not.

What the agent is supposed to do

  1. typesafe skills install (once) so typesafe-cli and the official TypeSafe skill are on disk.
  2. typesafe auth status — read has_key only. Agents must not print or open TYPESAFE_* or key files.
  3. Write questions first. Each instruction backticks the state paths it needs. That list is what to collect.
  4. Fill only those paths. If a path is code, put the hunk body in, not a filename.
  5. Write JSON under ${TMPDIR:-/tmp}/codex/<project>/, never in the git tree.
  6. typesafe ask. Apply thresholds in the agent (a noul near 0.5 is unsure). Jev does not pick the next tool.

typesafe agent schema is the machine-readable command list. --agent makes --help JSON.

Install

Python 3.10+ and a key from the TypeSafe console.

export TYPESAFE_API_KEY=apikey_…

pip install typesafeai-cli
# or: pipx install typesafeai-cli
# or clone, then: uv sync && uv run typesafe --help

install.sh on the repo and on each release can also install the GitHub wheel. Optional: TYPESAFE_BASE_URL, TYPESAFE_DEFAULT_MODEL. --key / --creds are for scripts, not for agents scraping secrets.

Commands

typesafe ask State file + questions file
typesafe noul / choice / score One question
typesafe find Search a local file by plain-language query
typesafe rank Rerank a JSON shortlist
typesafe extract Pick a verbatim span (email / phone / money / --candidates)
typesafe verify Check a claim against a source (missing quote → fabricated)
typesafe screen Jailbreak / injection / sensitive-data / harm gate
typesafe suggest-skill At most one skill name, or none
typesafe decide Map nouls/choices to no / uncertain / yes (no HTTP)
typesafe models Aliases (jev-latest, …)
typesafe smoke Live docs quickstart
typesafe auth status has_key; never prints the key
typesafe agent schema JSON command tree
typesafe skills install Official TypeSafe skill + typesafe-cli

Exit 0 answered, 1 request failed (including missing key on ask), 2 bad flags or questions (no HTTP).

Releases

A merge to main that passes CI ships automatically: patch bump, tag vX.Y.Z, GitHub release, PyPI (release.yml, environment pypi). Start the merge commit with [skip release] to skip. For a minor or major, run Prepare Release and pick the bump.

Match version in pyproject.toml to __version__ in src/typesafe_cli/__init__.py if you tag by hand.

Metadata

Release files for typesafeai-cli 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for typesafeai-cli 0.3.1
File Size Uploaded
typesafeai_cli-0.3.1.tar.gz 31.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for typesafeai-cli 0.3.1
File Interpreter ABI Platform
typesafeai_cli-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 76.1 kB

Release files / typesafeai_cli-0.3.1.tar.gz

Download URL typesafeai_cli-0.3.1.tar.gz
Size 31.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8eb0ac34ff9f4d30f04e4ee8f5b9a5a368552afebeab7de429329afc9261cc31
BLAKE2b-256 checksum
How to use checksums
223d2d2273722f184d2f0539293406f7a2c05a953a7bbdfd082ecf58077fe794
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / typesafeai_cli-0.3.1-py3-none-any.whl

Download URL typesafeai_cli-0.3.1-py3-none-any.whl
Size 44.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed281b1680dfe846cac8d65de089d0a94006fddee2b26cfcba1105f1919dddf3
BLAKE2b-256 checksum
How to use checksums
baddc0985abd009fa45e415d9192198789c4842f27f6e0ed7a93a033d8a0b154
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.3

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page