|
| 1 | +## e2b sandbox |
| 2 | + |
| 3 | + |
| 4 | +work with sandboxes |
| 5 | + |
| 6 | +### Usage |
| 7 | + |
| 8 | +```bash |
| 9 | +e2b sandbox [options] [command] |
| 10 | +``` |
| 11 | +## e2b sandbox connect |
| 12 | + |
| 13 | + |
| 14 | +connect terminal to already running sandbox |
| 15 | + |
| 16 | +### Usage |
| 17 | + |
| 18 | +```bash |
| 19 | +e2b sandbox connect [options] <sandboxID> |
| 20 | +``` |
| 21 | + |
| 22 | + |
| 23 | +## e2b sandbox list |
| 24 | + |
| 25 | + |
| 26 | +list all sandboxes, by default it list only running ones |
| 27 | + |
| 28 | +### Usage |
| 29 | + |
| 30 | +```bash |
| 31 | +e2b sandbox list [options] |
| 32 | +``` |
| 33 | + |
| 34 | +### Options |
| 35 | + |
| 36 | + |
| 37 | + - `-s, --state <state>: filter by state, eg. running, paused. Defaults to running ` |
| 38 | + - `-m, --metadata <metadata>: filter by metadata, eg. key1=value1 ` |
| 39 | + - `-l, --limit <limit>: limit the number of sandboxes returned ` |
| 40 | + - `-f, --format <format>: output format, eg. json, pretty ` |
| 41 | + |
| 42 | + |
| 43 | +## e2b sandbox kill |
| 44 | + |
| 45 | + |
| 46 | +kill sandbox |
| 47 | + |
| 48 | +### Usage |
| 49 | + |
| 50 | +```bash |
| 51 | +e2b sandbox kill [options] [sandboxIDs...] |
| 52 | +``` |
| 53 | + |
| 54 | +### Options |
| 55 | + |
| 56 | + |
| 57 | + - `-a, --all: kill all sandboxes ` |
| 58 | + - `-s, --state <state>: when used with -a/--all flag, filter by state, eg. running, paused. Defaults to running ` |
| 59 | + - `-m, --metadata <metadata>: when used with -a/--all flag, filter by metadata, eg. key1=value1 ` |
| 60 | + |
| 61 | + |
| 62 | +## e2b sandbox create |
| 63 | + |
| 64 | + |
| 65 | +create sandbox and connect terminal to it |
| 66 | + |
| 67 | +### Usage |
| 68 | + |
| 69 | +```bash |
| 70 | +e2b sandbox create [options] [template] |
| 71 | +``` |
| 72 | + |
| 73 | +### Options |
| 74 | + |
| 75 | + |
| 76 | + - `-p, --path <path>: change root directory where command is executed to <path> directory ` |
| 77 | + - `--config <e2b-toml>: specify path to the E2B config toml. By default E2B tries to find ./e2b.toml in root directory. ` |
| 78 | + |
| 79 | + |
| 80 | +## e2b sandbox spawn |
| 81 | + |
| 82 | + |
| 83 | +create sandbox and connect terminal to it |
| 84 | + |
| 85 | +### Usage |
| 86 | + |
| 87 | +```bash |
| 88 | +e2b sandbox spawn [options] [template] |
| 89 | +``` |
| 90 | + |
| 91 | +### Options |
| 92 | + |
| 93 | + |
| 94 | + - `-p, --path <path>: change root directory where command is executed to <path> directory ` |
| 95 | + - `--config <e2b-toml>: specify path to the E2B config toml. By default E2B tries to find ./e2b.toml in root directory. ` |
| 96 | + |
| 97 | + |
| 98 | +## e2b sandbox logs |
| 99 | + |
| 100 | + |
| 101 | +show logs for sandbox |
| 102 | + |
| 103 | +### Usage |
| 104 | + |
| 105 | +```bash |
| 106 | +e2b sandbox logs [options] <sandboxID> |
| 107 | +``` |
| 108 | + |
| 109 | +### Options |
| 110 | + |
| 111 | + |
| 112 | + - `--level <level>: filter logs by level (DEBUG, INFO, WARN, ERROR). The logs with the higher levels will be also shown. [default: INFO]` |
| 113 | + - `-f, --follow: keep streaming logs until the sandbox is closed ` |
| 114 | + - `--format <format>: specify format for printing logs (json, pretty) [default: pretty]` |
| 115 | + - `--loggers [loggers]: filter logs by loggers. Specify multiple loggers by separating them with a comma. ` |
| 116 | + |
| 117 | + |
| 118 | +## e2b sandbox metrics |
| 119 | + |
| 120 | + |
| 121 | +show metrics for sandbox |
| 122 | + |
| 123 | +### Usage |
| 124 | + |
| 125 | +```bash |
| 126 | +e2b sandbox metrics [options] <sandboxID> |
| 127 | +``` |
| 128 | + |
| 129 | +### Options |
| 130 | + |
| 131 | + |
| 132 | + - `-f, --follow: keep streaming metrics until the sandbox is closed ` |
| 133 | + - `--format <format>: specify format for printing metrics (json, pretty) [default: pretty]` |
| 134 | + |
| 135 | + |
0 commit comments