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 truffle 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
# Or from a specific directory:
truffle build ./my-app

This command bundles your Python code, dependencies, and assets into a deployable package.

Build Process

Uploading to Truffle

truffle upload
# Or from a specific directory:
truffle upload ./my-app

Ship it! This command sends your app to Truffle hardware or the cloud, making it instantly available to your Agent.


Command Cheatsheet

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

Pro Tips

  • Use truffle --help to see all commands and options.
  • The init command flags:
    • -n, --name — Your app's display name
    • -d, --description — Brief summary of what your app does
    • -p, --path — Output path for the scaffold
  • Running commands without arguments uses the current directory.
  • Always build before you upload.

Ready to build something cool? Head over to our First App Example.


Version

Show the installed Truffle CLI version.

truffle version

Use this to verify you're running the latest CLI release.