Start a project
Use an OpenAPI document to write the two manifests without interactive prompts:
tungsten init --from openapi.yaml --dir my-api --targets webmcp,py
tungsten check my-api
tungsten doctor my-api --strict
tungsten generate my-api
--targets accepts typescript, python, rust, docs, mcp, webmcp, and
mock. Use ts, py, or rs as aliases. Separate targets with commas or repeat
--targets. Duplicates are removed. Unknown names fail before files are written.
The mock target is reserved; use tungsten mock to run the built-in mock server.
Without --targets, init keeps the existing TypeScript, Python, and docs defaults.
Selecting webmcp also configures the TypeScript SDK and connects the browser
adapter to it using sdk_path: ../typescript. Selecting both mcp and
typescript also connects the server to that local SDK. Edit the package names,
versions, output locations, and other target settings in tungsten.yml as needed.
Init derives the API name, namespace, and default server from the specification.
When no document is found, it writes a placeholder spec path with a TODO.
Review the safety rules in agent.yml, especially operations with side effects.
Existing manifests are preserved unless --force is given. Symlinks and other
nonregular manifest entries are refused even with --force.
Check local prerequisites
Bare tungsten doctor remains an informational list of optional tools and always
succeeds. Give it a project directory or a tungsten manifest to identify the tools
required by its configured targets:
tungsten doctor my-api
tungsten doctor my-api --strict
TypeScript, MCP, and WebMCP require Node.js 22 or newer and npm to build and install
the generated packages. Python requires Python 3.12 or newer; Rust requires Cargo and rustc 1.88 or newer.
Other tools remain optional. --strict fails when a required tool is missing, its
version is unsupported, or a required minimum version cannot be determined. With
--strict and no path, doctor checks the current project. A docs-only project has
no required external tools. Invalid project manifests fail in either project mode.
Explicit sdk_path, runtime_path, and sdk_runtime_path settings are inspected
for local package.json files relative to the generated target's output directory.
These checks are informational: generation or dependency installation may still be
pending. Doctor performs no registry requests, package installation, login, or
credential prompts; success does not verify package publication or registry access.
Build generated packages
Generate first, then build the SDK before its agent adapter:
(cd my-api/generated/typescript && npm install && npm run build)
(cd my-api/generated/webmcp && npm install && npm run build)
The browser adapter requires the @elysra/tungsten-webmcp and @elysra/tungsten-runtime packages.
Their versions and any local development paths belong in the target options.
See the Browser WebMCP guide for frontend registration and disposal.