@oada/cli
Version:
CLI OADA client
792 lines • 24 kB
JSON
{
"version": "5.0.0",
"commands": {
"delete": {
"id": "delete",
"description": "perform an OADA DELETE",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"d",
"rm",
"DELETE"
],
"examples": [
"\u001b[90m$\u001b[39m oada delete /bookmarks/foo",
"\u001b[90m$\u001b[39m oada rm /bookmarks/foo /bookmarks/bar /bookmarks/baz*"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
},
"recursive": {
"name": "recursive",
"type": "boolean",
"char": "R",
"allowNo": false
}
},
"args": {}
},
"get": {
"id": "get",
"description": "perform an OADA GET (read)",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"g",
"GET"
],
"examples": [
"\u001b[90m$\u001b[39m oada get /bookmarks\n{\n \u001b[36m\"_id\"\u001b[39m: \u001b[31m\"resources/default:resources_bookmarks_321\"\u001b[39m,\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m45\u001b[39m,\n \u001b[36m\"_type\"\u001b[39m: \u001b[31m\"application/vnd.oada.bookmarks.1+json\"\u001b[39m,\n \u001b[36m\"_meta\"\u001b[39m: {\n \u001b[36m\"_id\"\u001b[39m: \u001b[31m\"resources/default:resources_bookmarks_321/_meta\"\u001b[39m,\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m45\u001b[39m\n },\n \u001b[36m\"foo\"\u001b[39m: \u001b[31m\"bar\"\u001b[39m,\n \u001b[36m\"baz\"\u001b[39m: \u001b[32m700\u001b[39m\n}",
"\u001b[90m$\u001b[39m oada get /bookmarks/*\n\u001b[31m\"bar\"\u001b[39m\n\u001b[32m700\u001b[39m"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
},
"tree": {
"name": "tree",
"type": "option",
"char": "T",
"description": "file containing an OADA tree to use for a tree GET",
"multiple": false
},
"recursive": {
"name": "recursive",
"type": "boolean",
"char": "R",
"allowNo": false
},
"meta": {
"name": "meta",
"type": "boolean",
"char": "m",
"allowNo": false
},
"out": {
"name": "out",
"type": "option",
"char": "o",
"multiple": false,
"default": "-"
}
},
"args": {}
},
"head": {
"id": "head",
"description": "perform an OADA HEAD",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"h",
"HEAD"
],
"examples": [
"\u001b[90m$\u001b[39m oada head /bookmarks/does-exist; \u001b[36mecho\u001b[39m $?\n0",
"\u001b[90m$\u001b[39m oada head /bookmarks/does-not-exist; \u001b[36mecho\u001b[39m $?\n1"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
}
},
"args": {}
},
"poll": {
"id": "poll",
"description": "Poll an OADA path with periodic GETs",
"strict": true,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"POLL"
],
"examples": [
""
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
},
"out": {
"name": "out",
"type": "option",
"char": "o",
"multiple": false,
"default": "-"
},
"tree": {
"name": "tree",
"type": "option",
"char": "T",
"description": "file containing an OADA tree to use for a tree GET",
"multiple": false
},
"interval": {
"name": "interval",
"type": "option",
"char": "i",
"multiple": false,
"default": 1000
}
},
"args": {
"path": {
"name": "path",
"description": "OADA path to poll",
"required": true
}
}
},
"post": {
"id": "post",
"description": "Perform an OADA POST",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"po",
"POST"
],
"examples": [
"\u001b[90m$\u001b[39m oada post - /bookmarks/ <<< \u001b[31m'{\"a\": 1}{\"b\": true}'\u001b[39m"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
},
"tree": {
"name": "tree",
"type": "option",
"char": "T",
"description": "file containing an OADA tree to use for a tree POST",
"multiple": false
}
},
"args": {}
},
"put": {
"id": "put",
"description": "Perform an OADA PUT",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"pu",
"PUT"
],
"examples": [
"\u001b[90m$\u001b[39m oada put - /bookmarks/ <<< \u001b[31m'{\"a\": 1}'\u001b[39m"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
},
"tree": {
"name": "tree",
"type": "option",
"char": "T",
"description": "file containing an OADA tree to use for a tree PUT",
"multiple": false
}
},
"args": {}
},
"watch": {
"id": "watch",
"description": "perform and OADA WATCH",
"strict": true,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"w",
"WATCH"
],
"examples": [
"\u001b[90m$\u001b[39m oada watch /bookmarks\n[\n {\n \u001b[36m\"resource_id\"\u001b[39m: \u001b[31m\"resources/dd2d0c95-89ab-400d-863c-e2f62e9570a5\"\u001b[39m,\n \u001b[36m\"path\"\u001b[39m: \u001b[31m\"\"\u001b[39m,\n \u001b[36m\"body\"\u001b[39m: {\n \u001b[36m\"services\"\u001b[39m: {\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m213\u001b[39m\n },\n \u001b[36m\"_meta\"\u001b[39m: {\n \u001b[36m\"modifiedBy\"\u001b[39m: \u001b[31m\"system/rev_graph_update\"\u001b[39m,\n \u001b[36m\"modified\"\u001b[39m: \u001b[32m1610676324.424\u001b[39m,\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m8799\u001b[39m\n },\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m8799\u001b[39m\n },\n \u001b[36m\"type\"\u001b[39m: \u001b[31m\"merge\"\u001b[39m\n },\n {\n \u001b[36m\"resource_id\"\u001b[39m: \u001b[31m\"resources/1e6mHvcV9ZUczdzLDIdz9T8s2eV\"\u001b[39m,\n \u001b[36m\"path\"\u001b[39m: \u001b[31m\"/services\"\u001b[39m,\n \u001b[36m\"body\"\u001b[39m: {\n \u001b[36m\"ainz\"\u001b[39m: {\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m169\u001b[39m\n },\n \u001b[36m\"_meta\"\u001b[39m: {\n \u001b[36m\"modifiedBy\"\u001b[39m: \u001b[31m\"system/rev_graph_update\"\u001b[39m,\n \u001b[36m\"modified\"\u001b[39m: \u001b[32m1610676324.29\u001b[39m,\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m213\u001b[39m\n },\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m213\u001b[39m\n },\n \u001b[36m\"type\"\u001b[39m: \u001b[31m\"merge\"\u001b[39m\n },\n {\n \u001b[36m\"resource_id\"\u001b[39m: \u001b[31m\"resources/7f0d1bcf-c0f9-44a1-a506-18c2fb3e73ed\"\u001b[39m,\n \u001b[36m\"path\"\u001b[39m: \u001b[31m\"/services/ainz\"\u001b[39m,\n \u001b[36m\"body\"\u001b[39m: {\n \u001b[36m\"rules\"\u001b[39m: {\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m151\u001b[39m\n },\n \u001b[36m\"_meta\"\u001b[39m: {\n \u001b[36m\"modifiedBy\"\u001b[39m: \u001b[31m\"system/rev_graph_update\"\u001b[39m,\n \u001b[36m\"modified\"\u001b[39m: \u001b[32m1610676324.12\u001b[39m,\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m169\u001b[39m\n },\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m169\u001b[39m\n },\n \u001b[36m\"type\"\u001b[39m: \u001b[31m\"merge\"\u001b[39m\n },\n {\n \u001b[36m\"resource_id\"\u001b[39m: \u001b[31m\"resources/f6e90c0f-7900-446e-989d-5d32d5dcb741\"\u001b[39m,\n \u001b[36m\"path\"\u001b[39m: \u001b[31m\"/services/ainz/rules\"\u001b[39m,\n \u001b[36m\"body\"\u001b[39m: {\n \u001b[36m\"_meta\"\u001b[39m: {\n \u001b[36m\"modifiedBy\"\u001b[39m: \u001b[31m\"users/5989462\"\u001b[39m,\n \u001b[36m\"modified\"\u001b[39m: \u001b[32m1610676323.964\u001b[39m,\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m151\u001b[39m\n },\n \u001b[36m\"_rev\"\u001b[39m: \u001b[32m151\u001b[39m\n },\n \u001b[36m\"type\"\u001b[39m: \u001b[31m\"merge\"\u001b[39m\n }\n]"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
},
"out": {
"name": "out",
"type": "option",
"char": "o",
"multiple": false,
"default": "-"
},
"rev": {
"name": "rev",
"type": "option",
"char": "r",
"description": "rev from which to start (negative means latest - n)",
"multiple": false
},
"type": {
"name": "type",
"type": "option",
"char": "t",
"multiple": false,
"default": "tree"
}
},
"args": {
"path": {
"name": "path",
"description": "OADA path to WATCH",
"required": true
}
}
},
"config:show": {
"id": "config:show",
"description": "Show the current config settings",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"config"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
}
},
"args": {}
},
"fs:copy": {
"id": "fs:copy",
"description": "perform an \"OADA copy\"",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"cp"
],
"examples": [
"\u001b[90m$\u001b[39m oada cp /resources/foo /bookmarks/foo",
"\u001b[90m$\u001b[39m oada cp /resources/foo1 /resources/foo2 /bookmarks/foo/"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
}
},
"args": {}
},
"fs:link": {
"id": "fs:link",
"description": "perform an \"OADA link\"",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"ln"
],
"examples": [
"\u001b[90m$\u001b[39m oada ln /resources/my-thingy /bookmarks/thingy",
"\u001b[90m$\u001b[39m oada ln /resources/thingy1 /resources/thingy2 /bookmarks/thingies/"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
},
"versioned": {
"name": "versioned",
"type": "boolean",
"char": "r",
"description": "make versioned link(s)",
"allowNo": false
},
"force": {
"name": "force",
"type": "boolean",
"char": "f",
"description": "delete conflicting existing data/links",
"allowNo": false
}
},
"args": {}
},
"fs:list": {
"id": "fs:list",
"description": "perform an \"OADA ls\"",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"ls",
"l"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
}
},
"args": {}
},
"fs:move": {
"id": "fs:move",
"description": "perform an \"OADA move\"",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"mv"
],
"examples": [
"\u001b[90m$\u001b[39m oada mv /resources/foo /bookmarks/foo",
"\u001b[90m$\u001b[39m oada mv /resources/foo1 /resources/foo2 /bookmarks/foo/"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
}
},
"args": {}
},
"fs:remove": {
"id": "fs:remove",
"description": "perform an OADA DELETE",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"d",
"rm",
"DELETE"
],
"examples": [
"\u001b[90m$\u001b[39m oada delete /bookmarks/foo",
"\u001b[90m$\u001b[39m oada rm /bookmarks/foo /bookmarks/bar /bookmarks/baz*"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
},
"recursive": {
"name": "recursive",
"type": "boolean",
"char": "R",
"allowNo": false
}
},
"args": {}
},
"fs:touch": {
"id": "fs:touch",
"description": "perform and \"OADA touch\"",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"touch"
],
"examples": [
"\u001b[90m$\u001b[39m oada touch /bookmarks"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
}
},
"args": {}
},
"humanize:humanize": {
"id": "humanize:humanize",
"strict": false,
"pluginName": "@oada/cli",
"pluginAlias": "@oada/cli",
"pluginType": "core",
"aliases": [
"humanize"
],
"flags": {
"domain": {
"name": "domain",
"type": "option",
"char": "d",
"description": "default OADA API domain",
"multiple": false,
"default": "localhost"
},
"token": {
"name": "token",
"type": "option",
"char": "t",
"description": "default OADA API token",
"multiple": false
},
"tty": {
"name": "tty",
"type": "boolean",
"description": "format output for TTY",
"allowNo": true
},
"ws": {
"name": "ws",
"type": "boolean",
"description": "use WebSockets for OADA API",
"allowNo": true
}
},
"args": {}
}
}
}