{"id":15771691,"url":"https://github.com/trstringer/peachy-cli","last_synced_at":"2025-06-22T19:08:45.784Z","repository":{"id":57321619,"uuid":"63443123","full_name":"trstringer/peachy-cli","owner":"trstringer","description":":peach: CLI for cross-platform and cross-data-source querying and data manipulation","archived":false,"fork":false,"pushed_at":"2016-07-18T18:17:31.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T19:08:30.412Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trstringer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-15T18:33:05.000Z","updated_at":"2023-08-24T07:28:49.000Z","dependencies_parsed_at":"2022-08-26T01:11:00.201Z","dependency_job_id":null,"html_url":"https://github.com/trstringer/peachy-cli","commit_stats":null,"previous_names":["tstringer/peachy"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/trstringer/peachy-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fpeachy-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fpeachy-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fpeachy-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fpeachy-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trstringer","download_url":"https://codeload.github.com/trstringer/peachy-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fpeachy-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261348755,"owners_count":23145314,"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","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":[],"created_at":"2024-10-04T15:04:24.276Z","updated_at":"2025-06-22T19:08:40.772Z","avatar_url":"https://github.com/trstringer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Peachy :peach:\n\n*The cross-platform and cross-data-source query CLI*\n\n### Currently supported data sources\n\n - [MySQL](#mysql-sql-server-and-sql-azure)\n - [MongoDB](#mongodb)\n - [SQL Server](#mysql-sql-server-and-sql-azure)\n - [SQL Azure](#mysql-sql-server-and-sql-azure)\n - [DocumentDB](#documentdb)\n\n## Future development\n\nThe idea behind this tool is to add all of the main and popular data sources.  This CLI is basically just an interactive shim over the [peacherine module](https://github.com/tstringer/peacherine).  For instance, development work will start in order to add Postgres as an available data source to query\n\n## Installation\n\n```\n$ npm install -g peachy-cli\n```\n\n## Usage\n\n```\n$ peachy -h\n```\n\nOutput:\n\n```\n  Usage: peachy [options]\n\n  Options:\n\n    -h, --help                          output usage information\n    -V, --version                       output the version number\n    -s, --datasources                   list available data source types\n    -l, --list                          list available connections in config (~/.peachy)\n    -t, --test                          test connection\n    -c, --connection \u003cconnection-name\u003e  connection name (from ~/.peachy)\n    -i, --collection \u003ccollection-name\u003e  collection to perform the action on\n    -f, --filter \u003cfilter-json\u003e          filter for searching and updating documents\n    -u, --update \u003cupdate-json\u003e          document update options\n    -o, --operation \u003coperation-name\u003e    action to take on data source\n    -d, --document \u003cdocument-json\u003e      the document to insert, update, or delete from a collection\n    -q, --query \u003cquery\u003e                 query text applicable for certain data sources\n\n  Operations:\n\n    queryCollection (mongodb, documentdb)\n      (all)        --collection  target collection\n      (documentdb) --query       query to run\n      (mongodb)    --filter      filter to search (optional)\n    createDocument (mongodb, documentdb)\n      (all)        --collection  target collection\n      (all)        --document    document to insert\n    updateDocuments (mongodb)\n      (mongodb)    --collection  target collection\n      (mongodb)    --filter      filter to update (optional)\n      (mongodb)    --update      update options to apply to doc\n    deleteDocuments (mongodb)\n      (mongodb)    --collection  target collection\n      (mongodb)    --filter      filter to delete (optional)\n\n    Note: RDMBSes take the query param text to run\n\n    Config file setup: running any command will create the \n      base config file. I.e. run \"peachy -l\" which will list \n      all of the connections in configuration, and if the config \n      file does not exist it will create it at ~/.peachy\n```\n\n## Examples\n\n### List all available connections (or create a new config file in ~/.peachy)\n\n```\n$ peachy -l\n```\n\n\u003e :bulb: If there is not ~/.peachy configuration file then running this will create a base file.  This is the recommended workflow so you don't have to manually create the JSON file, and you can just modify it manually after-the-fact\n\n### List available data sources\n\n```\n$ peachy -s\n```\n\n### Test a connection to any data source\n\n```\n$ peachy -c \u003cconnection-name\u003e -t\n```\n\n# MySQL, SQL Server, and SQL Azure\n\n```\n$ peachy -c \u003cconnection-name\u003e -q \"select * from information_schema.tables\"\n```\n\n# MongoDB\n\n**query all documents** in the collection\n\n```\n$ peachy -c \u003cconnection-name\u003e -i \u003ccollection-name\u003e\n```\n\n**query with a filter**\n\n```\n$ peachy -c \u003cconnection-name\u003e -i \u003ccollection-name\u003e -f \u003cjson-filter\u003e\n```\n\n**insert a document** in the collection\n\n```\n$ peachy -c \u003cconnection-name\u003e -i \u003ccollection-name\u003e -o createDocument -d \u003cjson-document\u003e\n```\n\n**update documents** (or a document) in the collection\n\n```\n$ peachy -c \u003cconnection-name\u003e -i \u003ccollection-name\u003e -o updateDocuments -f \u003cjson-filter\u003e -u \u003cjson-update-obj\u003e\n```\n\n**delete documents** (or a document) in the collection\n\n```\n$ peachy -c \u003cconnection-name\u003e -i \u003ccollection-name\u003e -o deleteDocuments -f \u003cjson-filter\u003e\n```\n\n# DocumentDB\n\n**query documents**\n\n```\n$ peachy -c \u003cconnection-name\u003e -i \u003ccollection-name\u003e -q \"select * from c\"\n```\n\n**insert a document** in the collection\n\n```\n$ peachy -c \u003cconnection-name\u003e -i \u003ccollection-name\u003e -o createDocument -d \u003cjson-document\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fpeachy-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrstringer%2Fpeachy-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fpeachy-cli/lists"}