|
| 1 | +export const metadata = { |
| 2 | + title: 'Command Line Interface (CLI)', |
| 3 | + description: '' |
| 4 | +} |
| 5 | + |
| 6 | +# CLI Commands |
| 7 | +Iroh has a single command line interface, common to all platforms & distributions. |
| 8 | + |
| 9 | + |
| 10 | +## iroh |
| 11 | +``` |
| 12 | +Send data. |
| 13 | +
|
| 14 | +Usage: iroh [OPTIONS] <COMMAND> |
| 15 | +
|
| 16 | +Commands: |
| 17 | + provide Serve the data from the given path |
| 18 | + list List hashes |
| 19 | + validate Validate hashes |
| 20 | + shutdown Shutdown provider |
| 21 | + id Identify provider |
| 22 | + add Add data from the given path |
| 23 | + get Fetch the data from the hash |
| 24 | + get-ticket Fetch the data using a ticket for all provider information and authentication. |
| 25 | + addresses List addresses |
| 26 | + help Print this message or the help of the given subcommand(s) |
| 27 | +
|
| 28 | +Options: |
| 29 | + --keylog Log SSL pre-master key to file in SSLKEYLOGFILE environment variable |
| 30 | + -h, --help Print help |
| 31 | + -V, --version Print version |
| 32 | +``` |
| 33 | + |
| 34 | +## iroh provide |
| 35 | +``` |
| 36 | +Serve the data from the given path |
| 37 | +
|
| 38 | +Usage: iroh provide [OPTIONS] [PATH] |
| 39 | +
|
| 40 | +Arguments: |
| 41 | + [PATH] |
| 42 | +
|
| 43 | +Options: |
| 44 | + -a, --addr <ADDR> Optional listening address, defaults to 127.0.0.1:4433 |
| 45 | + --auth-token <AUTH_TOKEN> Auth token, defaults to random generated |
| 46 | + --rpc-port <RPC_PORT> Optional rpc port, defaults to 4919. Set to 0 to disable RPC [default: 4919] |
| 47 | + -h, --help Print help |
| 48 | +``` |
| 49 | + |
| 50 | +## iroh list |
| 51 | +``` |
| 52 | +List hashes |
| 53 | +
|
| 54 | +Usage: iroh list [OPTIONS] |
| 55 | +
|
| 56 | +Options: |
| 57 | + --rpc-port <RPC_PORT> Optional rpc port, defaults to 4919 [default: 4919] |
| 58 | + -h, --help |
| 59 | +``` |
| 60 | + |
| 61 | +## iroh shutdown |
| 62 | +``` |
| 63 | +Shutdown provider |
| 64 | +
|
| 65 | +Usage: iroh shutdown [OPTIONS] |
| 66 | +
|
| 67 | +Options: |
| 68 | + --force Shutdown mode. Hard shutdown will immediately terminate the process, soft shutdown will wait for all connections to close |
| 69 | + --rpc-port <RPC_PORT> Optional rpc port, defaults to 4919 [default: 4919] |
| 70 | + -h, --help |
| 71 | +``` |
| 72 | + |
| 73 | +## iroh id |
| 74 | +``` |
| 75 | +Identify provider |
| 76 | +
|
| 77 | +Usage: iroh id [OPTIONS] |
| 78 | +
|
| 79 | +Options: |
| 80 | + --rpc-port <RPC_PORT> Optional rpc port, defaults to 4919 [default: 4919] |
| 81 | + -h, --help |
| 82 | +``` |
| 83 | + |
| 84 | +## iroh add |
| 85 | +``` |
| 86 | +Add data from the given path |
| 87 | +
|
| 88 | +Usage: iroh add [OPTIONS] <PATH> |
| 89 | +
|
| 90 | +Arguments: |
| 91 | + <PATH> The path to the file or folder to add |
| 92 | +
|
| 93 | +Options: |
| 94 | + --rpc-port <RPC_PORT> Optional rpc port, defaults to 4919 [default: 4919] |
| 95 | + -h, --help Print help |
| 96 | +``` |
| 97 | + |
| 98 | +## iroh get |
| 99 | +``` |
| 100 | +Fetch the data from the hash |
| 101 | +
|
| 102 | +Usage: iroh get [OPTIONS] --peer <PEER> --auth-token <AUTH_TOKEN> <HASH> |
| 103 | +
|
| 104 | +Arguments: |
| 105 | + <HASH> The root hash to retrieve |
| 106 | +
|
| 107 | +Options: |
| 108 | + -p, --peer <PEER> PeerId of the provider |
| 109 | + --auth-token <AUTH_TOKEN> The authentication token to present to the server |
| 110 | + -a, --addr <ADDR> Optional address of the provider, defaults to 127.0.0.1:4433 |
| 111 | + -o, --out <OUT> Optional path to a new directory in which to save the file(s). If none is specified writes the data to STDOUT |
| 112 | + -h, --help |
| 113 | +``` |
| 114 | + |
| 115 | + |
| 116 | +## iroh get-ticket |
| 117 | +``` |
| 118 | +Fetches some data from a ticket, |
| 119 | +
|
| 120 | +The ticket contains all hash, authentication and connection information to connect to the provider. It is a simpler, but slightly less flexible alternative to the `get` subcommand. |
| 121 | +
|
| 122 | +Usage: iroh get-ticket [OPTIONS] <TICKET> |
| 123 | +
|
| 124 | +Arguments: |
| 125 | + <TICKET> |
| 126 | + Ticket containing everything to retrieve a hash from provider |
| 127 | +
|
| 128 | +Options: |
| 129 | + -o, --out <OUT> |
| 130 | + Optional path to a new directory in which to save the file(s). If none is specified writes the data to STDOUT |
| 131 | +
|
| 132 | + -h, --help |
| 133 | + Print help (see a summary with '-h') |
| 134 | +``` |
| 135 | + |
| 136 | +## iroh addresses |
| 137 | +``` |
| 138 | +List addresses |
| 139 | +
|
| 140 | +Usage: iroh addresses [OPTIONS] |
| 141 | +
|
| 142 | +Options: |
| 143 | + --rpc-port <RPC_PORT> Optional rpc port, defaults to 4919 [default: 4919] |
| 144 | + -h, --help |
| 145 | +``` |
| 146 | + |
| 147 | + |
0 commit comments