Docs

Using Anvil.

Anvil stores CC:Tweaked programs and gets them onto computers in your world. Your Minecraft server must have the http API enabled and allow anvil.thultz.dev.

Install the anvil program.

Run this once on each computer or turtle. It installs /anvil.lua and makes anvil work from any folder.

>wget run https://anvil.thultz.dev/install

Commands.

anvil get <id> [path]
Install a script. One file becomes <title>.lua; several files go in a folder.
anvil run <id> [args]
Download and run a script once without installing it.
anvil update [id]
Update every installed script (or one) to its latest version.
anvil list
Scripts installed on this computer.
anvil search <words>
Search the public library.
anvil info <id>
Title, author, version and link of a script.
anvil login <key>
Save an upload key from your dashboard so push works. Only on computers you alone use.
anvil push new <file|folder> [title]
Publish a file or folder as a new public script.
anvil push <id> <file|folder> [message]
Save a new version of one of your scripts.
anvil logout
Forget the upload key on this computer.

Upload keys.

An upload key can publish new scripts and push new versions to every script you own, and any program on that computer can read it. Don't log in on a computer other players can use or edit, and don't run scripts you don't trust on one that holds a key. The dashboard shows when and from where each key was last used; revoke any key you don't recognize. anvil get sends the key only when a script isn't public, so fetching other people's scripts never shares it.

Raw file URLs.

Every script works with plain wget, no anvil needed:

CraftOSshell
wget run https://anvil.thultz.dev/r/<id>          -- run the entry filewget https://anvil.thultz.dev/r/<id> miner.lua    -- save itwget https://anvil.thultz.dev/r/<id>/lib/util.lua -- any other filewget https://anvil.thultz.dev/r/<id>?v=3          -- a fixed version

The editor and computer.

Run copies your files onto a real CraftOS computer running in your browser (Copy Cat, built from CC:Tweaked's own source) and reboots into the entry file, marked with a play icon. Click the screen to type into it. Stop sends Ctrl+T; Reset gives you a fresh computer with an empty disk. The editor completes the CC:Tweaked API as you type, including methods of peripherals you wrap.

Monitor

Pick a size from 1x1 to 8x6 blocks and a side. peripheral.find, setTextScale and monitor_touch work like in game.

Turtle

Runs your program on a mining turtle drawn in 3D, at y=64 facing north with 1000 fuel, coal, torches, cobblestone and planks, above a chest of coal.

Network

Up to four computers linked by wireless or ender modems, 8 blocks apart. rednet works unchanged and the Messages tab lists every transmission.

Not emulated
Wired modems, cables and peripherals shared over a network are not emulated yet. Crafting, attacking and equipping do not work on the simulated turtle.

AI.

The AI panel in the editor generates programs from a description, fixes the error on the computer's screen and explains code. Every answer is run on CraftOS before you see it, and you apply it to your files yourself. With AI suggestions on, the editor also offers ghost text as you type: Tab accepts it, Esc dismisses it.

Requests use the AI allowance of your thultz.dev account: one 5-hour window and one weekly window, shared with TurtleDeck and Lantern Hub. Your account page shows both, with every request on the usage history.

Limits.

  • Up to 32 files and 512 KB per script. File paths use letters, digits and . - _ /.
  • Every save is a new version. Old versions stay available at ?v=.

Visibility.

Public scripts are listed and searchable. Unlisted ones work for anyone with the link but are not listed. Private ones work only for you.

Versions.

Saving in the editor or running anvil push adds a version; saving unchanged files does not. anvil get and anvil update always fetch the latest version, and a script page shows older ones with ?v=.