Microtica SDK
A typed TypeScript client for the Microtica API. Manage projects, environments, apps, pipelines, and logs from Node.js with full type safety.
The Microtica SDK is a typed TypeScript client for the Microtica API. It's the contract the rest of the tooling builds on — the CLI is a thin wrapper over it, and any harness or service you write shares the same client and behavior.
Use the SDK when you want to automate Microtica from your own Node.js code: a deployment script, a backend service, a custom internal tool, or an MCP server.
Install
The SDK ships as the @microtica/sdk npm package. You need Node.js 18 or newer.
npm install @microtica/sdkQuickstart
Construct a Microtica client with your credential, then call into one of its namespaces.
import { Microtica } from "@microtica/sdk";
const microtica = new Microtica({
token: process.env.MICROTICA_TOKEN!,
});
// List the projects your token can access
const projects = await microtica.projects.list();
// List the environments in one project
const envs = await microtica.envs.list(projects[0].id);
console.log(envs);Every namespace method returns the API response data directly (already unwrapped from the HTTP envelope) and is fully typed.
Namespaces
A single Microtica instance exposes one namespace per resource area.
| Namespace | What it manages |
|---|---|
projects | List and read the projects your credential can access. |
envs | Environments (stages): clone, deploy, wait, update resources, tear down. |
apps | Kubernetes apps: deploy, scale, read status, find deployments. |
pipelines | Pipelines and builds: create, trigger, list history, stream logs. |
components | Reusable infrastructure components and their config schemas. |
git | Connected Git accounts, repositories, and branches. |
whoami | Inspect the stored credential's identity. |
Explore
The client
Construct the client with an API key, inspect identity, and handle errors.
Environments
Clone, deploy, and tear down environments and their resources.
Applications
Deploy and scale Kubernetes apps and read their live status.
Streaming logs
Iterate build, deployment, and app logs as a typed async stream.
Next steps
Use the CLI with AI agents
Drive Microtica from Claude Code, Cursor, or any AI harness using the CLI's built-in agent reference, JSON output, and structured errors.
The SDK client
Construct the Microtica SDK client with an API key, set the request timeout, inspect identity, and handle errors in your Node.js code.