{"id":22347497,"url":"https://github.com/chand1012/sq","last_synced_at":"2025-07-30T04:33:15.854Z","repository":{"id":224227609,"uuid":"762580136","full_name":"chand1012/sq","owner":"chand1012","description":"Convert and query JSON, JSONL, CSV, and SQLite with ease!","archived":false,"fork":false,"pushed_at":"2024-02-27T16:25:22.000Z","size":90,"stargazers_count":24,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T02:11:12.217Z","etag":null,"topics":["cli","csv","golang","json","jsonl","scripting","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chand1012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-24T05:25:17.000Z","updated_at":"2024-12-30T22:29:14.000Z","dependencies_parsed_at":"2024-02-24T17:29:37.548Z","dependency_job_id":"8a7fd7f5-671b-40c7-a05c-a3257131fac0","html_url":"https://github.com/chand1012/sq","commit_stats":null,"previous_names":["chand1012/sq"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/chand1012/sq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fsq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fsq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fsq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fsq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chand1012","download_url":"https://codeload.github.com/chand1012/sq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fsq/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267809649,"owners_count":24147512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","csv","golang","json","jsonl","scripting","sqlite","sqlite3"],"created_at":"2024-12-04T10:09:36.688Z","updated_at":"2025-07-30T04:33:15.531Z","avatar_url":"https://github.com/chand1012.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003esq\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eConvert and query JSON, JSONL, CSV, and SQLite with ease!\u003c/h3\u003e\n\n`sq` is a simple yet powerful command line tool for query and converting from and to SQLite, CSV, JSON, and JSONL files, heavily inspired by [ `jq` ](https://jqlang.github.io/jq/).\n\n## Features\n\n* Convert between SQLite, CSV, JSON, and JSONL files.\n* Query CSV, JSON, and JSONL using real SQLite queries.\n* Allows for rapid scripting and conversion of data.\n* Pipe in data or read from files.\n\n## Installation\n\nDownload a prebuilt binary from the [releases page](https://github.com/chand1012/sq/releases) and add it to your PATH, or use `go install` to install the latest version.\n\n```bash\ngo install github.com/chand1012/sq@latest\n```\n\n## Examples\n\nQuery some orders from a CSV file. Column names for CSV files are converted to lower case and spaces are replaced with underscores.\n\n```bash\n$ sq -r orders.csv 'SELECT country FROM sq WHERE seller_amount \u003e 20 NOT NULL;'\nUnited States of America\nUnited States of America\nUnited States of America\nUnited States of America\nUnited States of America\nUnited States of America\nUnited Kingdom\nCanada\nUnited States of America\nUnited States of America\nUnited States of America\nUnited States of America\nUnited States of America\nCanada\nUnited States of America\nCanada\nCanada\nAustralia\nUnited States of America\n...\n```\n\nDownload and query some JSONL datasets.\n\n```bash\n$ curl https://raw.githubusercontent.com/TimeSurgeLabs/llm-finetuning/4e934ce602f34f62f4d803c40cd1e7825d216192/data/fingpt-sentiment-1k.jsonl | sq 'SELECT * FROM sq WHERE output = \"positive\";' -f jsonl \u003e positive.jsonl\n```\n\nYou can even use it with `jq` !\n\n```bash\n$ curl https://api.gogopool.com/stakers | jq '.stakers' | sq -t stakers 'SELECT stakerAddr,avaxValidating FROM stakers WHERE avaxValidating \u003e 0;' -f json \u003e stakers.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchand1012%2Fsq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchand1012%2Fsq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchand1012%2Fsq/lists"}