Jido.VFS.Adapter.Sprite (Jido.VFS v1.0.0)

View Source

Jido.VFS adapter for Fly.io Sprites.

This adapter executes shell commands on a Sprite through sprites-ex and maps the results into the Jido.VFS.Adapter behaviour.

Configuration

filesystem =
  Jido.VFS.Adapter.Sprite.configure(
    sprite_name: "my-sprite",
    token: System.fetch_env!("SPRITES_TOKEN"),
    root: "/workspace",
    encoding: :base64
  )

Options

  • :sprite - Existing Sprite handle (optional)
  • :sprite_name - Sprite name when :sprite is not given
  • :token - Sprites API token (falls back to SPRITES_TOKEN)
  • :base_url - API base URL (default: "https://api.sprites.dev")
  • :encoding - :base64 (binary-safe, default) or :raw (text-only)
  • :root - Root path on sprite filesystem (default: "/")
  • :create_on_demand - Create sprite in configure/1 (default: false)
  • :client - Client module (default: Sprites)
  • :client_opts - Extra options passed to client.new/2 (default: [])
  • :probe_commands - Validate required shell primitives during configure (default: true)
  • :required_commands - Override command primitives to probe