Native Shell
Native Shell: AI-generated UI, native in your app, on every platform. Apps on iOS, Android, macOS, Windows and Linux, GPUI apps and web pages load signed, sandboxed TSX modules at run time and draw th
One set of commands for your web app, for people and AI agents. WebMCP hands tools to agents; Sutram decides what they are.
Developer toolsJavaScript · HTMLGitHub @d34dmanOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Give your web app a command line, for people and AI agents. Register commands once: get a console, help and man pages, and WebMCP tools.
Taken from the repository README
Loading the full README.
Read the full README ↗One set of commands for your web app: people type them, AI agents call them. Try it live →
Sutram turns what your web app can do into commands. WebMCP is how a page hands tools to an agent; Sutram decides what those tools are. Every part of the app (a form, the navigation, a module) registers its commands in one registry, the same way. Register a command once, and it is there for everyone:
Sutram.call().› help
cart add <sku> [qty] Add a product to the cart
cart status Show what is in the cart [read-only]
checkout Place the order [consequential]
› cart add V60-02 --qty=2
Added 2 × V60 dripper, size 02. The cart has 2 items, €48.00.
› checkout
Place an order for 2 items, €48.00? [Yes] [No]
help, man, Tab completion, history and
"did you mean". You write no help pages.Save this as an HTML file, open it in a browser and press ` (the key left of 1):
<!doctype html>
<meta charset="utf-8">
<title>Hello, Sutram</title>
<p>Press <kbd>`</kbd> and type <code>help</code>.</p>
<script type="module">
import Sutram from "https://cdn.jsdelivr.net/npm/@d34dman/[email protected]/dist/sutram.js";
Sutram.register({
name: "hello world",
provider: "hello",
description: "Say hello",
input: {
type: "object",
properties: { who: { type: "string", default: "you", description: "Who to greet" } },
},
positional: ["who"],
annotations: { readOnly: true },
run: ({ who }) => ({ text: `Hello, ${who}.` }),
});
Sutram.mountConsole();
</script>
Then try:
› help
› hello world
› hello world Ada
› hello world --who="Grace Hopper"
› hello world -h
› man hello world
npm install @d34dman/sutram
Other ways in:
dist/sutram.js as a module from a CDN, as in
the quick start. It sets up the console and WebMCP for you.drupal/sutram
module.See Install for the details.
Without Sutram, an agent reads the page (screenshots, snapshots, HTML), works out what to click, then reads the page again to see whether it worked. With Sutram, it reads a short list of commands and runs them:
form fields node-article-form
form set node-article-form title "Pour-over, step by step"
form submit node-article-form
When something is wrong, the error names the field and the fix, so the agent corrects one value instead of starting over.
On the Drupal demo, Claude Code built a Canvas page with half the task tokens and 7 fewer calls (21 instead of 28) than the same agent without Sutram, and edited an article in 11 calls instead of 14. One run each, so a direction, not a benchmark. See Why commands and the measurements.
WebMCP lets a page hand tools to an agent. It does not say which tools, how they are named, or how many parts of an app share one page. Sutram is that layer, and WebMCP is one of the ways out of it.
form set <form> … is the tool form_set for every form, not one
tool per form. Commands look up their target when they run and answer "not
on this page" when it is gone, so the tool list stays put.help, man, status), errors that
name the fix, changes to wait for (events wait) or poll (events recent), and app-defined formats.
What WebMCP has no field for, like what a command returns or that it leaves
the page, goes into the tool description.Sutram.call() or the console. Browsers with WebMCP
get native tools, and your code does not change when support arrives.Sutram registers its tools through WebMCP's own registerTool(), and it never
reads or changes the page's HTML: your app's JavaScript says what the commands
are. It does not replace Playwright or browser agents either. They drive the
browser; Sutram gives them commands to call instead of buttons to click.
For one app with a few fixed actions, plain WebMCP is enough. Sutram earns its place when several parts of an app share a page, or when people should use the same commands as the agent.
Read it at d34dman.github.io/sutram/docs
or in docs/. Most apps need only these four:
Later, when you need them: forms, batches, formats, events and the API reference.
llms.txt
and llms-full.txt. Every
docs page is also published as Markdown.skills/:
use a Sutram page for agents that drive
a browser, and add Sutram to an app for
coding agents.Sutram.agentPrompt(task) hands a task to an agent that
drives a browser. The agent opens the console and starts with help.git clone https://github.com/d34dman/sutram.git
cd sutram
npm test # node --test, no dependencies to install
npm run example # a todo list to play with, at http://localhost:8080/example/
npm run build # dist/sutram.js
npm run site # the website and docs, at http://localhost:8080/site/
npm run docs # regenerate the generated docs (API, measurements, skill, llms.txt)
See CONTRIBUTING.md.
Sūtram (सूत्रम्) is Sanskrit for a short, exact rule. Pāṇini described all of Sanskrit grammar in about 4,000 of them. In Malayalam, sūtram (സൂത്രം) is also everyday speech for a knack, a clever little device. Each command is a sūtram: one short line in place of clicks and screenshots.
Version 0.8, early. Sutram follows semantic versioning
for its JavaScript API: register() and command definitions, the kits'
adapters, annotations, the policy, exit codes, the result envelope
({ code, text, data } or { code, message }), the entry points and their
types. Until 1.0, a breaking change there bumps the minor version (0.8 → 0.9).
The commands themselves are not part of that promise: the kits' command
names, their parameters, what they print and return in data, and the
WebMCP tool descriptions. Agents learn them on every page (help, man, the
tool list), so they may change in any release when that makes them work
better. We try not to, and the changelog lists every change
under Commands. Code that hard-codes command lines, such as tests that use
Sutram.call() or Sutram.exec(), should pin a version.
Your choice of MIT or GPL 2.0 or later
(MIT OR GPL-2.0-or-later). MIT fits most JavaScript projects; GPL fits
Drupal and other GPL software. Version 0.2.0 on npm was GPL only.