@h1dr4/h3retik-cloud
v0.1.8
Published
Headless CLI for h3retik cloud operations (auth, sessions, tools, jobs, payments, output).
Readme
@h1dr4/h3retik-cloud
Headless CLI for h3retik cloud.
Default API base:
https://h1dr4.dev/h3retik/api
Install
npm i -g @h1dr4/h3retik-cloudCore Model
- Backend issues quotes/invoices.
- User/agent pays externally (own signer, wallet app, or
h1dr4-wallet). - CLI submits
tx_hashfor backend verification. - Backend validates onchain payment and unlocks session/job execution.
- Private keys are never sent to the backend.
Cloud runs do not require client-side RPC.
Quick Start
# 1) init local state
h3retik-cloud init --base-url https://h1dr4.dev/h3retik/api
# 2) auth challenge (message to sign with your wallet)
h3retik-cloud auth challenge --wallet 0xYOUR_WALLET --json
# 3) sign returned message in wallet app, then verify
h3retik-cloud auth verify --wallet 0xYOUR_WALLET --nonce NONCE_FROM_CHALLENGE --signature 0xSIGNATURE
# 4) accept ToS after explicit human consent
h3retik-cloud tos accept
# 5) quote + rent session
h3retik-cloud sessions quote --minutes 10 --actions 3 --json
h3retik-cloud sessions rent --minutes 10 --actions 3 --asset USDC --tx 0xSESSION_TX --receiver 0x99EEDcE3C87Adf3dE1c9B8B08F1810C168D6E039
# 6) load tools into session
h3retik-cloud tools load --session ses_xxx --tool nmap --category Network --install "apt-get update -y >/dev/null 2>&1 && apt-get install -y nmap >/dev/null 2>&1"
# 7) create/pay/start job
h3retik-cloud jobs create --target scanme.nmap.org --lane local --pipeline quick --cmd "nmap -Pn -F scanme.nmap.org" --budget 3 --minutes 5
h3retik-cloud jobs pay --job job_xxx --asset USDC --tx 0xJOB_TX --receiver 0x99EEDcE3C87Adf3dE1c9B8B08F1810C168D6E039 --amount 0.6175
h3retik-cloud jobs start --job job_xxx --session ses_xxx
h3retik-cloud jobs output --job job_xxxOne-Command Run
run orchestrates: ToS accept -> session quote/rent -> optional tool load -> job create/pay/start -> output.
run requires an existing auth token in state (auth challenge + auth verify done first).
h3retik-cloud run \
--confirm \
--wallet 0xYOUR_WALLET \
--asset USDC \
--minutes 10 \
--actions 3 \
--target scanme.nmap.org \
--lane local \
--pipeline quick \
--session-tx 0xSESSION_PAYMENT_TX \
--job-tx 0xJOB_PAYMENT_TX \
--cmd "nmap -Pn -F scanme.nmap.org" \
--tool nmap \
--category Network \
--install "apt-get update -y >/dev/null 2>&1 && apt-get install -y nmap >/dev/null 2>&1" \
--jsonWallet Helpers
h3retik-cloud wallet init --json
h3retik-cloud wallet init --install-wallet --json
h3retik-cloud wallet init --install-wallet --wallet-source github:nativ3ai/h1dr4-wallet --json
h3retik-cloud wallet address --private-key 0xKEY
h3retik-cloud wallet balance --wallet 0xWALLET --rpc-url https://base-mainnet.g.alchemy.com/v2/YOUR_KEYwallet init behavior:
- if
h1dr4-walletexists on PATH: reuse - if missing and
--install-wallet: install from source candidates - you can force source with
--wallet-source
Agent-Safe Flags
--json: machine-readable output--dry-run: previewrunplan without execution--confirm: required execution gate forrun--job-id: idempotentjobs createretries--session,--job: target existing resources--asset:USDCorH1DR4--session-tx,--job-tx: explicit invoice payment tx hashes--start-retries: retryjobs startwhen backend returns retryable start responses--start-retry-delay-ms: base backoff delay for start retries
Commands
initauth challenge|verify|logintos get|acceptsessions quote|rent|extend|gettools catalog|available|loadjobs quote|create|pay|start|get|output|logswallet init|address|balancerun
Notes
H1DR4quote appears only when backend has stable live token price.--admin-ipis internal staging/admin only.
Terminal Demo Video
Generate the tutorial videos created in this repo:
npm i -D cli-cinema playwright
npm run video:renderOutputs:
media/out/h3retik-cloud-startup-main.mp4(16:9 main cut)media/out/h3retik-cloud-startup-vertical.mp4(9:16 mobile cut)
