-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/e2b-dev/e2b
- Loading branch information
Showing
15 changed files
with
270 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# CLI Commands | ||
|
||
Build your own sandbox with our CLI. {{ className: 'lead' }} | ||
|
||
You append always use `--help` for more information about commands and options. | ||
|
||
## `build` | ||
|
||
Build sandbox template defined by `./e2b.Dockerfile` or `./Dockerfile` in root directory. By default the root directory is the current working directory. This command also creates `e2b.toml` config. | ||
|
||
```bash | ||
e2b build | ||
``` | ||
|
||
### Options: | ||
|
||
<Properties> | ||
<Property name="name" type="-n --name"> | ||
Specify name of sandbox template. You can use the name to start the sandbox in the SDK. The name must be lowercase and contain only letters, numbers, dashes and underscores. | ||
</Property> | ||
<Property name="path" type="-p --path"> | ||
Change root directory where command is executed to `path` directory | ||
</Property> | ||
<Property name="dockerfile" type="-d --dockerfile"> | ||
Specify path to Dockerfile. By default E2B tries to find `e2b.Dockerfile` or `Dockerfile` in root directory | ||
</Property> | ||
</Properties> | ||
|
||
--- | ||
|
||
## `init` | ||
|
||
Create basic E2B Dockerfile (`./e2b.Dockerfile`) in current directory. You can then run `e2b build` to build sandbox template from this Dockerfile | ||
|
||
```bash | ||
e2b template init | ||
``` | ||
|
||
### Options: | ||
|
||
<Properties> | ||
<Property name="path" type="-p --path"> | ||
Change root directory where command is executed to `path` directory | ||
</Property> | ||
</Properties> | ||
|
||
--- | ||
|
||
## `list` | ||
|
||
List your sandbox templates | ||
|
||
```bash | ||
e2b list | ||
``` | ||
|
||
--- | ||
|
||
## `login` | ||
|
||
Log in to CLI. It will save your access token in `~/.e2b` file. | ||
|
||
```bash | ||
e2b login | ||
``` | ||
|
||
--- | ||
|
||
## `logout` | ||
|
||
Log out from CLI. It will remove your accesstoken from `~/.e2b` file. | ||
|
||
```bash | ||
e2b logout | ||
``` | ||
|
||
--- | ||
|
||
## `shell` | ||
|
||
Connect terminal to sandbox. This command can be used to debug your sandbox template. It works as `docker run -it <image> bash` command. | ||
|
||
```bash | ||
e2b shell | ||
``` | ||
|
||
### Options: | ||
|
||
<Properties> | ||
<Property name="path" type="-p --path"> | ||
Change root directory where command is executed to `path` directory | ||
</Property> | ||
</Properties> | ||
|
||
### Next steps | ||
|
||
1. [Create your first sandbox template](/sandbox/templates/overview) | ||
1. [Check out the official guides](/guides/custom-sandbox) | ||
{/* 1. [Follow the "Hello World" example](/guides/) */} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Installation | ||
|
||
You build and manage your sandbox templates with our CLI. {{ className: 'lead' }} | ||
|
||
The CLI is distributed as an [NPM package](https://www.npmjs.com/package/@e2b/sdk). | ||
|
||
## Download CLI | ||
|
||
You can install them using the following commands: | ||
|
||
```bash | ||
npm install -g @e2b/cli@latest | ||
``` | ||
|
||
|
||
## Login | ||
|
||
You'll need to login to your account to use the CLI. It'll redirect you to the browser to authenticate. | ||
|
||
```bash | ||
e2b login | ||
``` | ||
|
||
|
||
### Next steps | ||
|
||
1. [Create your first sandbox template](/sandbox/templates/overview) | ||
1. [Explore the CLI API](/CLI/commnads) | ||
1. [Check out the official guides](/guides/custom-sandbox) | ||
{/* 1. [Follow the "Hello World" example](/guides/) */} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 16 additions & 5 deletions
21
apps/docs/src/app/sandbox/templates/template-file/page.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
e33f6a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
e2b-docs – ./apps/docs
e2b-docs.vercel.app
e2b-docs-e2b.vercel.app
e2b-docs-git-main-e2b.vercel.app