including bundling of assets (packr & webpack) db [PLUGIN] [DEPRECATED] please use `buffalo pop` instead. destroy Destroy generated components dev Run the Buffalo app in 'development' mode fix Attempt to fix a Buffalo application's API to match version v0.15.3 generate Generate application components help Help about any command heroku [PLUGIN] helps with heroku setup and deployment for buffalo applications info Print diagnostic information (useful for debugging) new Creates a new Buffalo application plugins tools for working with buffalo plugins pop [PLUGIN] A tasty treat for all your database needs routes Print all defined routes setup Setup a newly created, or recently checked out application. task Run grift tasks test Run the tests for the Buffalo app. Use --force-migrations to skip schema load. version Print the version information Context $ buffalo -h
•The application should control the whole CLI experience •Plugins need to be simple Go •Little to no magic •Independent with minimal dependencies (standard library)
can create unique toolsets for each app •Can compile cmd/buffalo and have an app specific Buffalo binary $ go build -o bin/buffalo ./cmd/buffalo $ ./bin/buffalo build arg1 arg2
buffalo := &cli.Buffalo{} err := buffalo.Main(ctx, pwd, os.Args[1:]) if err != nil { log.Fatal(err) } } Zero Value Tools for working with Buffalo applications $ buffalo --------- Using Plugins: Type Name Description ---- ---- ----------- *cli.Buffalo buffalo Tools for working with Buffalo applications
plugins that // are important to the type defining it. type Scoper interface { ScopedPlugins() []Plugin } type Feeder func() []Plugin // Needer can be implemented to receive a Feeder function // that can be used to gain access to other plugins in the system. type Needer interface { WithPlugins(Feeder) } Needing and Feeding github.com/gobuffalo/plugins