https://github.com/gptscript-ai/json-query
gptscript for querying JSON documents
https://github.com/gptscript-ai/json-query
Last synced: 11 months ago
JSON representation
gptscript for querying JSON documents
- Host: GitHub
- URL: https://github.com/gptscript-ai/json-query
- Owner: gptscript-ai
- Created: 2024-02-22T16:58:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-06T21:41:01.000Z (almost 2 years ago)
- Last Synced: 2024-08-07T00:55:06.403Z (almost 2 years ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gptscript JSON query tool
This tool is a simple command line tool to query json documents using jq. It is written in javascript and uses the node-jq package to install and run jq.
## Installation
```bash
git clone https://github.com/gptscript/json-query
cd json-query
npm install
```
## CLI Usage
To test this command out directly you can run:
```bash
node jq.js --query '.' --jsonpath ./package.json
```
this will output the local package.json file.
## gptscript usage
To use this tool in a gptscript you can use the following code:
```gptscript
tools: ./tool.gpt
What is the version specified in the package.json file
```
A more complex example:
```gptscript
tools: ./tool.gpt,sys.download
download https://raw.githubusercontent.com/bahamas10/css-color-names/master/css-color-names.json
find out the css values for darkviolet and the color blue
```