Skip to content

Commit 7679ea2

Browse files
committed
Add section about json output
1 parent 32bacf2 commit 7679ea2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,26 @@ More details [here](https://www.chromium.org/developers/applescript). Thanks to
100100
chrome-cli chrome version (Print Chrome version)
101101
chrome-cli version (Print application version)
102102

103+
#### JSON output
104+
105+
You can set the environment variable `OUTPUT_FORMAT` to json to get json output.
106+
For example:
107+
108+
```
109+
$ OUTPUT_FORMAT=json chrome-cli list tabs
110+
{
111+
"tabs" : [
112+
{
113+
"id" : 1869578516,
114+
"title" : "Lobsters",
115+
"url" : "https://lobste.rs/",
116+
"windowId" : 1869578514,
117+
"windowName" : "Lobsters"
118+
}
119+
]
120+
}
121+
```
122+
103123
## Examples
104124

105125
###### List tabs

0 commit comments

Comments
 (0)