Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix sandbox kill command
Tomas Valenta3b416549000c
diff --git a/.changeset/sweet-masks-suffer.md b/.changeset/sweet-masks-suffer.mdnew file mode 100644index 000000000..459d9ffd5--- /dev/null+++ b/.changeset/sweet-masks-suffer.md@@ -0,0 +1,5 @@+---+"@e2b/cli": patch+---++Fix CLI kill sandbox commanddiff --git a/packages/cli/src/commands/sandbox/kill.ts b/packages/cli/src/commands/sandbox/kill.tsindex 2a5bbfc0a..25dfded8f 100644--- a/packages/cli/src/commands/sandbox/kill.ts+++ b/packages/cli/src/commands/sandbox/kill.ts@@ -4,10 +4,6 @@ import { ensureAPIKey } from 'src/api'import { asBold } from 'src/utils/format'import * as e2b from 'e2b'--const killSandbox = e2b.withAPIKey(- e2b.api.path('/sandboxes/{sandboxID}').method('delete').create(),-)export const killCommand = new commander.Command('kill').description('kill sandbox').argument('<sandboxID>', `kill the sandbox specified by ${asBold('<sandboxID>')}`)@@ -21,7 +17,7 @@ export const killCommand = new commander.Command('kill')process.exit(1)}- await killSandbox(apiKey, { sandboxID })+ await e2b.Sandbox.kill(sandboxID, apiKey)console.log(`Sandbox ${asBold(sandboxID)} has been killed`)} catch (err: any) {