Skip to main content

ProbeGate CLI

Scan a running local chatbot, run tests with your permission, and view the results in your ProbeGate Project. See the Vietnamese web and CLI user guide for setup and troubleshooting.

Quick start

Two commands take you from install to results. start logs you in if needed, finds or creates a Project, identifies the chatbot, and runs an assessment, asking only the test type and one confirmation screen.

python -m pip install --upgrade probegate-cli
probegate login --platform https://api.probegate.online --email you@example.com   # optional; start will ask
probegate start https://your-chatbot.example.com      # cloud chatbot by URL
probegate start .                                      # or a running local chatbot in this folder
probegate                                              # re-run the last assessment

Add --category security|safety|quality and --yes to skip both questions (for CI), --deep for a Pipeline + Agent run, or --quick for a smaller budget.

New in 0.3.1: budget-stopped Agent runs report PASS and exit 0; --deep re-runs are compared.

New in 0.3.0: start, bare probegate re-run with run-to-run comparison, token prompt for protected chatbots, and stable local chatbot names.

Which package?

Option Use it when What runs
--quick A fast check after each fix The suite with a smaller request budget
(default) A normal assessment The full published suite (Pipeline)
--deep Before a release The suite, then an Agent that asks follow-up questions based on earlier answers to find what a fixed suite misses; slower and uses more model tokens

PASS/FAIL always comes from Code Check and the LLM Judge, never from the Agent itself. Re-running with bare probegate compares against the previous run of the same chatbot and category: fixed, regressed and still not passing.

Troubleshooting

  • The chatbot needs a token. If the chatbot rejects the first probe, start asks once for its token (hidden input) and retries. If it still fails, check the URL and token.
  • No chatbot found in this folder. Start the chatbot first. If the port cannot be inferred, pass --endpoint http://127.0.0.1:<port>; add --auth if it needs a bearer token.
  • No published <CATEGORY> suite. Ask a Project Owner to publish one, or run probegate suite prepare.
  • Run ends STOPPED (exit code 3). It hit its time or request budget. Check that the chatbot answers quickly, or try --quick. Ctrl+C only detaches; it never stops a cloud run.
  • Local testing is unavailable. The platform has local runs switched off; see below.

Running the platform yourself

Cloud runs (start <URL>) need only the API and worker. Local runs (start .) also need LOCAL_RUNNER_ENABLED=true, a LOCAL_RUNNER_PEPPER of at least 32 characters, and the local scheduler (python -m backend.scripts.local_scheduler) running next to the API and worker.

Advanced commands

probegate scan
probegate local
# Optional hints when a port cannot be inferred:
probegate local --endpoint http://127.0.0.1:8000 --project <uuid> --suite <uuid>
probegate local --mode agent --max-requests 10 --max-steps 5 --max-tokens 10000 --timeout-s 120
probegate local --resume <private-journal-path>

Create an account at https://probegate.online/register, then sign in to the CLI with the same email and password. If registration is restricted, contact your administrator or ask a Project Owner for an invitation. Replace you@example.com with your email.

Use https://api.probegate.online as the platform address, without /api/v1.

Discovery reads bounded project text and live loopback OpenAPI, never executes project code, reads .env, starts applications or sends chat messages. RAG findings are signs from code, not verified retrieval. First support: REST JSON POST with one string-message input and an unambiguous string-answer mapping, running FastAPI/OpenAPI. Unknown or unsupported OpenAPI operations require input instead of guessing. Bearer auth is detected and prompted locally after consent; other auth schemes require integration. No browser/SSE/WebSocket.

local automatically selects only a single matching project/suite/endpoint, otherwise asks. An existing published suite is required. Owner privileges are needed for initial runner/target enrollment and authorization. Credentials use OS keyring; --auth prompts for an optional local bearer token after consent. No plaintext fallback. Only loopback, no LAN/subnet scan. Consent covers one probe, displayed budgets and sending redacted conversations to the platform and its Judge/Reason providers. No source or target credentials are uploaded.

If local testing is unavailable on your platform, contact your administrator to enable it.

Local Ctrl+C stops new requests and best-effort cancels; cloud watch Ctrl+C still only detaches. Lost claims/crashes never resend target requests. Recovery replays only run creation with the same key or a redacted submission. User-only journals are capped at 100files/20MiB/24hours. Redacted client leak signals require human review.

Existing cloud commands

For cloud commands, assessments execute on existing platform workers. Prepare Project, authorized Target and published Suite on the platform first. No backend, DB, Redis, MinIO or LLM key is required on the client.

probegate login --platform https://api.probegate.online --email you@example.com
probegate init --project <uuid> --target <uuid> --suite <uuid> --suite-version 1.0 --category QUALITY --overwrite
probegate run --mode pipeline --max-requests 20 --timeout-s 120 --yes --json
probegate run --mode agent --max-requests 10 --timeout-s 120 --max-steps 10 --max-tokens 2000 --yes --json
probegate watch --run <uuid>
probegate watch --run <uuid> --once --json
probegate findings --run <uuid> --json
probegate stop --run <uuid> --yes --json
probegate report --run <uuid> --format json --output report.json --json
probegate report --run <uuid> --format html --output report.html
probegate logout

--platform is an origin, without /api/v1; the client adds that existing prefix. Remote origins require HTTPS. HTTP is accepted only for explicit localhost/127.0.0.1/::1 origins. TLS verification stays enabled. Redirects and ambient HTTP proxy configuration are disabled, so bearer credentials cannot be forwarded to a redirected origin.

Passwords are prompted with hidden input, never accepted as arguments. Native Windows Credential Manager and Linux Secret Service are supported secure stores. A missing, locked or unsupported backend fails loudly. There is no plaintext fallback. An explicit PROBEGATE_TOKEN overrides the saved token; logout cannot unset it in the parent shell or revoke the JWT server-side. A saved token is scoped to platform origin and account. Use PROBEGATE_ACCOUNT or init --account to select an account for data commands.

Config contains non-secret defaults only. Paths default to platformdirs user config/state locations. Override them with PROBEGATE_CONFIG (file) and PROBEGATE_STATE_DIR (directory). Configuration precedence is flags > PROBEGATE_PLATFORM/PROBEGATE_ACCOUNT > config. Resource IDs, category, version and polling interval come from flags/config; resource-ID environment variables are not supported. Poll interval defaults to 2 seconds and may be changed by init --polling-interval or watch --interval (0.2–60 seconds). Malformed config fails; repair it or select a new config file. init replaces existing config only after interactive confirmation or --overwrite.

Run budgets are mandatory. Each cloud invocation creates one PIPELINE, independent AGENT, or combined Pipeline + Agent run. Project defaults are explicitly disabled (use_project_defaults:false), so they cannot silently add strategies/rubric/profile. Agent uses the server's documented strategy defaults; this CLI does not expose custom strategies. Confirmation displays the exact request plus Project ID. Noninteractive submission and stop require --yes. Target authorization, suite publication, tenant/RBAC and execution limits continue to be enforced by the backend and worker.

Cloud Pipeline + Agent

After configuring an authorized Target and a published Suite, opt in explicitly:

probegate run --mode agent --pipeline-first --max-requests 30 --max-steps 10 --max-tokens 10000 --timeout-s 120

This submits one AGENT run with agent_config.pipeline_first:true. Platform workers run every suite case once, then explore PASS cases, prioritizing lower Judge scores. --max-requests is shared by both phases and must exceed the number of suite cases; the backend validates the current suite size. For example, a 20-case suite with a 30-request budget leaves at most 10 requests for exploration. Deployment budget caps still apply. --timeout-s applies only to Agent exploration; the suite phase uses the server per-request timeout, so it is not a whole-run wall-clock deadline. If no suite case passes, the Agent phase can have zero steps.

--pipeline-first requires --mode agent and explicit positive Agent budgets. Leaving it out keeps independent Agent behavior. Watch/stop/report use the single returned run ID. Watch displays suite case verdicts separately from reserved Agent steps; only terminal server status ends polling. JSON retains the server outcome. Resume uses the saved flag/body/key; neither --pipeline-first nor --no-pipeline-first may be supplied with --resume-intent. For local execution, use the same explicit selection:

probegate local --mode agent --pipeline-first --max-requests 30 --max-steps 6 --max-tokens 20000 --timeout-s 120

Local mode counts one connection probe in the shared request budget: it must exceed suite size plus one. The suite runs first; only PASS cases seed Agent exploration. Agent time starts after suite scoring, while durable model-token accounting covers both phases. The initial suite/probe phase also has a bounded server deadline. Request leases, cancellation, redaction and recovery remain enforced. Resume uses the saved selection and rejects flag overrides.

The combined flags require an up-to-date CLI and a platform deployment supporting local combined execution.

Cloud resource IDs retain the exact compact (32 hex characters) or hyphenated UUID text returned by the API. This also applies to config, intent recovery and run watch/stop/report routes; IDs are validated without adding or removing hyphens.

Before creating a run, the client writes an atomic non-secret intent containing UUID, origin, Project, idempotency key, exact body, timestamp and nullable run ID. If POST loses its response, keep that intent and resume explicitly:

probegate run --resume-intent <intent-uuid> --yes --json

Select the original origin through config or PROBEGATE_PLATFORM; resume forbids all origin/payload flags. It reuses the saved Project/body/key. If the run ID was already saved, it returns that ID without POST. If response persistence failed after creation, resubmitting the same intent still recovers the server run. Never edit a journal to create a new payload or remove it while recovering. Same key/different body is a backend 409. POSTs never automatically retry. Auth failures require explicit login and explicit retry; the client never replays writes after login automatically.

GET retries transport errors, 5xx and 429 at most three times after the initial attempt. Delays are 1/2/4 seconds; Retry-After seconds/date is capped at 30 seconds per retry. Other HTTP errors do not retry. Each HTTP request has a 15 second timeout, separate from the run's worker execution timeout. Watch exits after exhausted retries without changing server state. Ctrl+C detaches (130) and prints attach/stop instructions.

Agent progress means reserved steps, and remaining means unused capacity. COMPLETED does not imply PASS. Finding states remain server-owned; pending findings are not confirmed bugs. Status does not depend on findings/report permissions. Stop verifies the current server status; an unverified stop request fails with guidance to watch.

All terminal output is plain, without animation or markup interpretation. Data commands accept --json: one complete document on stdout, diagnostics on stderr. Watch JSON waits for terminal status unless --once is selected. Report JSON stdout retains the original report schema; files always retain exact server response bytes. Downloads validate media type/JSON schema_version 1.0 before atomic publication. Existing files require --overwrite; failed downloads keep any previous destination. Files are not opened automatically. Reports may contain sensitive redacted evidence; protect and share downloaded files under your organization's rules.

Exit codes: 0 successful operation/COMPLETED (even with FAIL findings); 1 API/auth/network, local I/O, invalid server report or FAILED; 2 invalid parameters/config; 3 STOPPED; 130 interrupted watch. Stop returning STOPPED also exits 3. start and bare probegate treat an Agent run that stopped at its step, request or token budget (MAX_STEPS, MAX_REQUESTS, MAX_TOKENS) as a normal end: exit 0. No quality gate exit policy.

Local testing supports the REST/OpenAPI chatbot configurations described above. Browser widgets, SSE and WebSocket connections are not supported.

Metadata

Release files for probegate-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 probegate-cli 0.3.1
File Size Uploaded Provenance Actions
probegate_cli-0.3.1.tar.gz 62.5 kB Without provenance Details for probegate_cli-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 106.9 kB

Release files / probegate_cli-0.3.1.tar.gz

Download URL probegate_cli-0.3.1.tar.gz
Size 62.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f4a094feaf7050a21a4ac1023e5ac50f1ffd371311f17b1ed4b5d8fe6d23ec5b
BLAKE2b-256 checksum
How to use checksums
8804a3d65b4ae7799e8db82b8ab3bc1c8b601c6808934d80b32acdfe392c73f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL probegate_cli-0.3.1-py3-none-any.whl
Size 44.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5ddcc60813060a1d5c9a4990a0fc987d29737436ada3e31f8512cf3a33a70a0
BLAKE2b-256 checksum
How to use checksums
97c6bd52a52cc4dec060dc6f3c588a6c2b9edcf841504f0cd13b347c8feaf986
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for probegate-cli 0.3.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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