@e2b/cli 0.0.10 → 0.0.12

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.
Files changed (4) hide show
  1. package/README.md +44 -27
  2. package/dist/index.js +72 -81
  3. package/package.json +16 -21
  4. package/LICENSE +0 -92
package/README.md CHANGED
@@ -1,55 +1,72 @@
1
- # e2b CLI (WIP)
2
-
3
- Command line interface for [e2b](https://e2b.dev/).
1
+ <h1 align="center">
2
+ <span style="font-size:48px;"><b>E2B CLI</b></span>
3
+ </h1>
4
+
5
+ <h4 align="center">
6
+ <a href="https://e2b.dev/docs">Docs</a> |
7
+ <a href="https://e2b.dev">Website</a> |
8
+ <a href="https://discord.gg/U7KEcGErtQ">Discord</a> |
9
+ <a href="https://twitter.com/e2b_dev">Twitter</a>
10
+ </h4>
11
+
12
+ <h4 align="center">
13
+ <a href="https://discord.gg/U7KEcGErtQ">
14
+ <img src="https://img.shields.io/badge/chat-on%20Discord-blue" alt="Discord community server" />
15
+ </a>
16
+ <a href="https://twitter.com/e2b_dev">
17
+ <img src="https://img.shields.io/twitter/follow/infisical?label=Follow" alt="e2b Twitter" />
18
+ </a>
19
+ </h4>
20
+
21
+ [E2B](https://e2b.dev) (_english2bits_) is a cloud operating system for AI agents.
4
22
 
5
23
  ## Installation
6
24
 
7
- ```sh
25
+ ```bash
8
26
  npm install -g @e2b/cli
9
27
  ```
10
28
 
11
- Then you can use the CLI with
29
+ Then you can use the CLI like this:
12
30
 
13
- ```sh
31
+ ```bash
14
32
  e2b --help
15
33
  ```
16
34
 
17
- You will need to authenticate to use the e2b CLI.
35
+ ## Getting started
18
36
 
19
- ```sh
20
- e2b login
21
- ```
37
+ 1. Authenticate with `e2b login`
22
38
 
23
- <details>
24
- <summary>Authenticate without the ability to open browser</summary>
39
+ > To authenticate without the ability to open browser, you can provide `E2B_ACCESS_TOKEN` as an environment variable. Get your `E2B_ACCESS_TOKEN` from [e2b.dev/docs](https://e2b.dev/docs). Then use the CLI like this: `E2B_ACCESS_TOKEN=sk_e2b_... e2b build`
25
40
 
41
+ 2. Create a `Dockerfile` where you describe how your custom E2B environment should look like
26
42
 
27
- To authenticate without the ability to open browser, you can provide E2B_ACCESS_TOKEN as an environment variable.
28
- Obtain your E2B_ACCESS_TOKEN from at [e2b.dev/docs](https://e2b.dev/docs).
43
+ 3. Run `e2b build` inside the directory with the `Dockerfile` to create and build the environment. You will get **environment ID** that you use for connecting to the environment instances via SDKs and for rebuilding the environment
29
44
 
30
- ```sh
31
- E2B_ACCESS_TOKEN=sk_e2b_... e2b login
32
- ```
45
+ 5. Use the **environment ID** that you got during the `e2b build` with the Python or JS/TS SDK as the `id` to create environment instances
46
+
47
+ 6. Rebuild the environment by running `e2b build <id-of-the-environment>` in the directory with the `Dockerfile`
33
48
 
34
- </details>
35
49
 
36
50
  ## Commands
37
51
 
38
- 🔜 All commands can be called with a `--path <path-to-dir>` flag that changes the directory where the command will be called, without the need to call `cd`.
52
+ All commands can be called with a `--path <path-to-dir>` flag that changes the directory where the command will be called, without the need to call `cd`.
39
53
 
40
- ```
54
+ ```sh
41
55
  -V, --version Display e2b CLI version
42
56
  -h, --help display help for command
43
57
  ```
44
58
 
45
- ```
46
- help [command] display help for command
59
+ ```sh
60
+ Usage: e2b env [options] [command]
61
+
62
+ Manage e2b environments
47
63
 
48
- login Login to e2b
49
- logout Logout of e2b
64
+ Options:
65
+ -h, --help display help for command
50
66
 
51
- env|environment Manage e2b environments
52
- create|cr [options] Create new environment and e2b.json config
67
+ Commands:
68
+ build|bd [options] [id] Build environment
53
69
  list|ls List environments
54
- shell|cn [options] [id] Connect terminal to environment
70
+ shell|sh <id> Connect terminal to environment
71
+ help [command] display help for command
55
72
  ```