← All procedures
git.add
Stage files
CLI- Package
- @procedures/git · README
- Path
["git","add"]- CLI
mark git add- As data
{"$proc":["git","add"],"input":{}}
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","add"], {});
console.log(JSON.stringify(result));From the command line
$ mark git add
As data, in a program
{ "$proc": ["git", "add"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
paths | string[] | no | [] | Paths to stage (default: []) |
all | boolean | no | false | Stage all changes (default: false) |
cwd | string | no | | Working directory |
Output
| Field | Type | Required | Default | Description |
|---|
staged | string[] | yes | | The files that the call staged |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"paths": {
"default": [],
"description": "Paths to stage (default: [])",
"type": "array",
"items": {
"type": "string"
}
},
"all": {
"default": false,
"description": "Stage all changes (default: false)",
"type": "boolean"
},
"cwd": {
"description": "Working directory",
"type": "string"
}
}
},
"output": {
"type": "object",
"properties": {
"staged": {
"type": "array",
"items": {
"type": "string"
},
"description": "The files that the call staged"
}
},
"required": [
"staged"
],
"additionalProperties": {}
}
}