Clojure SDK for the Pocketenv sandbox platform.
This namespace is the main entry point for the SDK. It returns Sandbox records that you pipe operations on using Clojure's threading macro:
(require '[pocketenv-io.pocketenv :as pocketenv] '[pocketenv-io.sandbox :as sandbox])
(-> (pocketenv/create-sandbox "my-box") (sandbox/start) (sandbox/wait-until-running) (sandbox/exec "clojure" ["-M:test"]))
Set any of the following environment variables:
POCKETENV_TOKEN — bearer token POCKETENV_API_URL — API base URL (default: https://api.pocketenv.io) POCKETENV_PUBLIC_KEY — server public key (hex-encoded)
Or place a token in ~/.pocketenv/token.json: {"token": "..."}
All functions return {:ok value} on success or {:error reason} on failure. Sandbox operation functions also accept {:ok sandbox} as their first argument so you can chain them with the -> threading macro without unwrapping.
Clojure SDK for the Pocketenv sandbox platform.
This namespace is the main entry point for the SDK. It returns Sandbox
records that you pipe operations on using Clojure's threading macro:
(require '[pocketenv-io.pocketenv :as pocketenv]
'[pocketenv-io.sandbox :as sandbox])
(-> (pocketenv/create-sandbox "my-box")
(sandbox/start)
(sandbox/wait-until-running)
(sandbox/exec "clojure" ["-M:test"]))
## Configuration
Set any of the following environment variables:
POCKETENV_TOKEN — bearer token
POCKETENV_API_URL — API base URL (default: https://api.pocketenv.io)
POCKETENV_PUBLIC_KEY — server public key (hex-encoded)
Or place a token in ~/.pocketenv/token.json: {"token": "..."}
## Return values
All functions return {:ok value} on success or {:error reason} on failure.
Sandbox operation functions also accept {:ok sandbox} as their first argument
so you can chain them with the -> threading macro without unwrapping.(add-secret sandbox-id name value)(add-secret sandbox-id name value opts)Adds an encrypted secret to a sandbox. Value is encrypted client-side.
Returns {:ok response}.
Options: :token
Adds an encrypted secret to a sandbox. Value is encrypted client-side.
Returns {:ok response}.
Options: :token(create-sandbox name)(create-sandbox name opts)Creates a new sandbox. Returns {:ok Sandbox}.
Options: :base — AT-URI of the base image (default: openclaw) :provider — "cloudflare" (default), "daytona", "deno", "vercel", "sprites" :repo — GitHub repo URL to clone on start :keep-alive — keep sandbox alive after session ends :token — bearer token override
Creates a new sandbox. Returns {:ok Sandbox}.
Options:
:base — AT-URI of the base image (default: openclaw)
:provider — "cloudflare" (default), "daytona", "deno", "vercel", "sprites"
:repo — GitHub repo URL to clone on start
:keep-alive — keep sandbox alive after session ends
:token — bearer token override(delete-secret id)(delete-secret id opts)Deletes a secret by its id.
Returns {:ok response}.
Options: :token
Deletes a secret by its id.
Returns {:ok response}.
Options: :token(get-profile did)(get-profile did opts)Fetches the profile of any actor by DID or handle.
Returns {:ok Profile}.
Fetches the profile of any actor by DID or handle.
Returns {:ok Profile}.(get-sandbox id)(get-sandbox id opts)Fetches a single sandbox by id or name. Returns {:ok Sandbox} or {:ok nil}.
Options: :token
Fetches a single sandbox by id or name. Returns {:ok Sandbox} or {:ok nil}.
Options: :token(get-ssh-keys sandbox-id)(get-ssh-keys sandbox-id opts)Fetches the SSH key pair for a sandbox.
Returns {:ok SshKey}.
Options: :token
Fetches the SSH key pair for a sandbox.
Returns {:ok SshKey}.
Options: :token(get-tailscale-auth-key sandbox-id)(get-tailscale-auth-key sandbox-id opts)Fetches the Tailscale auth key for a sandbox.
Returns {:ok TailscaleAuthKey}.
Options: :token
Fetches the Tailscale auth key for a sandbox.
Returns {:ok TailscaleAuthKey}.
Options: :token(list-sandboxes)(list-sandboxes opts)Lists the official public sandbox catalog.
Returns {:ok {:sandboxes [...] :total N}}.
Options: :limit (30), :offset (0), :token
Lists the official public sandbox catalog.
Returns {:ok {:sandboxes [...] :total N}}.
Options: :limit (30), :offset (0), :token(list-sandboxes-by-actor did)(list-sandboxes-by-actor did opts)Lists all sandboxes belonging to a specific actor (DID or handle).
Returns {:ok {:sandboxes [...] :total N}}.
Options: :limit (30), :offset (0), :token
Lists all sandboxes belonging to a specific actor (DID or handle).
Returns {:ok {:sandboxes [...] :total N}}.
Options: :limit (30), :offset (0), :token(list-secrets sandbox-id)(list-secrets sandbox-id opts)Lists all secrets for a sandbox.
Returns {:ok [Secret]}.
Options: :limit (100), :offset (0), :token
Lists all secrets for a sandbox.
Returns {:ok [Secret]}.
Options: :limit (100), :offset (0), :token(me)(me opts)Fetches the profile of the currently authenticated user.
Returns {:ok Profile}.
Fetches the profile of the currently authenticated user.
Returns {:ok Profile}.(put-ssh-keys sandbox-id private-key public-key)(put-ssh-keys sandbox-id private-key public-key opts)Stores an SSH key pair. The private key is encrypted client-side.
Options: :token
Stores an SSH key pair. The private key is encrypted client-side. Options: :token
(put-tailscale-auth-key sandbox-id auth-key)(put-tailscale-auth-key sandbox-id auth-key opts)Stores a Tailscale auth key. Must start with "tskey-auth-". Encrypted client-side before transmission.
Options: :token
Stores a Tailscale auth key. Must start with "tskey-auth-". Encrypted client-side before transmission. Options: :token
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |