Skip to content

tt connect

Connect to the tarantool instance.

An instance of an application is reached at its console socket, and with --binary at iproto.advertise.client of its config, else at the first TCP address of its iproto.listen, 0.0.0.0 and [::] dialed as 127.0.0.1 and [::1], else at its binary port, with TLS and the TLS files of the iproto.listen entry there unless the flags give them. Over iproto it is logged in to with the credentials of --username and --password only.

The command supports the following Tarantool environment variables:

  • TT_CLI_USERNAME - specifies the Tarantool username
  • TT_CLI_PASSWORD - specifies the Tarantool password

They apply to a URI without credentials.

You could pass command line arguments to the interpreted SCRIPT or COMMAND passed via -f flag:

echo "print(...)" | tt connect user:pass@localhost:3013 -f- 1, 2, 3

Usage

tt connect (<APP>:<INSTANCE> | <URI>) [flags] [-f <FILE>] [-- ARGS]
  COMMAND | tt connect (<APP>:<INSTANCE> | <URI>) [flags]
  COMMAND | tt connect (<APP>:<INSTANCE> | <URI>) [flags] [-f-] [-- ARGS]

  The URI can be specified in the following formats:
  * [tcp://][username:password@][host:port]
  * [unix://][username:password@]socketpath
  To specify relative path without `unix://` use `./`.
  The query of a URI, `?transport=ssl&auth_type=pap-sha256`, takes
  transport (ssl or plain), auth_type (auto, chap-sha1 or pap-sha256)
  and the TLS settings ssl_key_file, ssl_cert_file, ssl_ca_file,
  ssl_ciphers, ssl_password and ssl_password_file.

  Available commands:
  * \shortcuts - get the full list of available shortcuts
  * \set language <language> - set language (lua or sql)
  * \set output <format> - output format: yaml (default), lua, table or ttable
  * \set delimiter <delimiter> - set expression delimiter
  * \help - show available backslash commands
  * \quit - quit interactive console

Flags

  • --auth-type string - authentication method: auto, chap-sha1 or pap-sha256; pap-sha256 needs TLS and Tarantool EE or CE 3.9+ (default auto)
  • --binary - connect to instance using binary port
  • --connect-timeout duration - timeout for establishing a binary connection (default 1s)
  • -f, --file string - file to read the script for evaluation. "-" - read the script from stdin
  • -i, --interactive - enter interactive mode after executing 'FILE'
  • -l, --language string - language: lua or sql
  • -x, --outputformat string - output format: yaml, lua, table or ttable (default yaml)
  • -p, --password string - password
  • --scope string - scope the application is looked for in: project, user or system
  • --sslcafile string - path to a trusted certificate authorities (CA) file
  • --sslcertfile string - path to an SSL certificate file
  • --sslciphers string - colon-separated (:) list of SSL cipher suites the connection can use
  • --sslkeyfile string - path to a private SSL key file
  • --sslpassword string - password for decrypting the private SSL key file
  • --sslpasswordfile string - path to a file containing the password for decrypting the private SSL key file
  • --template string - template of the application the instances are described in (default "default")
  • -u, --username string - username