Skip to main content

CLI Commands

Everything you need to know about the Truffle CLI commands. These are your go-to tools for creating, building, and shipping your Truffle apps.

Creating a New App

truffle init

This is where the magic starts! Running init launches our interactive setup where you'll:

  • Name your app
  • Add a description
  • Pick where to create it

Want to skip the questions? Use these flags:

truffle init -n MyApp -d "My awesome app" -p ./apps/cool-app

Building Your App

truffle build

This command bundles up your Python code into something your Agent can use. Run it from:

  • Your project directory: truffle build
  • A specific location: truffle build ./my-app

[Build Process Image]

Uploading to Truffle

truffle upload

Ship it! This command sends your app to Truffle where your Agent can start using it. Just like build, you can run it from:

  • Your project directory: truffle upload
  • A specific location: truffle upload ./my-app

Command Cheatsheet

Need a quick reference? Here's everything in one place:

CommandWhat it DoesExample
initCreates a new apptruffle init -n MyApp
buildBundles your apptruffle build ./my-app
uploadShips to Truffletruffle upload

Pro Tips

  • Use truffle --help to see all commands
  • The init command accepts these flags:
    • -n, --name - Your app's name
    • -d, --description - What it does
    • -p, --path - Where to create it
  • Running commands without arguments will use your current directory
  • Always build before you upload

Ready to build something cool? Head over to our SDK documentation and create your first app!