@oada/cli
Version:
CLI OADA client
792 lines • 21.8 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": [
"$ oada delete /bookmarks/foo",
"$ 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": [
"$ oada get /bookmarks\n{\n \"_id\": \"resources/default:resources_bookmarks_321\",\n \"_rev\": 45,\n \"_type\": \"application/vnd.oada.bookmarks.1+json\",\n \"_meta\": {\n \"_id\": \"resources/default:resources_bookmarks_321/_meta\",\n \"_rev\": 45\n },\n \"foo\": \"bar\",\n \"baz\": 700\n}",
"$ oada get /bookmarks/*\n\"bar\"\n700"
],
"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": [
"$ oada head /bookmarks/does-exist; echo $?\n0",
"$ oada head /bookmarks/does-not-exist; echo $?\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": [
"$ oada post - /bookmarks/ <<< '{\"a\": 1}{\"b\": true}'"
],
"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": [
"$ oada put - /bookmarks/ <<< '{\"a\": 1}'"
],
"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": [
"$ oada watch /bookmarks\n[\n {\n \"resource_id\": \"resources/dd2d0c95-89ab-400d-863c-e2f62e9570a5\",\n \"path\": \"\",\n \"body\": {\n \"services\": {\n \"_rev\": 213\n },\n \"_meta\": {\n \"modifiedBy\": \"system/rev_graph_update\",\n \"modified\": 1610676324.424,\n \"_rev\": 8799\n },\n \"_rev\": 8799\n },\n \"type\": \"merge\"\n },\n {\n \"resource_id\": \"resources/1e6mHvcV9ZUczdzLDIdz9T8s2eV\",\n \"path\": \"/services\",\n \"body\": {\n \"ainz\": {\n \"_rev\": 169\n },\n \"_meta\": {\n \"modifiedBy\": \"system/rev_graph_update\",\n \"modified\": 1610676324.29,\n \"_rev\": 213\n },\n \"_rev\": 213\n },\n \"type\": \"merge\"\n },\n {\n \"resource_id\": \"resources/7f0d1bcf-c0f9-44a1-a506-18c2fb3e73ed\",\n \"path\": \"/services/ainz\",\n \"body\": {\n \"rules\": {\n \"_rev\": 151\n },\n \"_meta\": {\n \"modifiedBy\": \"system/rev_graph_update\",\n \"modified\": 1610676324.12,\n \"_rev\": 169\n },\n \"_rev\": 169\n },\n \"type\": \"merge\"\n },\n {\n \"resource_id\": \"resources/f6e90c0f-7900-446e-989d-5d32d5dcb741\",\n \"path\": \"/services/ainz/rules\",\n \"body\": {\n \"_meta\": {\n \"modifiedBy\": \"users/5989462\",\n \"modified\": 1610676323.964,\n \"_rev\": 151\n },\n \"_rev\": 151\n },\n \"type\": \"merge\"\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": [
"$ oada cp /resources/foo /bookmarks/foo",
"$ 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": [
"$ oada ln /resources/my-thingy /bookmarks/thingy",
"$ 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": [
"$ oada mv /resources/foo /bookmarks/foo",
"$ 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": [
"$ oada delete /bookmarks/foo",
"$ 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": [
"$ 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": {}
}
}
}