Deploy AOS Lua scripts.
Examples
code
/deploy src/counter.lua # deploy to testnet /deploy --mainnet src/counter.lua # deploy to production HyperBEAM /deploy --local-hb --lua src/counter.lua # deploy to local HB in Lua mode
Steps
- •Run the test suite and abort if any fail:
bash
yarn test 2>&1
If tests fail, stop and report. Do NOT deploy with failing tests.
- •
Confirm with the user before deploying:
- •Show which scripts will be deployed
- •Show the target: testnet (default),
--mainnet(remote HB), or--local-hb(local HB) - •If
$ARGUMENTSis provided, pass them through to the deploy script - •If no file arguments, all
src/*.luafiles will be deployed - •Ask for confirmation
- •
Deploy:
bash
# Testnet (default) yarn deploy yarn deploy src/counter.lua # Remote HyperBEAM (production — uses push-1.forward.computer) yarn deploy --mainnet yarn deploy --mainnet src/counter.lua # Local HyperBEAM (development) yarn deploy --local-hb yarn deploy --local-hb src/counter.lua # Lua mode (any target) yarn deploy --mainnet --lua yarn deploy --local-hb --lua # Custom node yarn deploy --node https://push-3.forward.computer src/counter.lua
The script automatically:
- •Finds the wallet from
.env.hyperbeamCWD or.wallet.json - •Deploys each script and prints its process ID
- •Reports success/failure for each file
- •Report the process IDs from the output.
Important
- •Remote HB: Uses
push-1.forward.computer(NOTpush.forward.computerwhich is push-only with no compute) - •Local HB: Requires HyperBEAM running at localhost:10001
- •Lua mode: Faster but no
receive()support — usemsg.reply()pattern - •Wallet: Generate with
yarn keygenif not present
Troubleshooting
MU 504 error on testnet
- •AO testnet MU can be flaky — retry after 30 seconds
- •Switch to
--mainnetfor reliable deployment
"Wallet not found"
- •Generate with
yarn keygen - •Or check
.env.hyperbeamCWD for existing wallet
Process ID returned but process unreachable
- •Testnet processes may take 10-30s to become available
- •For HyperBEAM, verify the node is still running