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","checkout"], { ref: "<ref>" });
console.log(JSON.stringify(result));From the command line
$ mark git checkout --ref <string>
As data, in a program
{ "$proc": ["git", "checkout"], "input": { "ref": "<ref>" } }JSON Schemas
{
"input": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "Branch, tag, or commit to checkout"
},
"create": {
"default": false,
"description": "Create branch if it doesn't exist (default: false)",
"type": "boolean"
},
"paths": {
"description": "Specific paths to checkout (default: all)",
"type": "array",
"items": {
"type": "string"
}
},
"cwd": {
"description": "Working directory",
"type": "string"
}
},
"required": [
"ref"
]
},
"output": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The branch or the ref that is checked out"
},
"created": {
"type": "boolean",
"description": "True when the call made the branch"
}
},
"required": [
"ref",
"created"
],
"additionalProperties": {}
}
}