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","log"], {});
console.log(JSON.stringify(result));From the command line
$ mark git log
As data, in a program
{ "$proc": ["git", "log"], "input": {} }JSON Schemas
{
"input": {
"type": "object",
"properties": {
"count": {
"default": 10,
"description": "Number of commits to show (default: 10)",
"type": "number"
},
"oneline": {
"default": false,
"description": "One line per commit (default: false)",
"type": "boolean"
},
"ref": {
"description": "Branch/tag/commit to start from (default: HEAD)",
"type": "string"
},
"cwd": {
"description": "Working directory",
"type": "string"
}
}
},
"output": {
"type": "object",
"properties": {
"commits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "The commit hash"
},
"shortHash": {
"type": "string",
"description": "The short hash"
},
"author": {
"type": "string",
"description": "The author name"
},
"email": {
"type": "string",
"description": "The author email"
},
"date": {
"type": "string",
"description": "The author date"
},
"message": {
"type": "string",
"description": "The commit message"
}
},
"required": [
"hash",
"shortHash",
"author",
"email",
"date",
"message"
],
"additionalProperties": {}
},
"description": "The commits, newest first"
},
"lines": {
"description": "With oneline: true, the short hash and the subject of each commit",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"commits"
],
"additionalProperties": {}
}
}