praman-cli

Command-line rules for testing SAP UI5 applications with Playwright and Praman, a bridge that exposes UI5 controls to the test runner. They define how to check the bridge, find controls, and return results.

In plain words
What is it for?
Use them when writing or running Praman tests through playwright-cli, especially for bridge checks, UI5 control discovery, and control interactions.
Why use it?
They prevent common command-line testing mistakes, such as continuing when the UI5 bridge is unavailable or hiding results with console output.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/mrkanitkar/playwright-praman/praman-cli
Clone the repo
git clone --depth 1 https://github.com/mrkanitkar/playwright-praman

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 747 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00747
Opus 5 $0.00000 $0.00374
Sonnet 5 $0.00000 $0.00149
Haiku 4.5 $0.00000 $0.00075

Measured 2d ago against content hash 7fbfb7b48728, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

praman-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/praman-cli.mdc · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Praman CLI — SAP UI5 Testing Patterns

Token-efficient CLI alternative to MCP. Bridge object: window.__praman_bridge.

Bridge Readiness Check

Always verify the bridge is ready before interacting with controls:

npx playwright-cli run-code -s=sap "async page => {
  const ready = await page.evaluate(() => window.__praman_bridge?.ready);
  return ready;
}"

Never proceed if ready is not true. The bridge is injected via browser.initScript in .playwright/praman-cli.config.json.

Control Discovery via run-code

Use getById() to locate UI5 controls. Always return values — console.log() output is invisible to the agent.

npx playwright-cli run-code -s=sap "async page => {
  const ctrl = await page.evaluate(() =>
    window.__praman_bridge.getById('container-app---main--myInput')
  );
  return ctrl;
}"

WARNING: console.log() Is Invisible

console.log() inside run-code produces NO output for the agent. Always use return to surface results.

// WRONG — agent sees nothing
async page => { console.log(await page.evaluate(() => ...)); }

// CORRECT — agent receives the value
async page => { return await page.evaluate(() => ...); }

setValue + fireChange + waitForUI5 Pattern

Every input interaction requires all three steps — never skip fireChange() or waitForUI5():

npx playwright-cli run-code -s=sap "async page => {
  await page.evaluate(() => {
    const ctrl = window.__praman_bridge.getById('container-app---main--inputField');
    ctrl.setValue('test value');
    ctrl.fireChange({ value: 'test value' });
  });
  await page.evaluate(() => window.__praman_bridge.waitForUI5());
  return 'input set';
}"

Snapshot: Always Use --filename

Agents MUST use --filename so the snapshot is written to a deterministic path they can read back:

npx playwright-cli snapshot -s=sap --filename=current-state.txt

Without --filename, the snapshot goes to stdout and may be truncated or lost in large outputs.

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 95 lines · 0 tokens per session scan A 7fbfb7b48728

Subscribe to this mod's changes

praman-cli is a cursor rule published in the GitHub repository mrkanitkar/playwright-praman (11 stars, last pushed 7d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 747 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.