Commit Graph

346 Commits

Author SHA1 Message Date
Mish Ushakov a116679b87 CLI: Refactored sandbox kill command (#904)
**Changelog**

- Added ability to pass multiple sandbox ids to "sbx kill id1 id2 id3"
- Added ability to filter sandboxes to be killed by metadata and by
state using --state, --metadata (requires --all)
- Fixed metadata parser and moved to utils
2025-09-12 21:45:25 +02:00
github-actions[bot] 2162c6191f [skip ci] Release new versions 2025-09-03 12:49:17 +00:00
Mish Ushakov 67070bb9ea Synced spec + generated API client (#889)
Changelog

- Synced latest spec from e2b-dev/infra
- Regenerated API clients
2025-09-03 05:43:47 -07:00
github-actions[bot] 0070938d01 [skip ci] Release new versions 2025-09-01 07:47:17 +00:00
Jakub Novák 99b9ed768d Deprecate spawn instead of remove (#885)
Adds a deprecated `spawn` command to the CLI, ensuring backward
compatibility and guiding users toward the preferred `create` command.


```
$ e2b sandbox
Usage: index sandbox|sbx [options] [command]

work with sandboxes

Options:
  -h, --help                        display help for command

Commands:
  connect|cn <sandboxID>            connect terminal to already running sandbox
  list|ls [options]                 list all sandboxes, by default it list only running ones
  kill|kl [options] [sandboxID]     kill sandbox
  create|cr [options] [template]    create sandbox and connect terminal to it
  logs|lg [options] <sandboxID>     show logs for sandbox
  metrics|mt [options] <sandboxID>  show metrics for sandbox
  help [command]                    display help for command
  ```
  
  ```
$ sbx sp base
Warning: The 'spawn' command is deprecated and will be removed in future releases. Please use 'e2b sandbox create' instead.
Terminal connecting to template base with sandbox ID in897x2dqs7aws8h1x0in
```
2025-09-01 07:44:10 +00:00
Jakub Novák b42ab2a86b Add pipeline for linting and formatting (#883)
Setup linting and formatting in all packages
2025-08-31 12:06:00 -07:00
github-actions[bot] 663d832ddc [skip ci] Release new versions 2025-08-22 09:45:46 +00:00
Jakub Novák c2195d832f Fix API key check in JS SDK & remove deprecated fields (#869)
Fix the check and remove deprecated fields
2025-08-22 09:42:49 +00:00
github-actions[bot] 774dfd7667 [skip ci] Release new versions 2025-08-21 15:51:16 +00:00
Jakub Novák 74457ff1dd SDK v2 - Changeset and docs (#862)
SDK v2 release
2025-08-21 08:45:25 -07:00
Jakub Novák d117ba09e8 SDK v2 - Add beta pause and update Sandbox list (#854)
Introduce beta submodule with beta features - pause and resume
Update Sandbox list to also return paused sandboxes

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-08-19 00:37:07 -07:00
Jakub Dobry 41d909a4bb Update access token location readme (#852) 2025-08-07 04:23:22 -07:00
github-actions[bot] 64a5d52dd5 [skip ci] Release new versions 2025-07-31 10:43:16 +00:00
Jakub Novák ec1b831018 Fix byte shift in sandbox metrics (#837)
This pull request addresses a bug in the CLI related to incorrect byte
shifting for memory and disk metrics when dealing with sizes greater
than 4 GB.
2025-07-31 03:40:27 -07:00
github-actions[bot] 0c6cfed137 [skip ci] Release new versions 2025-07-31 09:57:39 +00:00
Jakub Novák 8c4710cc60 Fix metrics cli missing api key (#836)
# Description
Fixing a missing API key issue for sandbox metrics in the CLI
2025-07-31 09:54:44 +00:00
github-actions[bot] 76d62ed070 [skip ci] Release new versions 2025-07-30 19:25:33 +00:00
Jakub Novák e34d69525f Expose sandbox metrics in SDKs and CLI (#828)
# Description

Expose sandbox metrics in SDKs and CLI


```
e2b sbx mt il98ycmohc6enybi79uf8

Metrics for sandbox il98ycmohc6enybi79uf8:

[2025-07-25 14:05:55Z]  CPU:  8.27% /  2 Cores | Memory:    31 / 484   MiB | Disk:  1445 / 2453  MiB
[2025-07-25 14:06:00Z]  CPU:   0.5% /  2 Cores | Memory:    32 / 484   MiB | Disk:  1445 / 2453  MiB
[2025-07-25 14:06:05Z]  CPU:   0.1% /  2 Cores | Memory:    32 / 484   MiB | Disk:  1445 / 2453  MiB
[2025-07-25 14:06:10Z]  CPU:   0.3% /  2 Cores | Memory:    32 / 484   MiB | Disk:  1445 / 2453  MiB

```

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-07-30 12:17:30 -07:00
github-actions[bot] 37ec33654d [skip ci] Release new versions 2025-07-18 15:23:52 +00:00
Jiri Sveceny 56dfb423ad Add image URI mask option for template build to allow custom image repository (#819)
This will allow customers who are not using our Docker repository to
fall back to their own during template build.
2025-07-18 17:20:46 +02:00
github-actions[bot] e7538fb5cc [skip ci] Release new versions 2025-07-18 11:20:02 +00:00
github-actions[bot] 5f207ffa95 [skip ci] Release new versions 2025-07-17 13:16:31 +00:00
Jiri Sveceny 9f8c40e49e Client ID part removal from SDKs (#820)
- CLI spawn, connect, and logs work with and without the client part
provided
- JavaScript and Python SDKs are no longer returning IDs with client
part
2025-07-17 13:11:50 +00:00
github-actions[bot] 8b8cf0084f [skip ci] Release new versions 2025-07-09 14:49:53 +00:00
Jakub Dobry 2817a85101 Print all logs also on build success (#814)
Print all logs also on build success
2025-07-09 07:46:13 -07:00
github-actions[bot] 93134e2faa [skip ci] Release new versions 2025-06-18 12:16:44 +00:00
Mish Ushakov 4730e13656 Changed help link in the CLI on failed build (#782)
current link leads to 404
2025-06-18 14:14:03 +02:00
github-actions[bot] 23a9298252 [skip ci] Release new versions 2025-06-13 00:45:36 +00:00
Jakub Dobry e244ba72c0 Add option for a template ready check (#750)
## Description
Add option for a template ready check. You can specify `ready_cmd` which
will be run until it exits with code 0. Max timeout is 5 minutes. After
exit code 0, the template will be marked as ready.

If no ready command is defined, `sleep 20` is assumed when the start
command is present, and `sleep 0` when none is defined. It is also
possible to define ready command without any start command. This might
be helpful if the filesystem contains self-booted services (e.g. using
systemd).

```
ready_cmd = "echo 'Starting ready check'; sleep 40; echo 'Template is ready'"
```

This adds possibility to configure the default 20 seconds wait time for
a start command.

New documentation can be found at `/docs/sandbox-template/ready-cmd`.

## Checklist
- [x] Make sure the https://github.com/e2b-dev/infra/pull/719 is
deployed

---------

Co-authored-by: Vasek Mlejnsky <vasek@e2b.dev>
Co-authored-by: Jakub Novák <jakub@e2b.dev>
2025-06-12 17:42:37 -07:00
github-actions[bot] 27e292eedc [skip ci] Release new versions 2025-06-05 15:39:44 +00:00
Jakub Novák ca905b0639 Fix CLI regression (#762)
# Description 

Introduced in
[here](https://github.com/e2b-dev/E2B/pull/747/files#diff-69710e23d3c0765f64152a2be96bd62daf49732e11d1e46b607686ec0cf15e75)
2025-06-05 17:36:41 +02:00
github-actions[bot] 6c0927e358 [skip ci] Release new versions 2025-06-05 14:15:25 +00:00
Mish Ushakov fc182d63ef Added license sources to SDKs (#761)
- Added licenses source text to the SDKs, CLI
2025-06-05 07:10:07 -07:00
Jakub Dobry 4ffb211155 Fix CLI compilation (#747)
Fix CLI compilation. Fixes nullable res.data & non-existent /teams
endpoint in the OpenAPI generated client.
2025-05-28 05:42:23 -07:00
github-actions[bot] 41ef82cbd2 [skip ci] Release new versions 2025-05-15 17:22:06 +00:00
Mish Ushakov 698959dddb Added --no-cache option for building templates without cache (#735)
- Adds `--no-cache` parameter to CLI `template build` command for
building templates without cache.
2025-05-15 19:19:04 +02:00
Ben Fornefeld 10db4e95e6 CLI: Improve auth login typing + browser sign in response usage (#733)
This pr improves the auth login code, to be more declarative and
realistic to the actual response that is sent by the dashboard sign in
flow.
2025-05-15 19:18:24 +02:00
github-actions[bot] 231e19694d [skip ci] Release new versions 2025-05-15 16:46:57 +00:00
Ben Fornefeld a1c2466841 Fix authErrorBox switch breaking (#734)
To show the correct error message in our cli, we need to break the
switch cases. Currently always the last case will be applied, no matter
the input.
2025-05-15 18:44:00 +02:00
Jiri Sveceny 2def1305f3 Flag for securing envd access with auth token (#688)
Waiting until secure flag will be available in production cluster.

---------

Co-authored-by: Jakub Novák <jakub@e2b.dev>
2025-05-14 15:15:18 +00:00
Mish Ushakov fd0a097ca9 Added homebrew installation instructions to the docs (#721) 2025-05-13 11:40:12 +00:00
Jakub Novák 4ec6c82630 Security patches (#706)
# Description

Fixes:
https://github.com/e2b-dev/E2B/security/dependabot/163
https://github.com/e2b-dev/E2B/security/dependabot/157
https://github.com/e2b-dev/E2B/security/dependabot/156
https://github.com/e2b-dev/E2B/security/dependabot/148
https://github.com/e2b-dev/E2B/security/dependabot/147
2025-04-29 02:41:14 -07:00
github-actions[bot] 2c633a4ee9 [skip ci] Release new versions 2025-04-24 15:34:38 +00:00
Jakub Novák f81307c515 Allow for short sandbox id in e2b sbx connect (#702)
# Description

Allow for short sandbox ID in CLI when using `e2b sandbox connect
<sandbox-id>`
2025-04-24 08:31:04 -07:00
github-actions[bot] cde5128e96 [skip ci] Release new versions 2025-04-24 09:46:24 +00:00
Jakub Novák 64f2f71309 Respect E2B_DOMAIN for e2b auth login in CLI (#701)
# Description

- Respect `E2B_DOMAIN` for `e2b auth login` in CLI
- Keep `E2B_DOCS_BASE` to allow for running dashboard locally or towards
potentially different domain
2025-04-24 11:43:34 +02:00
github-actions[bot] 32664ea0fe [skip ci] Release new versions 2025-04-01 20:36:48 +00:00
Mish Ushakov c3ecd7c684 Remove backslashes from the docker build command (Windows) (#652)
- Fixing #650, on Windows commands cannot separate arguments by
backslash (\).
2025-04-01 16:32:56 +01:00
github-actions[bot] e7321d5b12 [skip ci] Release new versions 2025-03-28 20:38:03 +00:00
David Batey e8fab568da build-arg's not working for e2b template build command (#644)
At the moment if you pass in build args it breaks since the commands
aren't compatible with the docker build command:

Sample error at the moment when passing the --build-arg to e2b which
proxies the command on incorrectly:

```
(base) ➜  web git:(lb) ✗ npm run build-template template-name version

> new-nextjs-app@0.1.0 build-template
> ts-node scripts/build-template.ts template-name template-version sha

ERROR: "docker buildx build" requires exactly 1 argument.
See 'docker buildx build --help'.

Usage:  docker buildx build [OPTIONS] PATH | URL | -

Start a build
/bin/sh: line 4: --build-arg=TEMPLATE_VERSION=0.0.1: command not found
Error: Command failed: docker build . \
   -f e2b.Dockerfile \
   --pull --platform linux/amd64 \
   -t docker.e2b.dev/e2b/custom-envs/17e92ok9u0gimh3oy1qg:be0bdf11-4cf2-4ee0-a932-1ecb6ae50298 --build-arg="TEMPLATE_NAME=lead-magnet" \
   --build-arg="TEMPLATE_VERSION=0.0.1"
    at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at checkExecSyncError (node:child_process:889:11)
    at Object.execSync (node:child_process:961:15)
    at e.<anonymous> (/opt/homebrew/lib/node_modules/@e2b/cli/src/commands/template/build.ts:363:23) {
  status: 127,
  signal: null,
  output: [ null, null, null ],
  pid: 67925,
  stdout: null,
  stderr: null
}
Failed to build template: Error: Command failed: e2b template build -d "../../sandbox/templates/e2b.Dockerfile" -n template-name sha1 --build-arg TEMPLATE_NAME=template-name --build-arg TEMPLATE_VERSION=0.0.1 -p "../sandbox/templates/"
ERROR: "docker buildx build" requires exactly 1 argument.
See 'docker buildx build --help'.

Usage:  docker buildx build [OPTIONS] PATH | URL | -
```

---------

Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
2025-03-28 21:34:50 +01:00