{"id":18853787,"url":"https://github.com/bytehouse-cloud/cli","last_synced_at":"2026-02-05T08:30:17.439Z","repository":{"id":43908086,"uuid":"383074140","full_name":"bytehouse-cloud/cli","owner":"bytehouse-cloud","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-18T02:43:51.000Z","size":3,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T18:19:56.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/bytehouse-cloud.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-05T08:48:26.000Z","updated_at":"2023-02-21T02:25:30.000Z","dependencies_parsed_at":"2024-07-18T05:14:59.000Z","dependency_job_id":"026f6ae3-b60d-4432-9638-8459ef3d05b2","html_url":"https://github.com/bytehouse-cloud/cli","commit_stats":null,"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytehouse-cloud%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytehouse-cloud%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytehouse-cloud%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytehouse-cloud%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytehouse-cloud","download_url":"https://codeload.github.com/bytehouse-cloud/cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793065,"owners_count":19697893,"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-11-08T03:45:45.745Z","updated_at":"2026-02-05T08:30:17.392Z","avatar_url":"https://github.com/bytehouse-cloud.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ByteHouse CLI\n\nByteHouse CLI is a command-line application for the most direct way to interact with [Bytehouse Services](https://bytehouse.cloud/)\n\n## Installation\n\n### MacOS\n\nTo install the ByteHouse CLI, make sure you have Homebrew installed on your machine and run the following commands:\n\n```sh\nbrew tap bytehouse-cloud/homebrew-core\nbrew install bytehouse-cli\n```\nTo upgrade the ByteHouse CLI, run the following command:\n\n```sh\nbrew upgrade bytehouse-cli\n```\n\n### Linux\n\nYou can get the most updated version here: https://github.com/bytehouse-cloud/cli/releases/\n\n```sh\ncurl -o bytehouse-cli -L https://github.com/bytehouse-cloud/cli/releases/download/v1.5.17.1.1/bytehouse-v1.5.17.1.1-linux-amd64\nchmod +x bytehouse-cli \n\n# You might want to add this binary executable to your `~/.bashrc` as alias, or `~/.zshrc`l\necho \"alias bytehouse-cli=\\\"$(pwd)/bytehouse-cli\\\"\" \u003e ~/.bashrc\n```\n\n### Windows\nDownload the latest installer (bytehouse-vX.X.XX.X-windows-amd64) from https://github.com/bytehouse-cloud/cli/releases\n\n# Getting Started\n\n## Credentials\nThere are few credentials you would need to get started\n\n- Account Name\n- User Name\n- Password\n- Region\n\n\u003e Note: The information you would need is the same as how you would log in with Web UI.\n\nIf you are unsure, you can also check your details on the [Web Console](https://console.bytehouse.cloud/account/details).\n\n## Using the CLI\n\nThe simplest way to start the application is to run it in your command line or PowerShell.\n\n#### With Flags\n\nWhen specifying flag and its value when starting the application, the format is `--\u003cflag\u003e value` , eg `--user mary`\nFlags also have an alias, see in Reference: Alias\nAn example of starting bytehouse-cli is shown below:\n```sh\nbytehouse-cli --user \u003cuser name\u003e --account \u003caccount name\u003e --password \u003cpassword\u003e --region \u003cregion name\u003e --secure\n# Example\n$ bytehouse-cli --user bob --account AWSXXX --password coolbob --region cn-north-1 --secure\n```\n\u003e Note: --secure flag is needed when connecting to bytehouse's public domain\n\n### With Configuration File\n\nSometimes it's neater and more manageable to keep all flags in a configuration file. With the configuration file, you can also specify query settings in it. You can use the -cf flag with the path to configuration file as value.\n\nFor full usage of configuration File, see in Reference: Configuration File\nAn example of configuration file and usage is shown below:\n\n```sh\n$ cat bytehouse_conf.toml\n# Settings for connection\naccount = \"AWSXXXXX\"\nuser = \"bob\"\npassword = \"coolbob\"\nregion = \"cn-north-1\"\nsecure = true\n\n# Settings for query Settings\nansi_sql = true \n\n$ bytehouse-cli -cf bytehouse_conf.toml\n```\n\n## Non-Interactive Mode\n\nSometimes you could be writing shell script and it could be impractical to get into interactive mode. Bytehouse CLI allows the user to execute a SQL command and exit automatically.\n\n### With Query Flag\n\nIf you launch bytehouse-cli with `-q` or `--query` flag, that SQL statement will be executed and bytehouse-cli will exit immediately after the execution.\n\n```sh\n$ bytehouse-cli -q \"select 1\"\n```\n\n### With stdin\nUsers can also allow bytehouse-cli to take in input from stdin .\n```\n$ echo \"select 1\" | bytehouse-cli\n```\n\n### Scripting\nUsers can also write a SQL script and pipe the input to bytehouse-cli\n\n- Queries are separated by `;`\n- Queries will be run sequentially\n- Stops further execution when first query execution returns with an error\n\n```sh\n$ cat example.sql\nCREATE DATABASE bob_db;\nUSE bob_db;\nCREATE TABLE bob_numbers\n(\n   i Int32\n)\nENGINE = CnchMergeTree\nORDER BY i;\nSHOW CREATE TABLE bob_numbers;\n\n$ bytehouse-cli \u003c example.sql\n\n# This is also accepted\n$ cat example.sql | bytehouse-cli\n```\n\n## Data Insertion\nIt is very common to load data from a file, below shows some examples on how to do so.\n\n### From query\n\n#### Interactive Mode\n```sh\nBytehouse » INSERT INTO bob_db.bob_number VALUES (1), (2), (3)\n```\n#### Non-Interactive Mode\n```sh\n$ bytehouse-cli -q \"INSERT INTO bob_db.bob_number VALUES (1), (2), (3)\"\n```\n\n### From a local file\n\n#### Interactive Mode\n```sh\nBytehouse » INSERT INTO bob_db.bob_number FORMAT csv INFILE 'path/to/data.csv'\n```\n#### Non-Interactive Mode\n```sh\n$ bytehouse-cli -q \"INSERT INTO bob_db.bob_number FORMAT csv\" \u003c 'path/to/data.csv'\n```\n\n## Data Export\nYou can use the `INTO OUTFILE` syntax after your query to save your results to a local file.\n```sh\nBytehouse » SELECT * FROM bob_db.bob_number INTO OUTFILE 'out.csv' format csv\n```\n\n## Version Check\nYou can check the version of the ByteHouse CLI using the -v or --version flag. When flag is specified, ByteHouse CLI does not start\n```sh\n$ bytehouse-cli -v\nv1.5.2\n```\n## Help\nYou can show all the flags supported by using -h flag or --help\n```\n#To display all options and their alias\nbytehouse-cli -h    \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytehouse-cloud%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytehouse-cloud%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytehouse-cloud%2Fcli/lists"}