attach
The attach command is used to start a JavaScript console that connects to an already running local or remote Kit node.

Usage

1
kit attach [options]
Copied!
1
Start a JavaScript console that attaches to a local or remote node
2
3
Usage:
4
kit attach [flags]
5
6
Flags:
7
--exec string Execute the given JavaScript code
8
-h, --help help for attach
9
--remote.address string Set the RPC server address to connect to (default "127.0.0.1:9002")
10
--rpc.https Connect using HTTPS protocol
11
--rpc.password string Set the RPC password
12
--rpc.user string Set the RPC username
Copied!

Options

  • --exec - Executes a JavaScript source code and exit. If a path is provided, it is read and executed.
  • --remote.address - The address of the Git & RPC remote server.
  • --rpc.https - Indicates that SSL should be used when connecting to the node.
  • --rpc.user - Provide the username of the server for basic authentication.
  • --rpc.password - Provide the password of the server for basic authentication.
  • -h, --help - Print out a help message.

Example

  • Attach to the local node running on the default address:port.
1
kit attach
Copied!
  • Attach to a remote node at the address rpc.mynode.net:9003.
1
kit attach --remote.address="rpc.mynode.net:9003" --rpc.user="user" --rpc.password="pass"
Copied!
  • Attach to a node and execute a JavaScript expression immediately after attaching.
Bash
Output
1
kit attach --exec='2+2'
Copied!
1
> 4
Copied!
Last modified 1yr ago
Copy link