the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 39 lines 1.1 kB view raw
1import { password } from "@inquirer/prompts"; 2import { Sandbox } from "@pocketenv/sdk"; 3import consola from "consola"; 4import { c } from "../theme"; 5import { configureSdk } from "../lib/sdk"; 6 7export async function putAuthKey(sandboxName: string) { 8 const authKey = ( 9 await password({ message: "Enter Tailscale Auth Key" }) 10 ).trim(); 11 12 await configureSdk(); 13 14 try { 15 const sandbox = await Sandbox.get(sandboxName); 16 await sandbox.tailscale.setAuthKey(authKey); 17 consola.success( 18 `Tailscale auth key saved for sandbox: ${c.primary(sandboxName)}`, 19 ); 20 } catch (error) { 21 consola.error(`Failed to save Tailscale auth key: ${error}`); 22 process.exit(1); 23 } 24} 25 26export async function getTailscaleAuthKey(sandboxName: string) { 27 await configureSdk(); 28 29 try { 30 const sandbox = await Sandbox.get(sandboxName); 31 const tailscale = await sandbox.tailscale.getAuthKey(); 32 consola.info(`Tailscale auth key: ${c.primary(tailscale.authKey ?? "")}`); 33 } catch { 34 consola.error( 35 `No Tailscale Auth Key found for sandbox: ${c.primary(sandboxName)}`, 36 ); 37 process.exit(1); 38 } 39}