← 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

FieldTypeRequiredDefaultDescription
pathsstring[]no[]Paths to stage (default: [])
allbooleannofalseStage all changes (default: false)
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
stagedstring[]yesThe 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": {}
  }
}