Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/git"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["git","branch"], {});
console.log(JSON.stringify(result));From the command line
$ mark git branch
As data, in a program
{ "$proc": ["git", "branch"], "input": {} }JSON Schemas
{
"input": {
"type": "object",
"properties": {
"name": {
"description": "Branch name (for create/delete)",
"type": "string"
},
"delete": {
"default": false,
"description": "Delete the branch (default: false)",
"type": "boolean"
},
"list": {
"default": false,
"description": "List branches (default: true if no name provided)",
"type": "boolean"
},
"remote": {
"default": false,
"description": "Include remote branches in list (default: false)",
"type": "boolean"
},
"cwd": {
"description": "Working directory",
"type": "string"
}
}
},
"output": {
"type": "object",
"properties": {
"branches": {
"description": "The branches, for a list",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The branch name"
},
"current": {
"type": "boolean",
"description": "True for the current branch"
},
"remote": {
"type": "boolean",
"description": "True for a remote-tracking branch"
},
"tracking": {
"description": "The upstream of the branch",
"type": "string"
}
},
"required": [
"name",
"current",
"remote"
],
"additionalProperties": {}
}
},
"created": {
"description": "The branch that the call made",
"type": "string"
},
"deleted": {
"description": "The branch that the call deleted",
"type": "string"
},
"current": {
"type": "string",
"description": "The current branch"
}
},
"required": [
"current"
],
"additionalProperties": {}
}
}