nova-app-builderBuild and deploy Nova Platform apps (TEE apps on Sparsity Nova / sparsity.cloud). Use when a user wants to create a Nova app, write enclave application code,...
Install via ClawdBot CLI:
clawdbot install zfdang/nova-app-builderEnd-to-end workflow: scaffold ā code ā push to Git ā create app ā build ā deploy ā (on-chain: create app on-chain ā enroll version ā generate ZK proof ā register instance).
Nova apps run inside AWS Nitro Enclaves, managed by Enclaver (Sparsity edition) and supervised by Odyn (PID 1 inside the enclave). Key concepts:
/v1/kms/derive.Ensure skill is up to date before starting:
> clawhub update nova-app-builder >
Older versions are missing Dockerfile.txt in the template, causing scaffold to fail.
GitHub PAT setup:
1. GitHub ā Settings ā Developer settings ā Personal access tokens ā Fine-grained tokens
2. Required permissions: Contents (Read & Write), Metadata (Read)
3. Push with token:
git remote set-url origin https://oauth2:${GH_TOKEN}@github.com/<user>/<repo>.git
git push origin main
ā ļø Do NOT ask for Docker registry credentials or AWS S3 credentials.
Nova Platform handles the Docker build and image registry internally (Git-based build pipeline).
S3 storage credentials are managed by the Enclaver/Odyn layer ā the app only calls Internal API endpoints (/v1/s3/*). Users never touch AWS credentials.
python3 scripts/scaffold.py \
--name <app-name> \
--desc "<one-line description>" \
--port <port> \
--out <output-dir>
Port choice: Any port works. Set it viaadvanced.app_listening_portwhen creating the app. Must also matchEXPOSEin your Dockerfile. No requirement to use 8080.
This generates with the following structure:
<app-name>/
āāā Dockerfile
āāā enclave/
āāā main.py
āāā odyn.py
āāā requirements.txt
Note: The template ships asDockerfile.txt(clawhub cannot distribute extensionless files).scaffold.pyautomatically renames it toDockerfileand substitutes the port. No manual action needed.
Alternatively, fork nova-app-template ā a production-ready starter with KMS, S3, App Wallet, E2E encryption, and a built-in React frontend.
Edit enclave/main.py. Key patterns:
Minimal FastAPI app:
import os, httpx
from fastapi import FastAPI
app = FastAPI()
IN_ENCLAVE = os.getenv("IN_ENCLAVE", "false").lower() == "true"
ODYN_BASE = "http://127.0.0.1:18000" if IN_ENCLAVE else "http://odyn.sparsity.cloud:18000"
@app.get("/api/hello")
def hello():
r = httpx.get(f"{ODYN_BASE}/v1/eth/address", timeout=10)
return {"message": "Hello from TEE!", "enclave": r.json()["address"]}
With App Wallet + KMS (from nova-app-template):
from kms_client import NovaKmsClient
kms = NovaKmsClient(endpoint=ODYN_BASE)
@app.get("/api/wallet")
def wallet():
return kms.app_wallet_address() # {"address": "0x...", "app_id": 0}
@app.post("/api/sign")
def sign(body: dict):
return kms.app_wallet_sign(body["message"]) # {"signature": "0x..."}
Dual-chain topology (as in the template):
Helios light-client RPC runs locally at http://127.0.0.1:18545 (Base Sepolia) and http://127.0.0.1:18546 (Mainnet).
ā ļø Helios RPC ports must be decided before creating the app ā they are set in advanced.helios_chains[].local_rpc_port and locked at creation time. Choose values carefully up front.
Rules for enclave code:
httpx (proxy-aware). Never use requests or urllib ā they may bypass the egress proxy./v1/s3/* endpoints; the enclave filesystem is ephemeral./v1/kms/derive); never from env vars or hardcoded.IN_ENCLAVE=false uvicorn main:app --port (Odyn calls hit the public mock).Your repo only needs Dockerfile + app code. No local Docker build needed ā Nova Platform builds from your Git repo directly.
KMS integration is fully handled by the platform ā just set enable_decentralized_kms: true (and optionally enable_app_wallet: true) in advanced when creating the app. No contract addresses, app IDs, or manual KMS config needed in your code.
git add .
git commit -m "Initial Nova app"
git push origin main
The deployment is a 3-step process: Create App ā Trigger Build ā Create Deployment.
main (or tag / commit SHA)v1.0.0success (Nova builds Docker image ā EIF ā generates PCRs)running ā copy the App URL (hostname from app detail)The script will ask interactively whether to run on-chain registration after the app is live. Use --onchain to always run it, --no-onchain to always skip.
# Preview config without deploying
python3 scripts/nova_deploy.py \
--repo https://github.com/you/my-app \
--name "my-app" \
--port 8080 \
--api-key <your-nova-api-key> \
--dry-run
# Deploy (will prompt for on-chain at the end)
python3 scripts/nova_deploy.py \
--repo https://github.com/you/my-app \
--name "my-app" \
--port 8080 \
--api-key <your-nova-api-key>
# Deploy + on-chain registration in one shot
python3 scripts/nova_deploy.py \
--repo https://github.com/you/my-app \
--name "my-app" \
--port 8080 \
--api-key <your-nova-api-key> \
--onchain
Or via raw API:
BASE="https://sparsity.cloud/api"
TOKEN="<your-api-key>"
REPO="https://github.com/you/my-app"
# 1. Create app ā 'advanced' is the only config field needed
SQID=$(curl -sX POST "$BASE/apps" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name":"my-app",
"repo_url":"'"$REPO"'",
"advanced":{
"directory":"/",
"app_listening_port":8080,
"egress_allow":["**"],
"enable_decentralized_kms":false,
"enable_persistent_storage":false,
"enable_s3_storage":false,
"enable_s3_kms_encryption":false,
"enable_ipfs_storage":false,
"enable_walrus_storage":false,
"enable_app_wallet":false,
"enable_helios_rpc":false,
"helios_chains":[
{"chain_id":"1","kind":"ethereum","network":"mainnet","execution_rpc":"","local_rpc_port":18545}
]
}
}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['sqid'])")
echo "App sqid: $SQID"
# 2. Trigger build
BUILD_ID=$(curl -sX POST "$BASE/apps/$SQID/builds" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"git_ref":"main","version":"1.0.0"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
echo "Build ID: $BUILD_ID"
# 3. Poll build
while true; do
STATUS=$(curl -s "$BASE/builds/$BUILD_ID/status" \
-H "Authorization: Bearer $TOKEN" \
| python3 -c "import sys,json; print(json.load(sys.stdin).get('status',''))")
echo "Build: $STATUS"
[ "$STATUS" = "success" ] && break
[ "$STATUS" = "failed" ] && echo "Build failed!" && exit 1
sleep 15
done
# 4. Create deployment
DEPLOY_ID=$(curl -sX POST "$BASE/apps/$SQID/deployments" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"build_id\":$BUILD_ID}" \
| python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
echo "Deployment ID: $DEPLOY_ID"
# 5. Poll deployment
while true; do
RESP=$(curl -s "$BASE/deployments/$DEPLOY_ID/status" -H "Authorization: Bearer $TOKEN")
STATE=$(echo $RESP | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('deployment_state',''))")
echo "Deployment state: $STATE"
[ "$STATE" = "running" ] && break
[ "$STATE" = "failed" ] && echo "Deploy failed!" && exit 1
sleep 15
done
# 6. Get app URL (hostname from detail, or use unified status)
curl -s "$BASE/apps/$SQID/detail" -H "Authorization: Bearer $TOKEN" \
| python3 -c "import sys,json; d=json.load(sys.stdin); print(d['app'].get('hostname',''))"
# Tip: GET /api/apps/{sqid}/status gives the full lifecycle in one call:
# build_status, deployment_state, proof_status, onchain_instance_id, etc.
# Health check
curl https://<hostname>/
# Hello endpoint (returns enclave address + signature)
curl https://<hostname>/api/hello
# Attestation (proves it's a real Nitro Enclave) ā POST, returns binary CBOR
curl -sX POST https://<hostname>/.well-known/attestation --output attestation.bin
Note:/api/app-walletis only available if you forked nova-app-template. The scaffold template includes/api/helloinstead.
After the app is running, register it on-chain to establish verifiable trust.
Using the script (recommended):
python3 scripts/nova_deploy.py ... --onchain
The script will automatically execute steps 6aā6d and poll until complete.
Manually via API ā 4-step sequence:
# 6a. Create app on-chain
curl -sX POST "$BASE/apps/$SQID/create-onchain" \
-H "Authorization: Bearer $TOKEN"
# Poll: GET /api/apps/{sqid}/status ā onchain_app_id is set when done
# 6b. Enroll build version on-chain (PCR measurements ā trusted code fingerprint)
curl -sX POST "$BASE/apps/$SQID/builds/$BUILD_ID/enroll" \
-H "Authorization: Bearer $TOKEN"
# Poll enrollment via build status endpoint
while true; do
ENROLLED=$(curl -s "$BASE/builds/$BUILD_ID/status" \
-H "Authorization: Bearer $TOKEN" \
| python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('is_enrolled',''))")
echo "Enrolled: $ENROLLED"
[ "$ENROLLED" = "True" ] && break
sleep 10
done
# 6c. Generate ZK proof
curl -sX POST "$BASE/zkproof/generate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"deployment_id\": $DEPLOY_ID}"
# Poll proof via deployment status endpoint (or /zkproof/status/{deployment_id})
while true; do
PROOF=$(curl -s "$BASE/deployments/$DEPLOY_ID/status" \
-H "Authorization: Bearer $TOKEN" \
| python3 -c "import sys,json; print(json.load(sys.stdin).get('proof_status',''))")
echo "Proof status: $PROOF"
[ "$PROOF" = "proved" ] && break
[ "$PROOF" = "failed" ] && echo "Proof failed!" && exit 1
sleep 30
done
# 6d. Register instance on-chain
curl -sX POST "$BASE/zkproof/onchain/register" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"deployment_id\": $DEPLOY_ID}"
# Poll: GET /api/deployments/{id}/status ā onchain_instance_id is set when done
# Or use unified: GET /api/apps/{sqid}/status ā latest_onchain_instance_id
What each step does:
After registration, anyone can verify on-chain that this running instance matches the audited build.
advanced is REQUIRED at app creation. Omitting it will cause the build to fail. Only advanced exists ā the old enclaver field has been removed from the API.Dockerfile + app code. The platform handles everything else at build time.sqid (string like abc123) ā use in all URL paths, not the integer id.advanced.app_listening_port. Must also match EXPOSE in Dockerfile.references/nova-api.md ā ports are fixed and locked at app creation.enable_app_wallet or enable_s3_kms_encryption implies KMS ā implies Helios (with base-sepolia chain) ā implies kms_app_id + nova_app_registry.| Symptom | Fix |
|---|---|
| Dockerfile missing after scaffold | Run clawhub update nova-app-builder then re-scaffold. The template ships as Dockerfile.txt and scaffold renames it to Dockerfile automatically. |
| scaffold fails / enclaver.yaml or config.py expected | You have an old version. Run clawhub update nova-app-builder. These files are no longer needed ā advanced field at app creation replaces all manual config. |
| API endpoint console.sparsity.cloud not resolving | Old version of nova_deploy.py. Run clawhub update nova-app-builder. Correct endpoint is https://sparsity.cloud/api. |
| Build stuck in pending | Check GitHub Actions in nova build repo; may be queued |
| Build failed | Check error_message in build response; usually Dockerfile issue |
| Deploy API returns 401 | Regenerate API key at sparsity.cloud |
| App stuck in provisioning >10 min | Check app logs via GET /api/apps/{sqid}/detail |
| httpx request fails inside enclave | Add domain to advanced.egress_allow. Note: "**" matches domains only ā add "0.0.0.0/0" for direct IP connections |
| Direct IP connection blocked | "**" does NOT cover IPs. Add "0.0.0.0/0" (IPv4) and/or "::/0" (IPv6) to egress_allow |
| S3 fails | Ensure 169.254.169.254 and S3 endpoint are in egress allow list |
| /v1/kms/* returns 400 | Ensure enable_decentralized_kms: true and enable_helios_rpc: true in advanced at app creation |
| App Wallet unavailable | Ensure enable_app_wallet: true in advanced at app creation |
| Proxy not respected | Switch from requests/urllib to httpx |
| Health check returns 502 | App is starting; wait for enclave to fully boot |
| ZK proof stuck | Check GET /api/zkproof/status/{deployment_id} for details |
references/odyn-api.md ā Full Odyn Internal API (signing, encryption, S3, KMS, App Wallet, attestation)references/nova-api.md ā Nova Platform REST API (full endpoint reference)Generated Mar 1, 2026
Financial institutions can use Nova apps to verify user identities while keeping sensitive data encrypted within TEE enclaves. The app processes KYC documents and biometric data, generating verifiable credentials without exposing raw personal information. This enables compliant onboarding while maintaining user privacy through zero-knowledge proofs.
Medical research organizations can deploy Nova apps to analyze patient data across multiple hospitals while keeping records encrypted and auditable. The enclave processes genomic data and medical histories, producing aggregated insights without revealing individual patient identities. This enables breakthrough research while maintaining HIPAA compliance and patient confidentiality.
Luxury goods manufacturers can create Nova apps that track product authenticity from raw materials to retail. Each production step generates cryptographic proofs within the enclave, creating an immutable chain of custody. Consumers can verify product origins without exposing proprietary manufacturing processes or supplier relationships.
Companies can deploy proprietary machine learning models as Nova apps, allowing clients to submit data for inference while keeping both the model weights and input data encrypted. The enclave executes predictions and returns results, protecting intellectual property and sensitive client data through hardware-level isolation.
Government agencies can implement transparent voting systems where Nova apps tally encrypted ballots within TEE enclaves. The app verifies voter eligibility, counts votes, and generates verifiable proofs of correct computation without revealing individual voting choices. This enables auditable elections while maintaining ballot secrecy.
Offer Nova app deployment as a managed service, charging monthly subscription fees based on enclave compute hours, memory allocation, and network egress. Include tiered pricing with premium support, custom domain management, and SLA guarantees. This model provides predictable recurring revenue while handling infrastructure complexity for clients.
Provide specialized consulting services to help enterprises design, develop, and deploy custom Nova applications. Charge project-based fees for architecture design, code development, security audits, and deployment assistance. Offer ongoing maintenance contracts for critical applications requiring regular updates and monitoring.
Create a marketplace of pre-built Nova app templates for common use cases like encrypted databases, secure APIs, or compliance tools. Monetize through template licensing fees, revenue sharing with developers, and premium template subscriptions. Include enterprise support packages for customized template deployments.
š¬ Integration Tip
Start with the nova-app-template fork for production-ready features like KMS, S3, and App Wallet, then customize the enclave/main.py logic for your specific use case while maintaining the secure architecture patterns.
Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag,...
Essential Docker commands and workflows for container management, image operations, and debugging.
Tool discovery and shell one-liner reference for sysadmin, DevOps, and security tasks. AUTO-CONSULT this skill when the user is: troubleshooting network issues, debugging processes, analyzing logs, working with SSL/TLS, managing DNS, testing HTTP endpoints, auditing security, working with containers, writing shell scripts, or asks 'what tool should I use for X'. Source: github.com/trimstray/the-book-of-secret-knowledge
Deploy applications and manage projects with complete CLI reference. Commands for deployments, projects, domains, environment variables, and live documentation access.
Monitor topics of interest and proactively alert when important developments occur. Use when user wants automated monitoring of specific subjects (e.g., product releases, price changes, news topics, technology updates). Supports scheduled web searches, AI-powered importance scoring, smart alerts vs weekly digests, and memory-aware contextual summaries.