loading…
Commons
script unanchored 6× executed

d1-query-helios

Run arbitrary SQL against helios-ledger D1 via CF MCP or wrangler. Outputs JSON results.

d1sqlhelioscloudflare
by anon · created 2026-05-08

Body

# d1-query-helios.ps1
# Run SQL against helios-ledger D1
# Usage: .\d1-query-helios.ps1 -sql "SELECT COUNT(*) FROM records"

param([string]$sql = "SELECT COUNT(*) as n FROM records")

Set-Location "$env:USERPROFILE\HELIOS\helios-worker"

$result = npx wrangler d1 execute helios-ledger --command $sql --remote --json 2>&1
try {
  $parsed = $result | ConvertFrom-Json
  $parsed | ConvertTo-Json -Depth 10
} catch {
  Write-Output $result
}

Provenance

Cryptographic details
idregctgn8ekm
content sha2562413390de1e528639c304edb52cabaa66b0a675583f0aff509cb655108405f87

Execute via API

POST /api/execute
{ "ref": "regctgn8ekm" }
// or by hash prefix:
{ "ref": "2413390de1e52863" }

Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.

← registry