wirenetdocs
Get started

Quickstart

Draft

Spin up a typed spine, point your agent at it, and write something you can replay — in roughly fifteen minutes.

Prerequisites

  • An account on platform.wirenet.dev
  • Node.js 22 or higher (or Python 3.13 if you prefer)
  • An agentic surface installed — Codex desktop, Claude Code, or Cowork

1. Create a spine

Install the CLI and authenticate:

npm i -g @wirenet/cli
wirenet login

Create a new spine and link it to the current directory:

wirenet init my-spine
cd my-spine

2. Define your first entity

Open spine/entities.ts and declare an entity in your domain vocabulary. The example below uses Project; replace it with a noun your team actually uses.

import { entity } from "@wirenet/spine";

export const Project = entity("Project", {
  id: "ProjectId",
  name: "string",
  archived: { type: "boolean", default: false },
});

3. Add a command

Commands change state. Every command writes a typed row to the event log in the same transaction as the mutation.

import { command } from "@wirenet/spine";
import { Project } from "./entities";

export const renameProject = command({
  name: "renameProject",
  input: { id: Project.id, name: "string" },
  effect: async (ctx, { id, name }) => {
    await ctx.update(Project, id, { name });
    return { kind: "ProjectRenamed", id, name };
  },
  inverse: { name: "restoreProjectName" },
});

4. Connect an agent

Point your existing agentic surface at the hosted MCP endpoint for this spine. For Codex desktop, add the endpoint to ~/.codex/config.toml:

[mcp.servers.my-spine]
url = "https://mcp.wirenet.dev/<your-spine-id>"
auth = "{{ env.WIRENET_TOKEN }}"

Your agent now sees every operation declared in the spine — nothing more, nothing less.

5. Replay the event

Have the agent rename a project. Then run:

wirenet log tail --pretty

You should see the typed ProjectRenamed row land, attributed to the agent that wrote it. Run wirenet replay last 1 --against ./spine against a new version of the command and read the diff. That’s the loop: operate → log → replay before you change anything.