@e2b/cli 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -11
- package/dist/index.js +96 -107
- package/package.json +25 -24
package/README.md
CHANGED
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
|
|
21
21
|
[E2B](https://e2b.dev) (_english2bits_) is a cloud operating system for AI agents.
|
|
22
22
|
|
|
23
|
+
This CLI tool allows you to build and manage E2B sandbox templates from your terminal.
|
|
24
|
+
|
|
25
|
+
You define your sandbox template in a `Dockerfile` and then use the CLI to build the sandbox template. You can then
|
|
26
|
+
connect to the sandbox template via SDKs and run your AI agents.
|
|
27
|
+
|
|
28
|
+
The `Dockerfile` is the same as for Docker, but you can only use **Debian based linux distros** as the base image.
|
|
29
|
+
|
|
23
30
|
## Installation
|
|
24
31
|
|
|
25
32
|
```bash
|
|
@@ -36,20 +43,30 @@ e2b --help
|
|
|
36
43
|
|
|
37
44
|
1. Authenticate with `e2b login`
|
|
38
45
|
|
|
39
|
-
> To authenticate without the ability to open browser, you can provide `E2B_ACCESS_TOKEN` as an environment variable.
|
|
46
|
+
> To authenticate without the ability to open browser, you can provide `E2B_ACCESS_TOKEN` as an environment variable.
|
|
47
|
+
> Get your `E2B_ACCESS_TOKEN` from [e2b.dev/docs](https://e2b.dev/docs). Then use the CLI like
|
|
48
|
+
> this: `E2B_ACCESS_TOKEN=sk_e2b_... e2b build`
|
|
40
49
|
|
|
41
|
-
2. Create a `Dockerfile` where you describe how your custom E2B
|
|
50
|
+
2. Create a `Dockerfile` where you describe how your custom E2B sandbox template should look like. Majority of **Debian
|
|
51
|
+
based linux distros should work as the base image**. Here is an example of a minimal `Dockerfile` for E2B sandbox
|
|
52
|
+
template:
|
|
42
53
|
|
|
43
|
-
|
|
54
|
+
```Dockerfile
|
|
55
|
+
FROM ubuntu:20.04
|
|
56
|
+
```
|
|
44
57
|
|
|
45
|
-
|
|
58
|
+
3. Run `e2b build` inside the directory with the `Dockerfile` to create and build the sandbox template. You will get *
|
|
59
|
+
*template ID** that you use for connecting to the sandbox via SDKs and for rebuilding the sandbox template
|
|
46
60
|
|
|
47
|
-
|
|
61
|
+
5. Use the **template ID** that you got during the `e2b build` with the Python or JS/TS SDK as the `id` to create
|
|
62
|
+
sandbox
|
|
48
63
|
|
|
64
|
+
6. Rebuild the sandbox template by running `e2b build <id-of-the-template>` in the directory with the `Dockerfile`
|
|
49
65
|
|
|
50
66
|
## Commands
|
|
51
67
|
|
|
52
|
-
All commands can be called with a `--path <path-to-dir>` flag that changes the directory where the command will be
|
|
68
|
+
All commands can be called with a `--path <path-to-dir>` flag that changes the directory where the command will be
|
|
69
|
+
called, without the need to call `cd`.
|
|
53
70
|
|
|
54
71
|
```sh
|
|
55
72
|
-V, --version Display e2b CLI version
|
|
@@ -57,16 +74,16 @@ All commands can be called with a `--path <path-to-dir>` flag that changes the d
|
|
|
57
74
|
```
|
|
58
75
|
|
|
59
76
|
```sh
|
|
60
|
-
Usage: e2b
|
|
77
|
+
Usage: e2b template [options] [command]
|
|
61
78
|
|
|
62
|
-
Manage e2b
|
|
79
|
+
Manage e2b sandbox templates
|
|
63
80
|
|
|
64
81
|
Options:
|
|
65
82
|
-h, --help display help for command
|
|
66
83
|
|
|
67
84
|
Commands:
|
|
68
|
-
build|bd [options] [id] Build
|
|
69
|
-
list|ls List
|
|
70
|
-
shell|sh <id> Connect terminal to
|
|
85
|
+
build|bd [options] [id] Build sandbox template
|
|
86
|
+
list|ls List sandbox templates
|
|
87
|
+
shell|sh <id> Connect terminal to sandbox
|
|
71
88
|
help [command] display help for command
|
|
72
89
|
```
|