Liking cljdoc? Tell your friends :D

pocketenv-io.sandbox

Sandbox record and pipe-safe operations.

The Sandbox record is the central type of the SDK. Obtain one from pocketenv-io.pocketenv/create-sandbox or get-sandbox, then pipe operations with Clojure's -> threading macro:

(-> (pocketenv/create-sandbox "my-box") (sandbox/start) (sandbox/wait-until-running) (sandbox/exec "clojure" ["-M:test"]))

Every operation accepts either a bare Sandbox record or an {:ok sandbox} result map, enabling seamless threading. Passing {:error reason} raises an exception, keeping error handling explicit.

Sandbox record and pipe-safe operations.

The Sandbox record is the central type of the SDK. Obtain one from
pocketenv-io.pocketenv/create-sandbox or get-sandbox, then pipe
operations with Clojure's -> threading macro:

  (-> (pocketenv/create-sandbox "my-box")
      (sandbox/start)
      (sandbox/wait-until-running)
      (sandbox/exec "clojure" ["-M:test"]))

Every operation accepts either a bare Sandbox record or an {:ok sandbox}
result map, enabling seamless threading. Passing {:error reason} raises
an exception, keeping error handling explicit.
raw docstring

deleteclj

(delete sandbox-or-result)
(delete sandbox-or-result opts)

Deletes the sandbox permanently. Returns {:ok sandbox} with last known state.

Options: :token

Deletes the sandbox permanently. Returns {:ok sandbox} with last known state.

Options: :token
sourceraw docstring

delete-secretclj

(delete-secret sandbox-or-result id)
(delete-secret sandbox-or-result id opts)

Deletes a secret by its id.

Options: :token

Deletes a secret by its id.

Options: :token
sourceraw docstring

execclj

(exec sandbox-or-result cmd)
(exec sandbox-or-result cmd args)
(exec sandbox-or-result cmd args opts)

Executes a shell command inside the sandbox.

Returns {:ok ExecResult} with :stdout, :stderr, :exit-code.

Options: :token

Executes a shell command inside the sandbox.

Returns {:ok ExecResult} with :stdout, :stderr, :exit-code.

Options: :token
sourceraw docstring

exec-result-from-mapclj

(exec-result-from-map m)
source

exposeclj

(expose sandbox-or-result port)
(expose sandbox-or-result port opts)

Exposes a port on the sandbox. Returns {:ok preview-url-or-nil}.

Options: :description, :token

Exposes a port on the sandbox. Returns {:ok preview-url-or-nil}.

Options: :description, :token
sourceraw docstring

get-ssh-keysclj

(get-ssh-keys sandbox-or-result)
(get-ssh-keys sandbox-or-result opts)

Fetches the SSH key pair for the sandbox.

Options: :token

Fetches the SSH key pair for the sandbox.

Options: :token
sourceraw docstring

get-tailscale-auth-keyclj

(get-tailscale-auth-key sandbox-or-result)
(get-tailscale-auth-key sandbox-or-result opts)

Fetches the Tailscale auth key for the sandbox.

Options: :token

Fetches the Tailscale auth key for the sandbox.

Options: :token
sourceraw docstring

list-portsclj

(list-ports sandbox-or-result)
(list-ports sandbox-or-result opts)

Lists all exposed ports on the sandbox.

Returns {:ok [Port]}

Lists all exposed ports on the sandbox.

Returns {:ok [Port]}
sourceraw docstring

list-secretsclj

(list-secrets sandbox-or-result)
(list-secrets sandbox-or-result opts)

Lists all secrets for the sandbox.

Options: :limit (default 100), :offset (default 0), :token

Lists all secrets for the sandbox.

Options: :limit (default 100), :offset (default 0), :token
sourceraw docstring

port-from-mapclj

(port-from-map m)
source

profile-from-mapclj

(profile-from-map m)
source

sandbox-from-mapclj

(sandbox-from-map m)
source

secret-from-mapclj

(secret-from-map m)
source

set-secretclj

(set-secret sandbox-or-result name value)
(set-secret sandbox-or-result name value opts)

Adds an encrypted secret to the sandbox.

Options: :token

Adds an encrypted secret to the sandbox.

Options: :token
sourceraw docstring

set-ssh-keysclj

(set-ssh-keys sandbox-or-result private-key public-key)
(set-ssh-keys sandbox-or-result 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
sourceraw docstring

set-tailscale-auth-keyclj

(set-tailscale-auth-key sandbox-or-result auth-key)
(set-tailscale-auth-key sandbox-or-result 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
sourceraw docstring

ssh-key-from-mapclj

(ssh-key-from-map m)
source

startclj

(start sandbox-or-result)
(start sandbox-or-result opts)

Starts the sandbox. Re-fetches state after the call.

Options: :repo, :keep-alive, :token

Starts the sandbox. Re-fetches state after the call.

Options: :repo, :keep-alive, :token
sourceraw docstring

stopclj

(stop sandbox-or-result)
(stop sandbox-or-result opts)

Stops the sandbox. Re-fetches state after the call.

Options: :token

Stops the sandbox. Re-fetches state after the call.

Options: :token
sourceraw docstring

tailscale-auth-key-from-mapclj

(tailscale-auth-key-from-map m)
source

unexposeclj

(unexpose sandbox-or-result port)
(unexpose sandbox-or-result port opts)

Removes an exposed port. Returns {:ok sandbox}.

Options: :token

Removes an exposed port. Returns {:ok sandbox}.

Options: :token
sourceraw docstring

vscodeclj

(vscode sandbox-or-result)
(vscode sandbox-or-result opts)

Exposes VS Code Server and returns its URL.

Returns {:ok preview-url-or-nil}

Options: :token

Exposes VS Code Server and returns its URL.

Returns {:ok preview-url-or-nil}

Options: :token
sourceraw docstring

wait-until-runningclj

(wait-until-running sandbox-or-result)
(wait-until-running sandbox-or-result opts)

Polls until the sandbox status becomes :running.

Options: :timeout-ms (default 60000), :interval-ms (default 2000), :token

Polls until the sandbox status becomes :running.

Options: :timeout-ms (default 60000), :interval-ms (default 2000), :token
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close