qualiloop

v0.2.0
com.qualiloop/qualiloop Checked 3 days ago Published 15 days ago

Run QualiLoop tests and release gates, read problems and write tests for your AI agent.

qualiloop: the QualiLoop CLI and MCP server One package, two ways in. Both use the same sign-in and run the same actions, so either one does everything: run suites and release gates, wait for the results, read problems and conversations, write tests, report a change and connect an agent. Pick one and use it for everything. - qualiloop, the CLI, suits a terminal, scripts, CI, and coding agents that can run commands (Claude Code, Cursor, Codex). - qualiloop mcp, the MCP server, suits chat apps and agents that cannot run commands (Claude Desktop).

Summary extracted from the README.

qualiloop: the QualiLoop CLI and MCP server

One package, two ways in. Both use the same sign-in and run the same actions, so either one does everything: run suites and release gates, wait for the results, read problems and conversations, write tests, report a change and connect an agent. Pick one and use it for everything.

  • qualiloop, the CLI, suits a terminal, scripts, CI, and coding agents that can run commands (Claude Code, Cursor, Codex).
  • qualiloop mcp, the MCP server, suits chat apps and agents that cannot run commands (Claude Desktop).

Start: connect an agent in one command

In the agent's folder (Node 20 or newer):

npx qualiloop connect 12                      # 12: the project's number, as the app shows it
npx qualiloop connect 12 --url <address>      # a self-hosted QualiLoop

It signs you in through the browser if needed (no account yet: create one from the page that opens, and you come back to it), uses the project named by number or name, makes it the default, writes QUALILOOP_PROJECT_KEY and QUALILOOP_OTLP_TRACES_URL into .env (values never printed; it says when git does not ignore the file) and prints the steps a coding agent follows next. With no project named, it creates one named after the codebase (package.json or pyproject.toml name, else the folder) when you have none, and otherwise lists your projects and stops. The app shows the command, with the number filled in, under New project and Settings, Coding agent. A setup token in QUALILOOP_SETUP_TOKEN still wins over the sign-in.

To keep the CLI:

npm install -g qualiloop     # then: qualiloop connect 12
qualiloop login              # a self-hosted QualiLoop: qualiloop login --url <address>
qualiloop connect guide      # the steps to connect an agent in this codebase to QualiLoop
qualiloop guide              # how to use the commands well: what to run, in what order

The global install puts qualiloop and its short form ql on your PATH: ql suites run core --wait. Install it globally to use the MCP server, so qualiloop mcp install points your MCP client at a copy that stays.

qualiloop guide prints the guide the MCP server gives agents as its instructions. qualiloop connect guide prints /connect/SKILL.md from your QualiLoop, the steps a coding agent follows; the code for each step is at /connect/reference.md on the same address.

Sign in

qualiloop login                                      # https://app.qualiloop.com
qualiloop login --url https://qualiloop.example.com  # a self-hosted QualiLoop

The browser opens the QualiLoop approval page. Check that it shows the code the terminal shows, and approve. No password or key is typed into the terminal. The sign-in is stored in credentials.json in %APPDATA%\qualiloop (Windows) or ~/.config/qualiloop, readable by you only, one per QualiLoop address; the last one signed in to is the default. It ends after 90 days without use, or when revoked in Account settings, qualiloop tokens revoke <id> or qualiloop logout.

Set up the MCP server

qualiloop mcp install                           # Claude Desktop
qualiloop mcp install --client cursor vscode    # other clients: claude-code, cursor, vscode, windsurf, codex
qualiloop mcp install --client all              # every supported client
qualiloop mcp install --client claude-code cursor --scope project   # this repository only (.mcp.json, .cursor/)
qualiloop mcp install --print                   # the settings to paste by hand, for every client
qualiloop mcp install --client codex --print    # only for the clients named

The server starts as this Node and this package's cli.js, with QUALILOOP_URL set when you are not on app.qualiloop.com. If it is not signed in, its sign_in tool runs the same browser approval.

Its tools are every action in qualiloop actions, plus qualiloop_status, sign_in, wait_for_runs and the connect_* tools that connect an agent in the open codebase (connect_agent does what qualiloop connect does, without the browser sign-in, which sign_in runs). Those read and write files only inside the workspace, write the project key straight into .env, and read a header secret from a variable, so no secret passes through the chat.

Commands

qualiloop login | logout | whoami | tokens [revoke <id>]
qualiloop projects [show <project> | use <project> | delete <project> [--yes]]
qualiloop projects ui-tools [project] | ui-tools set <tool>... | ui-tools clear
qualiloop dashboard [--period <p> | --from <date> --to <date>] [--source live]
qualiloop knowledge                       capabilities and coverage at a glance
qualiloop knowledge list [--section <s>] | show <id> | edit <id> | general
qualiloop knowledge explore [--note <text>] | explorations
qualiloop knowledge sources [--kind <k>] [--in-force] | source <id>
qualiloop knowledge add-doc <name> --file <path> | retire-source <id>
qualiloop change <description>            report a change to the agent
qualiloop tests [show <id> | create | edit <id> | delete <id> [--yes] | seen <id>... | seen --all]
qualiloop suites [run <suite> --wait | create <name> [--test <id>] | add <suite> <test-id>...]
qualiloop run <test-id>... [--category <c>] [--wait] [--fail-on major|minor|none] [--timeout <min>]
qualiloop runs [show <run> | wait <batch>] [--batch <id>] [--mode <m>] [--result <r>]
               [--from <date>] [--to <date>] [--started scheduled|manual] [--category <c>]
               [--test <id>] [--schedule <id>] [--search <text>] [--offset <n>]
qualiloop runs batches [--kind <k>] [--suite <s>] [--status running|completed]
qualiloop runs restart <run>... | rejudge <run>... [--batch <id>]
qualiloop runs rejudge-conversation <id> | delete-conversation <run> <id> [--yes]
qualiloop problems [--run <n>] [--severity major] [--category <id> | --unsorted]
qualiloop problems severity <id> major|minor | delete <id> [--with-category] [--yes] | sort [--scope <s>]
qualiloop problems categories [show <id> | solve <id> [--reopen] | delete <id> [--yes]]
qualiloop problems checks [add <title> --severity <s> | set [--token-limit on|off] [--max-tokens <n>] [--unanswered on|off]]
qualiloop conversations [--run <n>] [--batch <id>] [--verdict <v>] [--mode <m>]
qualiloop conversation <id>
qualiloop reports [show <id> | create [--runs <n>... | --days <n> | --from <date> --to <date>]]
qualiloop reports rebuild <id> | share <id> [--expires 7|30|90|365|never] | unshare <id> | delete <id> [--yes]
qualiloop reports download <id> [--format pdf|summary-csv|csv] [--out <file>]
qualiloop gate [run [<gate>] --wait --ref <sha> | runs | show <n> | cancel <n>]
qualiloop gate create <name> --pack <pack> | edit <gate> | delete <gate> [--yes]
qualiloop gate packs | pack create <name> --test <project>:<id>... | pack edit <pack> |
               pack delete <pack> [--yes] | history <pack>
qualiloop gate ci-snippet <gate> [--format shell|github|cli]
qualiloop generate <prompt> [--suite <s> | --new-suite <name>] [--max <n>] [--wait]
qualiloop generate status <id> | cancel <id> | list [--everyone]
qualiloop export [project] [--format <f>] [--from <date>] [--to <date>] [--out <file>]
qualiloop guide                           how to use the commands well
qualiloop connect [project]               sign in, choose the project, write .env, print the steps
qualiloop connect guide                   the connect skill, from your QualiLoop
qualiloop connect info | env | projects | create-project | rename | target |
                  knowledge --file <json> [--overwrite] | live on|off |
                  check-traces <id> | check | disconnect
qualiloop mcp [install]
qualiloop actions                         every action, as the MCP server offers it
qualiloop action <name> --args '{...}'    run one action with JSON arguments

Global options: --url, --project <number or name> (or qualiloop projects use), --json for output a script can read.

Lists (tests, suites, runs, problems, problems categories, gate runs) take --limit <n> and end with "N of M shown" when they are cut.

export writes the project's corrected pairs (turns with a saved correction) to a file in one of the Export page's formats: openai-chat-jsonl (default), openai-completion-jsonl, anthropic-jsonl, csv, tsv, qa-json, prompt-completion, instruction-json, cot-jsonl, json-batching. It covers the last 30 days unless --from and --to say otherwise. Admins and the ML team.

Actions with no command of their own run with qualiloop action <name>: for example list_jobs, cancel_job, get_usage, list_members, get_help_topic, the test category jobs and manual testing (start_manual_test, send_manual_message, score_manual_test, save_manual_test).

run --wait and suites run --wait print the batch first; if you stop waiting, qualiloop runs wait <batch> picks it up again. A wait lasts until every run has talked to the agent, been judged and had its problems sorted, so it shows what the runs are doing (running, judging, sorting problems) as it goes.

tests delete and projects delete ask before deleting; --yes skips the question (and is needed without a terminal). gate cancel ends a gate run still waiting on its tests, as cancelled, which CI treats as not passed; QualiLoop also ends a gate run that is still open past its gate's CI time limit, as failed.

reports share makes a public link to a ready report and prints the link and its password once; QualiLoop keeps only their hashes. Anyone with both can read the report without signing in until the link expires or reports unshare revokes it. Sharing again replaces the link. reports rebuild builds a report again from the current results with its period, runs and options, keeping its id and link. reports download saves the executive PDF, the test summary CSV or the CSV of every conversation.

A pack holds tests of any project, so each --test names its project as <project>:<test id> (a bare id uses the -p project); --schedule does the same for schedules. gate pack edit replaces the saved tests when given --test and the schedules when given --schedule. gate delete and gate pack delete ask first, like tests delete; a pack a gate still runs is not deleted. gate ci-snippet <gate> prints the script the app's CI integration shows. It reads the deploy token from $QUALILOOP_RELEASE_GATE_TOKEN and never prints one; deploy tokens are made in the app.

knowledge shows what the System knowledge page shows you: capabilities, entity groups and entities for everyone, every section with its statuses and evidence for a QualiLoop super admin (show and edit are theirs only). knowledge edit sets a status by adding manual evidence (yes, opposite) or removing it (clear). knowledge general changes the agent's name, summary or description. knowledge explore starts a plain exploration: 3 rounds of up to 8 conversations, so up to 24 conversation credits (the project's first exploration is free), not judged; qualiloop change instead re-checks only what a described change touches.

knowledge sources lists what the knowledge is read from: the agent's system prompts, tools and documentation, each with where it came from (the coding agent, by hand, the connection settings, or seen in traces). knowledge source shows one with its text and what it states. knowledge add-doc adds a document by hand (or a new version of one) and knowledge retire-source takes a source added by hand or seen in traces out of use; both are for admins and the ML team. Sources from the agent's code change only with connect knowledge.

connect uses QUALILOOP_SETUP_TOKEN when it is set: the token names its own project, and -p only names a project the token created. Otherwise it uses your sign-in, on the project named by -p, QUALILOOP_PROJECT or qualiloop projects use; with none named it stops and asks for one. Each connect command prints the project it acted on.

connect knowledge (old name connect context) fills the system knowledge from the code: the body of PUT /v1/setup/knowledge, with the prompts verbatim and their placeholders, the tools, the documents and General. General fills only empty fields; --overwrite replaces them, only when the user asked. The answer lists each source as new, unchanged or a new version, and the ones retired or kept.

Errors and hints name the commands to type. The same actions name tools for the MCP server and the in-app assistant: the CLI sends X-Qualiloop-Client: cli.

Exit codes

Code Meaning
0 Done; with --wait, everything passed
1 What was checked failed: a gate said fail, a run found a major problem
2 The command or its arguments were wrong
3 Not signed in, the sign-in ended, or your role cannot do this
4 Not found
5 Waited longer than --timeout
6 QualiLoop could not be reached or answered with an error

Environment

Variable Use
QUALILOOP_URL The QualiLoop address. Default https://app.qualiloop.com
QUALILOOP_TOKEN A CLI sign-in token, for CI instead of qualiloop login
QUALILOOP_GATE_KEY A release gate's deploy token, for qualiloop gate run in CI
QUALILOOP_PROJECT The project when --project is not given
QUALILOOP_SETUP_TOKEN A project setup token for qualiloop connect; when set, it is used instead of the sign-in, on its own project
QUALILOOP_CONFIG_DIR Where the sign-ins are stored
QUALILOOP_NO_BROWSER Print the approval link instead of opening it

CI

A release gate, with the gate's deploy token stored as a secret:

- run: qualiloop gate run --wait --ref "$GITHUB_SHA"
  env:
    QUALILOOP_GATE_KEY: ${{ secrets.QUALILOOP_GATE_KEY }}

(with npm i -g qualiloop in an earlier step, or npx qualiloop gate run ... with no install step).

The token names its gate (POST /v1/release-gates/hooks/runs), and the wait uses the gate's CI time limit unless --timeout is given. A suite, with a sign-in made for CI:

QUALILOOP_TOKEN=... qualiloop suites run core --wait --project 12