← All procedures

lib.new

Create a new package in the ecosystem

MCPCLI
Package
@procedures/lib · README
Path
["lib","new"]
CLI
mark lib new --name <string>
MCP tool
lib.new on the dev-tools server
As data
{"$proc":["lib","new"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/lib"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["lib","new"], { name: "<name>" });
console.log(JSON.stringify(result));

From the command line

$ mark lib new --name <string>

As data, in a program

{ "$proc": ["lib", "new"], "input": { "name": "<name>" } }

Input

FieldTypeRequiredDefaultDescription
namestringyesPackage name (without the @procedures/ scope)
presetstringno"lib"Feature preset to use
rootPathstringnoWorkspace root (defaults to the pnpm workspace that contains client-lib)
dryRunbooleannofalsePreview changes without creating

Output

FieldTypeRequiredDefaultDescription
successbooleanyesTrue when the package was made
packageNamestringyesThe full package name (@procedures/...)
packagePathstringyesThe folder of the new package
createdstring[]yesThe files that the call made
operationsstring[]yesThe steps that the call ran
errorsstring[]yesThe errors
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9-]*$",
        "description": "Package name (without the @procedures/ scope)"
      },
      "preset": {
        "default": "lib",
        "description": "Feature preset to use",
        "type": "string",
        "pattern": "^[a-z][a-z0-9-]*$"
      },
      "rootPath": {
        "description": "Workspace root (defaults to the pnpm workspace that contains client-lib)",
        "type": "string"
      },
      "dryRun": {
        "default": false,
        "description": "Preview changes without creating",
        "type": "boolean"
      }
    },
    "required": [
      "name"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "success": {
        "type": "boolean",
        "description": "True when the package was made"
      },
      "packageName": {
        "type": "string",
        "description": "The full package name (@procedures/...)"
      },
      "packagePath": {
        "type": "string",
        "description": "The folder of the new package"
      },
      "created": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The files that the call made"
      },
      "operations": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The steps that the call ran"
      },
      "errors": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The errors"
      }
    },
    "required": [
      "success",
      "packageName",
      "packagePath",
      "created",
      "operations",
      "errors"
    ],
    "additionalProperties": {}
  }
}