Skip to content

Commit

Permalink
Add section about json output
Browse files Browse the repository at this point in the history
  • Loading branch information
prasmussen committed Jan 21, 2023
1 parent 32bacf2 commit 7679ea2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,26 @@ More details [here](https://www.chromium.org/developers/applescript). Thanks to
chrome-cli chrome version (Print Chrome version)
chrome-cli version (Print application version)

#### JSON output

You can set the environment variable `OUTPUT_FORMAT` to json to get json output.
For example:

```
$ OUTPUT_FORMAT=json chrome-cli list tabs
{
"tabs" : [
{
"id" : 1869578516,
"title" : "Lobsters",
"url" : "https://lobste.rs/",
"windowId" : 1869578514,
"windowName" : "Lobsters"
}
]
}
```

## Examples

###### List tabs
Expand Down

0 comments on commit 7679ea2

Please sign in to comment.