# Command-line interface

The `coordinator` executable contains the server and its native client. Use a subcommand to choose the mode.

## Syntax

```text
coordinator serve [--addr HOST:PORT] [--http-addr HOST:PORT]
                  [--db PATH] [--config-file PATH]
coordinator --config-file=PATH [--addr HOST:PORT]
            [--http-addr HOST:PORT] [--db PATH]
coordinator client [--addr HOST:PORT] [--user NAME]
                   [--password VALUE] [--database NAME] [--query SQL]
```

`--help` displays the available options. Configuration and credentials files must already exist before server startup.

## Server paths and addresses

`--addr` overrides the native listener host and port together. `--http-addr` controls HTTP independently. `--db` selects a database file and does not change where the default configuration is found.

Without an explicit configuration path, the server looks beside the executable. A relative `--config-file` argument starts at the current working directory.

## Client use

Omit `--query` for an interactive session. Supply it for one request that writes exact result bytes to stdout. The client connects to CoordinatorDB's native protocol rather than a ClickHouse or PostgreSQL protocol.

See [native client](https://coordinatordb.com/docs/concepts/features/interfaces/client), [installation](https://coordinatordb.com/docs/get-started/setup/install) and [configuration files](https://coordinatordb.com/docs/concepts/features/configuration/server-config/configuration-files).
