Source: https://dev-docs.nebula-graph.io/v5.3.2/utilities/ngql/ Documentation version: v5.3.2 # What is ngql ngql is a command-line client for the Graph service in NebulaGraph Database Developer Edition. Use it to run GQL statements and scripts, load built-in sample data, and change result formats. ## Features - Interactive and non-interactive modes: Enter statements at the prompt or run statements from a script file. - Auto-completion: Complete GQL statements with the Tab key. - Statement history: Recall and rerun previous statements. - Result formats: Display query results in different formats. ## Open ngql with Docker Compose After starting NebulaGraph Database Developer Edition as described in the [deployment guide](https://dev-docs.nebula-graph.io/v5.3.2/get-started/deploy/), open a terminal on the development machine running Docker, go to the directory containing `compose.yaml`, and run: ```` docker compose exec ngql ngql --host graph-cluster --port 9669 --user root ```` The first `ngql` is the Compose service name; the second is the client command inside the container. `graph-cluster:9669` is the Graph service address inside the container network. Do not replace it with the development machine's IP address. At the `Password` prompt, enter NebulaGraph Database Developer Edition's current `root` password. For initial password settings and escaping rules, see [Set the root password](https://dev-docs.nebula-graph.io/v5.3.2/get-started/deploy/#root-password). After connecting, enter GQL statements at the prompt; enter `:q` to exit the client. For a connection and query example, see [Connect and run your first query](https://dev-docs.nebula-graph.io/v5.3.2/get-started/first-query/#ngql). ## Download standalone packages The supplied Docker Compose deployment includes an `ngql` container. Download a standalone package to run the client directly on your development machine or another machine. Current version: 5.3.1. Choose the package for the operating system and CPU architecture of the machine that will run the client. | Operating system | CPU architecture | Package | Checksum | macOS | Apple Silicon (ARM64) | [Download](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-darwin-aarch64.tgz) | [SHA-256](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-darwin-aarch64.tgz.sha256sum.txt) | macOS | Intel (x86-64) | [Download](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-darwin-x86_64.tgz) | [SHA-256](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-darwin-x86_64.tgz.sha256sum.txt) | Linux | ARM64 | [Download](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-linux-aarch64.tgz) | [SHA-256](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-linux-aarch64.tgz.sha256sum.txt) | Linux | x86-64 | [Download](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-linux-x86_64.tgz) | [SHA-256](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-linux-x86_64.tgz.sha256sum.txt) | Windows | x86-64 | [Download](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-windows-x86_64.tgz) | [SHA-256](https://dev-docs.nebula-graph.io/downloads/ngql/5.3.1/nebula-graph-ngql-5.3.1-windows-x86_64.tgz.sha256sum.txt) To check file integrity, see [Verify a package](https://dev-docs.nebula-graph.io/v5.3.2/utilities/#verify-download). ### Extract and connect Make sure NebulaGraph Database Developer Edition is running as described in the [deployment guide](https://dev-docs.nebula-graph.io/v5.3.2/get-started/deploy/). Open a terminal in the download directory. Replace `` with the downloaded filename before running the commands below. The examples use `127.0.0.1:9669` to connect to a database running on the same machine. To connect from another machine, replace `127.0.0.1` with the Docker host's IP address. If you changed the port mapping, use the host port you configured. Linux / macOSWindows PowerShell ```` tar -xzf "" cd nebula-graph-ngql/bin ./ngql --host 127.0.0.1 --port 9669 --user root ```` ```` tar -xzf "" Set-Location nebula-graph-ngql/bin .\ngql.exe --host 127.0.0.1 --port 9669 --user root ```` At the `Password` prompt, enter the current `root` password. Once connected, follow [the first-query example](https://dev-docs.nebula-graph.io/v5.3.2/get-started/first-query/#load-ngql) to load sample data and run queries. ## More usage examples - For interactive commands, scripts, and result formats, see the [ngql usage guide](https://dev-docs.nebula-graph.io/v5.3.2/utilities/ngql/usage/). - For GQL syntax and examples, see the [GQL reference](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/overview/).