Back to Browse

Cli MCP Server

Developer ToolsLow Risk9.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Plune test management for agents: review queue, test cases, missions, strategy and reports.

About

Plune test management for agents: review queue, test cases, missions, strategy and reports.

Security Report

9.0
Low Risk9.0Low Risk

Valid MCP server (3 strong, 1 medium validity signals). 3 known CVEs in dependencies Package registry verified. Imported from the Official MCP Registry. Trust signals: 3 highly-trusted packages.

4 files analyzed · 4 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

env_vars

Check that this permission is expected for this type of plugin.

database

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Plune API token. Without it, the login saved by `plune login` is used. A read token offers only the read tools.Required

Environment variable: PLUNE_TOKEN

Project the tools work in. Without it, the token's own project.Optional

Environment variable: PLUNE_PROJECT

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "cli": {
      "command": "npx",
      "args": [
        "-y",
        "@plune-ai/cli@0.39.8"
      ],
      "env": {
        "PLUNE_TOKEN": "your-plune-token-here",
        "PLUNE_PROJECT": "your-plune-project-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

@plune-ai/cli

AI-powered assertion testing for LLM apps — a test runner for model behaviour.

npm CI license plune-ai/cli MCP server

Plune runs an assertion suite against an LLM provider and gives you a pass/fail report — locally, in CI, or as a regression diff between two runs. You describe the checks in one plune.yaml; Plune calls the model, evaluates each assertion, caches results, and reports token cost. Eleven built-in assertion types cover plain text, JSON (a schema or an expected value), LLM-as-judge, and RAG metrics (faithfulness, answer-relevance, context-precision).

Links: plune.ai | npm | GitHub Action on Marketplace

Install

npm install -g @plune-ai/cli      # or: pnpm add -g @plune-ai/cli
plune --version

Or run it without installing:

npx -y @plune-ai/cli run

Requires Node.js ≥ 20.

The completion cache uses better-sqlite3, an optional dependency with prebuilt binaries for Node 20 to 26 on Windows (x64, arm64), macOS and Linux. If the binary cannot be downloaded (proxy, offline mirror) and there is no C++ toolchain with Python to build it, npm skips it: the install still succeeds and plune run prints completion cache disabled and runs without the cache. To turn the cache on, fix the download or install the build tools (Visual Studio Build Tools on Windows), then run npm rebuild better-sqlite3 -g.

Quickstart

# 1. Scaffold plune.yaml, an example dataset, and .env.example
plune init

# 2. Add your provider key (read from the environment / .env — never written to disk)
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env

# 3. Run the assertions
plune run
# → 3 passed · 0 failed · 0 errored · 3 total · $0.0008 · 1840ms

# 4. Re-render the last run, or diff two runs to catch regressions
plune report --format markdown
plune diff baseline.json current.json --fail-on-regression

Each run writes its full result to .plune/last-run.json; a --dry-run writes nothing there.

Configuration

Plune reads a single plune.yaml, discovered by walking up from the working directory (or passed with -c <path>). A minimal example:

version: 1
provider:
  type: anthropic            # anthropic | openai | openrouter
  model: claude-sonnet-5-5
evals:
  - id: example
    prompt: "Answer concisely. {{question}}"   # {{vars}} come from each dataset row
    dataset: datasets/example.jsonl            # a file path, or an inline `examples:` list
    assertions:
      - type: contains
        value: "Paris"

Datasets are JSONL, one row per line, shaped { "vars": { ... }, "expected"?: "..." }. A line that is not valid JSON or not a row (no vars, or vars that is not an object) stops the run before any model call with <file>:<line> and what is wrong, exit code 2, like any other configuration error. The provider API key is read from the environment based on provider.type:

Providerprovider.typeEnvironment variable
AnthropicanthropicANTHROPIC_API_KEY
OpenAIopenaiOPENAI_API_KEY
OpenRouteropenrouterOPENROUTER_API_KEY

provider may also be a list of models: every eval then runs on each, and plune run and plune report show a model × eval table (see the configuration guide). model is any id the provider serves; plune init starts you on claude-sonnet-5-5. A run's cost is priced from a built-in table of current models — a model it does not list costs 0, with a warning, until you add its rates under pricing: (input_per_1k_usd, output_per_1k_usd). Leave temperature out for Claude models released after Opus 4.6: they take none, and the API answers 400 to any value but the default. Plune sends no temperature unless the config sets one.

Where the CLI reads its settings

Every command reads them the same way: from the environment first — what your shell or CI job exported — then from a .env beside the config you named with -c, then from a .env in the current directory. The first place that sets a variable wins, so a .env never overrides what is already exported. That covers the provider keys above and every PLUNE_* variable (PLUNE_TOKEN, PLUNE_API_URL, PLUNE_RUN, …) for run, report, sync, ingest, login and run import, start and finish alike — no dotenv wrapper in your scripts. The token plune login saved is the last resort, used only when PLUNE_TOKEN is set nowhere else. Nothing writes a .env for you; plune init writes .env.example.

Assertion types

TypePasses when…
exact-matchoutput equals value (optional trim, ignore_case)
containsoutput contains value
contains-anyoutput contains at least one of values
contains-alloutput contains every one of values
json-schemaoutput validates against the JSON schema
json-verifythe JSON in the output matches expected (mode: exact, unordered, contains)
llm-judgean LLM grades the output against criteria (≥ pass_threshold)
semantic-similarityembedding similarity to reference ≥ threshold
faithfulnessoutput is grounded in context (RAG)
answer-relevanceoutput actually answers the question (RAG)
context-precisioncontext is relevant to the question (RAG)

A provider that fails on purpose: stubs

An eval with stubs: <file> gets its model calls answered by a local server from that file, in place of the provider: a canned answer, or a failure (timeout, reset, http_429, http_500, slow_stream, truncated_json), on every call or on the first N.

# plune.yaml: one eval
  - id: refund-survives-500
    stubs: stubs/refund.stubs.yaml
    prompt: "Can order {{order}} be refunded?"
    dataset: { examples: [{ vars: { order: 1042 } }] }
    assertions:
      - type: contains
        value: "Refund approved"
# stubs/refund.stubs.yaml
version: 1
stubs:
  - path: /v1/messages
    failure: { type: http_500, first: 2 }
    response:
      json:
        type: message
        role: assistant
        content: [{ type: text, text: "Refund approved for order 1042." }]
        stop_reason: end_turn
        usage: { input_tokens: 12, output_tokens: 8 }

The call fails twice, is retried, and the row passes on the third answer. The server lives for the run only, every row gets the stubs fresh, the completion cache is not used, a stubbed call costs 0, and judge calls still go to the real provider at their price. A bad stub file is exit 2 before any model call, and so is a timeout stub without provider.timeout. A run that holds a stubbed eval is marked, plune report and plune diff say so, and plune sync refuses to upload it (exit 2). See the configuration guide.

Commands

CommandSummary
plune runRun the suite. Flags: --dry-run (price the run from the model's rates — no provider key, no network; it prints the estimate with no verdict and does not replace the last run; with a list of models each is priced at its own rates), --only <id|tag> (repeatable; an eval id selects its cells on every model), --bail, --no-cache, --cache-strict, --cache-max-age <duration>, --concurrency <n>, --format console|json|markdown|junit (junit is JUnit XML: a <testsuite> per eval, a <testcase> per row, the file plune run import and CI systems read), -o, --output <file>.
plune reportRe-render the most recent run. Flags: --format (the formats of plune run, junit included), -o.
plune judge-check <labels.jsonl>How well a model judge agrees with a person's pass/fail labels of the saved run's rows: agreement, TPR, TNR, Cohen's kappa with a 95% interval. Offline; changes nothing. Flags: --init, --force, --run, --eval, --check, --min-kappa, --max-interval-width. See the CLI reference.
plune diff <baseline> <current>Compare two plune run --format json outputs and report pass→fail regressions. Flags: --fail-on-regression (exit 1 on a regression, 3 when none but an eval was not measured), --format, -o.
plune mock <file>Serve a stub file on 127.0.0.1 so a product's model calls are answered locally, with no network. With --record --target <origin> it forwards each request to that origin and writes the answers into the file as stubs to replay later. Prompts and answers are stored as they are; credentials are masked by a few fixed rules that do not catch everything, and plune mock --help and the CLI guide say what they miss. Flags: --record, --target, --force, --scope, --port.
plune initScaffold plune.yaml, a sample dataset, and .env.example. Flags: --yes (non-interactive), --force, --from-openai-eval <eval.json> (build it from an exported OpenAI eval).
plune loginSave a Plune platform API token so sync and ingest can reach it. The token is checked against the API before it is saved, so a wrong one fails here rather than two commands later. Get one at https://app.plune.ai → Account → API tokens. Flags: --token <token> (omit to paste it or pipe it via stdin), --skip-verify (save without checking, for offline setup). In CI, skip this step: every platform command reads PLUNE_TOKEN from the environment first, and the saved login only when it is not set.
plune logoutRemove the saved token.
plune mcp serveServe the Plune tools to an AI agent (Claude Code, Codex, any MCP client) over MCP stdio. See Plune tools for AI agents. Flags: --project <id> (default PLUNE_PROJECT), --read-only (offer only the read tools), --disable-tool <name> (switch one tool off; repeatable).
plune mcp checkCheck that any MCP server starts and answers: handshake, protocol version, capabilities, the lists, ping. See Is the server alive. Flags: --check-timeout <duration>, --wait <duration>, --smoke (with --smoke-limit, --smoke-timeout, --budget, --allow-write-calls), --out [<format>=]<path> (repeatable), --reporter junit-xml, --format human|json|github|markdown, and the connection flags. Exit 0 healthy, 1 a check failed, 2 the server did not start, could not be reached or wants credentials, or a flag is wrong, 3 something could not be measured.
plune mcp lintCheck the tool list of any MCP server for what confuses a model — no account, no model. See Checking any MCP server. Flags: --fail-on error|warn|info|never, --show-info, --format human|json|github|markdown, --reporter junit-xml, --out [<format>=]<path>, --ignore-file <path>, --list-rules, --call, --call-limit <n>, --call-timeout <duration>, and the connection flags (--url, --header-env, --env, …). Exit 0 clean, 1 findings, 2 the server did not start or a flag is wrong, 3 nothing measured.
plune mcp snapshotWrite the contract of any MCP server — tools, resources, resource templates, prompts, capabilities, instructions — as one stable JSON file to commit. See Contract snapshots. Flags: --out <path> (default stdout), --push with --server <id> or --server-name <name> and optional --environment <text> (send it to the platform's MCP catalog; nothing is sent without --push), and the connection flags. Exit 0 written (or sent), 1 with --push the platform could not be reached (the snapshot is kept in a file), 2 the server did not start, a declared list could not be read, or the platform refused the push (login, body, quota), 3 the server lists nothing.
plune mcp diffCompare a snapshot with another snapshot file or a live server: every change breaking, non-breaking or informational, with a reason. See Contract snapshots. Flags: --fail-on breaking|any|none, --format human|json|github|markdown, --reporter junit-xml, --out [<format>=]<path>, and the connection flags. All three write JSON, JUnit XML for plune run import, GitHub annotations and a pull request comment from one run. Exit 0 nothing at --fail-on, 1 a change at it, 2 a file cannot be read or the server did not start, 3 nothing to compare.
plune mcp pinPin the tools, prompts and resource templates of any MCP server in plune-mcp.lock.json after reading them in full, and check a live server against it in CI. See Pinning approved tools. Flags: --check, --stability (with --times, --pause, --wait), --yes, --lock <path>, --name <label>, --format human|json, and the connection flags. --check exits 0 as pinned, 1 a difference, 2 a usage error, 3 nothing compared (the server could not be reached).
plune mcp scanScan what a model or a person cannot see in any MCP server, sending no probe unless --active asks for the declared ones (see the CLI guide): descriptions (hidden Unicode, override phrases), a pin file, client configuration (.mcp.json, .cursor/mcp.json, .vscode/mcp.json: secrets, plain http, shell launchers) and tool names across servers. See the CLI guide. Flags: --snapshot [label=]file, --config <file>, --client claude-code|cursor|vscode, --pin-file, --only/--skip, --active with --probes, --confirm-host, --max-calls, --max-requests, --token-env, --other-token-env, --fail-on error|warn|never, --gate-heuristics, --allow-partial, --ignore-file, --allow-long-exceptions, --format human|json|github|sarif, --reporter junit-xml, --out, and the connection flags. Exit 0 nothing that gates, 1 a finding at --fail-on, 2 a usage error, 3 something could not be measured.
plune mcp conformanceCheck any MCP server against the protocol: a catalog of checks with their requirement level and spec section, a score from the MUST checks only, a frozen profile so a score means the same thing next month. --list-checks prints the catalog without connecting; --fixture <file> names the only tools a run may call; `--format human
plune syncUpload the latest local run to the platform. Flags: --file <path> to send a specific run JSON, --fail-on-failures to read the run's summary back once after the upload and exit with the gate's code. Each upload carries an Idempotency-Key (SHA-256 of the body), so sending the same run again returns the same run rather than creating a second one. Against a platform with POST /v1/jobs the upload is also reported as a job (kind sync, counting the run's rows) that ends completed, or failed with the error text if the sync fails; an older platform without the route is not told, and a job report never fails the sync: when the sync goes through, one the platform did not take is said in one line on stderr.
plune run import <file | folder>Turn a JUnit XML or Playwright JSON report, a k6 summary or Lighthouse JSON report, an e2e report.json (report-1), a folder of JUnit XML files (Maven Surefire's target/surefire-reports, Gradle's build/test-results/test), or an Allure allure-results folder, into a run in Plune. Needs no provider key — nothing is generated. Flags: --format junit|playwright-json|allure|k6|lighthouse|e2e (detected when omitted: a folder with a *-result.json is Allure, any other folder is read as the JUnit *.xml files in it), --name <text> to call the run something other than the folder-based default, --min-score <category>=<0-100> (repeatable) for the score a Lighthouse category needs to pass, --key <externalKey> to land several reports in one run (with PLUNE_SHARED_RUN=1 — see below), --create to offer unmatched tests to the review queue, --fail-on-missing-attachments to exit 1 when a file a JUnit report names with [[ATTACHMENT|path]], or an Allure result names as a source, is not there (the results are sent either way), --upload-concurrency <n> for files uploaded at once (1 to 32, default 16), --fail-on-failures to exit with the gate's code on the summary the platform froze when this import finished the run.
plune run startOpen a platform run — or join the one already carrying --key — and print its id. Flags: --key <externalKey> (generated when absent), --name <text> to call the run something other than the default, --json for one machine-readable line.
plune run finish <id>Close a platform run. This is what the reporter tells you to do for a run it had to leave open. Flags: --terminate to record it as cut short, --reason <text>, --fail-on-failures to exit with the gate's code on the summary the platform froze.
plune run exec -- <command>Open a run, run the command inside it, close the run — and exit with whatever the command returned. Sets PLUNE_SHARED_RUN for you, so anything reporting inside joins that run. Flags: --key <externalKey>, --name <text> (as on run start), --fail-on-failures to exit with the gate's code instead — or with the command's own when no result reached the run.
plune run delete <id>Delete a run and everything it produced — its results and the review-queue entries it raised. Approved test cases and the audit log stay. Recoverable for 30 days (an owner of the project can put it back from Settings → Bin), then gone for good. No prompt: it is your data, and this command belongs in scripts.
plune run reportReplay .plune/pending-results.jsonl — send what the reporter could not. The lines of one reporter run go back as one run, with the commit and branch the reporter recorded. Once every result has gone the file is renamed to pending-results.<time>.sent.jsonl; if anything did not go, it stays as it was. Flags: --file <path>.
plune ingest [dir]Record a Cairn run in Plune. Omit [dir] for the newest run under ./runs, or name the directory holding report.json. Generated cases arrive as review proposals — nothing is created until a person approves it. A case of a design, explore or proposed-scenarios report that carries rationale, the reason the case exists, is sent with it, and the proposal shows it when opened; the platform takes at most 400 characters, so a longer one is sent cut to 400, with a line saying how many cases were cut. A case of a design or explore report that carries traceUrl, the address of the run's trace, is sent with it; an address that is not a plain https link (http, a user name or password in it, over 2048 characters) is left out with a line saying why, and the case is still sent. A run recorded with --screencast also sends each case's video and trace to its proposal (or to its result, for a case approved before), up to 100 MiB a file; a file that does not go is a line under the counters, never a failure. The ingest declares those recordings on each case first (title, chapters, and each file's run-relative path, kind and size, a file over 100 MiB included), so the proposal can show what each file became. Against a platform with POST /v1/jobs the ingest is also reported as a job (kind ingest, counting the cases sent, linked to the run it landed in) that ends completed, or failed with the error text if the ingest fails; as with sync, an older platform is not told and a job report never fails the ingest or changes its exit code.
plune pull [file]Write the project's test cases as one Markdown document — Testomat's classical format, plus Plune's own columns — to plune/cases.md (or [file]). Refuses to overwrite a file git sees as modified; --force overrides, --suite <id> takes one suite or folder and what is under it.
plune push [file] [--dry-run]Send the document back. Cases are matched by id; a block without one becomes a draft; an unknown id is refused by line; nothing is deleted. Prints the report — created, updated, unchanged, refused, warnings — and with --dry-run writes nothing. Exit 4 when anything was refused.
plune requirements import <file.md>Import requirements from a Markdown file (an SRS, a PRD, a page exported from a wiki). With no mapping flags it lists the tables and sections the file has and exits 0; with --table or --sections it is a dry run that writes nothing until you add --yes. See Requirements from a Markdown file. Needs a Plune platform that serves POST /v1/projects/:id/requirements/import.
plune requirements links <file.md>Import a traceability matrix (a Markdown table of requirement key to test) as links between requirements and cases. With no flags it lists the tables the file has and exits 0; with --table, --requirement-column and --test-column it is a dry run that writes nothing until you add --yes. See Links from a traceability matrix. Needs a platform that serves POST /v1/projects/:id/requirements/import/links.
plune verifyCompare the project's automated cases with the Playwright tests in the code, read-only. Prints both sides: cases in Plune that the code no longer has (already detached, or one a full run would detach) and tests in the code that Plune has no case for. A test is matched by the id it names (PluneId annotation or @P<id> in its title), else by its path-title key. Nothing is written to Plune and no id is added to your source. Playwright only. Flags: --from <file> (a saved playwright test --list --reporter=json, instead of running Playwright), --playwright-config <path>, --json, --fail-on-drift (exit 1 when either side has something the other lacks).
plune ids [--write]Write the Plune case id of each Playwright test that names none into a mapfile, plune/ids.json ({ "<path-title>": "<case id>" }), instead of editing your test files. A dry run unless --write: it prints what it would add. Only tests whose case Plune already holds get an entry (matched by the path-title key); a test with no case yet is listed and skipped. Idempotent: entries are only added, never overwritten or removed (an entry for a test no longer in the code is kept and listed), the file is sorted so diffs stay small, and nothing is written when nothing changes. A mapfile that is not a JSON object of strings is refused (exit 2) and left as it is. Playwright only. The Playwright reporter reads the mapfile: an entry names the case after the PluneId annotation, @P<id> and a metadata attachment, and before the playwright-id and path-title keys, so a renamed test keeps its case when the entry is updated with plune ids --write (override the path with PLUNE_IDS_FILE or the reporter option idsFile). Flags: --write, --file <path> (default plune/ids.json), --from <file>, --playwright-config <path>, --json. Exit codes as plune verify.
plune automate <caseId>Run Cairn's automate on one case from Plune and print the code it wrote as a diff of new files (#148). Cairn runs in --repo <dir> (default: the current directory) with an environment that holds no PLUNE_* variable and no token, and reads a copy of that directory's .env without them. Nothing is written into the repo. With --send, the same files go to the review queue as an automation proposal (POST /v1/review-items/automations), the spec file's test() call named as the case's code; the bounds (10 files, 16 KB each, 64 KiB in all) are checked first, and the queue entry's id is printed, new or replacing the one waiting for the case. Flags: --repo, --cairn <path>, --url <url>, --send; arguments after -- go to Cairn. See the CLI reference.
plune plan grep <id>Print a test plan as one --grep pattern — npx playwright test --grep "$(plune plan grep <id>)" or npx vitest run -t "$(plune plan grep <id>)" runs exactly what the plan collects. Each case contributes its title path from the path-title key the reporter wrote (the file left out, [ >#]+ between the segments — a space for Playwright, jest, mocha and vitest ≤ 4, > for vitest 5), escaped, joined with |; a case without one goes in by title. The pattern is all that reaches stdout; the summary — how many cases, how many keyed — goes to stderr. An empty plan prints (?!), which matches nothing, because an empty --grep would run everything.
plune run grep <run> [--failed]Print a run's automated cases as one --grep pattern, built the way plan grep builds a plan's — so the commands Plune shows for a run work as they are: npx playwright test --grep "$(plune run grep <run-id> --failed)" re-runs an automated run's failures where your tests run (Plune starts no CI), and PLUNE_RUN=<key> npx playwright test --grep "$(plune run grep <key>)" runs the automated half of a mixed run launched without a plan. <run> is the run's id (a UUID) or its key (rk_ and ten hex); anything else is refused with exit 2 before anything is sent, and a key no run carries exits 1. The cases are the ones the run expected — cases added on its page among them, run or not — or holds a result of; manual cases are left out. --failed keeps the cases whose latest result the platform counts as failed or broken, so a muted case's failure stays out, as from Re-run N failed. Only the pattern reaches stdout; how many cases were taken and how many left out goes to stderr; nothing taken prints (?!). Needs a Plune that serves GET /v1/runs/:id/cases.

Global flags: -c, --config <path> · -v, --verbose · --no-color.

Exit codes of plune run:

CodeWhen
0Every row passed. Also a --dry-run, a run where --only matched no eval, and a run whose rows that did not pass are all blocked or skipped (never judged).
1At least one row failed an assertion, whether or not other rows errored. Also an error the CLI did not expect (it says «This one is on us»).
2The run could not start or could not finish: a configuration or usage error (no plune.yaml, YAML that does not parse, a config that does not validate, a missing provider key, an unknown prompt variable, --runs out of range, a bad --tool-description, flags that do not go together, an option run does not have, an option given without its value, a word after run that is no subcommand, a --format that is not one of the four, a file or folder that cannot be read or written), or a run where rows errored (a provider outage) and none failed.
5--cache-strict found rows with no cache entry. It wins over 1 and 2: the run is incomplete.

--bail does not change the code, and neither does the --format chosen among the four; a --format that is not one of them is the usage error above, 2. plune run returns no other code. Of the other commands, plune pull exits 3 when it refuses to overwrite uncommitted changes and plune push exits 4 when it had refusals; the rest say their codes in the table above and in the CLI guide.

Completion cache

plune run keeps model answers in .plune/cache.db, keyed by provider, model, temperature, max_tokens, the resolved prompt and the cache policy version. Never by time or run id.

  • What is stored. An answer is cached only when it has text, was not cut off by the token limit (finish_reason length), carries no provider error, and has the format the eval expects (a json-schema eval needs JSON in the answer). An answer that is well formed but wrong (the schema or a contains check fails) is cached: the model would say the same thing again.
  • What is dropped. A stored answer that no longer has the expected format is deleted and the model is asked once in the same run. A provider failure deletes nothing. A damaged entry or file is a miss, never a crash.
  • Policy version. CACHE_POLICY_VERSION is part of the key. When it is raised, older entries stop answering, are dropped, and the run says cache policy changed, N entries are stale once on stderr.
  • --cache-strict. Every row must be in the cache; the model is not called for completions (judge assertions such as llm-judge still call it). A miss ends the run with exit code 5 and lists the rows with no entry. Not combinable with --no-cache (exit 2), and neither is --cache-max-age. An entry with the wrong format is left in place in this mode (there is no retry).
  • --cache-max-age <duration>. 90s, 15m, 12h, 7d or milliseconds. An older entry is a miss; a fresh one is a hit.
  • Summary. The console report and the JSON (summary.cache) show rows from_cache, from_model, missed and errored (the provider failed; the four add up to the rows run, rows of an eval with stubs aside: those are counted in stubbed), and the tokens and cost the cache saved (saved, the sum of each row's cache_saved).

Design: docs/features/C7-completion-cache/adr/0001-completion-cache-hardening.md.

Requirements from a Markdown file

plune requirements import <file.md> reads a requirements document (UTF-8, at most 1 MiB, at most 2000 requirements) and brings it into the project in two steps. It sends the file as it is and changes nothing by itself: you say which table or section holds the requirements and which column is which, and the platform tells you what it would do before it does it.

1. See what the file holds. With no mapping flags:

plune requirements import srs.md

It lists every table (number, nearest heading, header cells, row count, and <- looks like requirements where the first column holds ids and a header names a requirement) and every section (number, heading, bullets and sub-headings under it), then the commands to try next. Exit 0.

2a. A table. Name the table and its columns by their header text (any case):

plune requirements import srs.md --table 0 --key-column ID --text-column Requirement   --priority-column Priority --map-priority "Critical=Must-have,High=Should-have"

--key-column, --title-column or --text-column (one of the two: the title is the first line of the text and the whole text is kept as the description), --description-column, --priority-column, --category-column, --type-column, --status-column (draft, active or done), --criteria-column; --map-priority and --map-category ("Quality=non-functional") rename values; --type user_story|feature|epic is the type of a row that has none.

2b. A section. One requirement per bullet or per sub-heading:

plune requirements import prd.md --sections Requirements --unit bullets --key-prefix REQ-

--sections takes the heading or its number; --unit bullets|subheadings (default: sub-headings when the section has any); --key-prefix is text a bullet starts with that carries its key (REQ-12: The system shall ...; no pattern is accepted); --priority-from subheading makes the bullets under a sub-heading take its text as their priority.

2c. Several tables in one run. A PRD keeps its functional and non-functional requirements in different tables. Repeat --table and put each table's columns inside it, after the number and a colon:

plune requirements import prd.md \
  --table "1:key=ID,text=Requirement,priority=Priority,fixed-category=functional" \
  --table "2:key=ID,text=Requirement,fixed-category=non-functional" \
  --map-priority "Must=Must-have"

Inside a --table the names are key, title or text (one of the two), description, priority, category, type, status, criteria, plus fixed-category=functional|non-functional|other and fixed-type=user_story|feature|epic — one meaning for the whole table, used where a row has none of its own. Names are separated by commas, so a header that contains a comma cannot be named in this form. --map-priority, --type and --map-category are shared by all tables. A table number may be given once. The single-table form (--table 0 --key-column ...) keeps working, but the two forms are not mixed: --key-column and the other column flags are refused together with --table "<n>:...". The plan shows table #N "heading" in front of each row.

3. Read the plan, then write it. Without --yes nothing is written. The report is the summary line (create 3 · update 0 · unchanged 12 · skip 1), the rows grouped by action with their line in the file, key, title and reason (a skipped row says why), the priority and category values seen and what they map to, and what was not imported (other tables, other sections, frontmatter keys). It ends with dry run — nothing was written; add --yes to apply. Add --yes to apply the same plan in one transaction. A row with a key matches the requirement of that key; one without matches by exact title; running the same file again changes nothing (every row is unchanged). A skipped row does not fail the command. Rows that are only placeholders ([Behavior]) are skipped with the reason template placeholder; a key that appears twice in the file is skipped with first on line N, again on line M. When every row is a placeholder the plan says this file is an empty template (--json has "emptyTemplate": true) and the exit code is 0, like any plan whose rows are skipped: nothing is written, and nothing is an error.

--json prints the platform's answer instead. The project is the only one of the account, or --project <id> / PLUNE_PROJECT (a token only works in the project it was minted in). Exit 0 on success, 2 for a flag combination that cannot work (--table with --sections, --title-column with --text-column, a --table "<n>:..." spec with the single-table column flags), an unreadable or over-limit file, or a rejected token, 1 when the platform refuses (400, 403, 409 a key taken meanwhile, 413) or does not have the routes yet.

Links from a traceability matrix

Requirements documents often end with a table of requirement id to test. plune requirements links <file.md> imports it as links between requirements and cases, in the same two steps as requirements import: it sends the file as it is, and you say which table and which two columns.

plune requirements links matrix.md                     # lists the tables, exit 0
plune requirements links matrix.md --table 0 --requirement-column "Requirement" --test-column "Test"   # dry run
plune requirements links matrix.md --table 0 --requirement-column "Requirement" --test-column "Test" --yes

A requirement is matched by its key (import the requirements first, with --key-column). A test is matched by the exact title of a case, or for an automated case by its source path (e2e/login.spec.ts or e2e/login.spec.ts#title); put several tests in one cell on separate lines (<br>). A requirement cell with several keys is split by --separator (1 to 3 characters, default ,; nothing else is guessed). The report lists what it would link, what is already linked, and every row that matched nothing, with the reason (unknown key, archived requirement, no such case, a title that names several cases). A second import changes nothing. Links never change a requirement's coverage, which still comes from each case's last result.

Exit 0 after a dry run or a write, even when rows are unmatched; --fail-on-unmatched makes any unmatched row exit 1. A wrong flag or file is 2; a read-only member, a rejected mapping or a matrix over 2000 rows (after splitting) is 1 with the platform's reason. --json prints the platform's answer; --project <id> / PLUNE_PROJECT picks the project.

A release gate: --fail-on-failures

plune run finish, plune run exec, plune run import and plune sync take --fail-on-failures. The exit code is then the platform's verdict on the run, not the runner's: the summary the platform froze at finish (for sync, one GET /v1/runs/:id/summary after the upload). The platform counts a muted case's failure under muted, so a mute set in Plune is honoured without the CLI knowing about it.

The runExit
a failed or broken result that is not muted1
an expected case that never reported (notRun): a dead shard is not green1
only passed, blocked, skipped and muted failures0
no verdict: the platform could not be reached, the finish was refused, the run was left open or terminated1
no result reached the run and nothing was expected of it: run import of a report whose cases the project does not have yet, run finish or sync of an empty run1
run exec where no result reached the run and nothing was expected of itthe command's own code

Without the flag every command exits as it always did. plune run (local evals) is not affected: it stays the raw local signal and works offline.

Already running tests? Bring the results in

Everything above generates checks, which is why it needs a provider key. If you already have a suite, there is nothing to generate — the results exist and only have to arrive, and that route costs nothing beyond a Plune token.

Documentation truncated — see the full README on GitHub.

Reviews

No reviews yet

Be the first to review this server!