← All procedures

git.remote

Get or set remote URLs

CLI
Package
@procedures/git · README
Path
["git","remote"]
CLI
mark git remote
As data
{"$proc":["git","remote"],"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","remote"], {});
console.log(JSON.stringify(result));

From the command line

$ mark git remote

As data, in a program

{ "$proc": ["git", "remote"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
namestringno"origin"Remote name (default: origin)
urlstringnoNew URL to set (if provided, sets the URL; otherwise gets it)
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
namestringyesThe remote name
urlstringyesThe remote URL
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "name": {
        "default": "origin",
        "description": "Remote name (default: origin)",
        "type": "string"
      },
      "url": {
        "description": "New URL to set (if provided, sets the URL; otherwise gets it)",
        "type": "string"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "The remote name"
      },
      "url": {
        "type": "string",
        "description": "The remote URL"
      }
    },
    "required": [
      "name",
      "url"
    ],
    "additionalProperties": {}
  }
}