Skip to content

Command Guide

sgammon edited this page Oct 5, 2011 · 3 revisions

Command Line Utilities Guide

Command Chaining

Note that with Cakefiles, commands can be chained. For example, you may find it useful to have an integrated dev routine out of the box, with cake bake make run or cake bake make push.

Global Options

Commands

cake

Invokes the cakefile in the current directory. AET comes with a main cakefile, meant for deploying and configuring the skeleton for new projects.

cake newproject

Copies the skeleton for a runtime to a target directory. This contains all of the starting files. Bootstrap and buildout are then run for you, which generate a buildout executable and download starting dependent libraries (see docs for cake bake)

Options

  • -r + --runtime Runtime skeleton to use. Accepted values are py25 or py27.
  • -o + --output Target directory for deploying your new project. Defaults to ~/Workspace/bsdproject
  • -s + --services Deploy with the services middleware (ProtoRPC integration)
  • -coffee + --coffeescript Deploy with CoffeeScript integration.
  • -sass + --compass Deploy with Compass SASS integration.

cake init

Same thing as newproject, but for initiating a skeleton if it hasn't been automatically done via newproject.

Options

  • -b + --bootstrap Run bootstrap.py.
  • -m + --buildout Run buildout.
  • -p + --python Path to the Python interpreter you want to build/bootstrap with.

cake bake

Runs buildout, which installs dependent Python libraries into lib/dist. Currently, the base libraries it installs are webapp2, jinja2, slimmer, ProtoRPC, Babel, GaePyTZ, WTForms, and AppTrace.

cake make

Executes any AET build utilities that are enabled (CoffeeScript/UglifyJS/Compass). This updates static assets, and writes an updated assets config file (if configured).

Options

  • -w + --watch Watch resources after compilation and recompile automatically when changes are detected (where supported).
  • -js + -coffee + --coffeescript Apply this command to CoffeeScript.
  • -css + -sass + --compass Path to the Python interpreter you want to build/bootstrap with.

cake run

Runs the project on the local dev server. Output from the dev server is colorized (colors match the production AppEngine control panel). Options specify whether to also watch for changes in SASS or CoffeeScript, which are included inline with dev server logs.

Options

  • -w + --watch Watch assets and recompile when source files change. (automatically applies to installed JS/CSS utils)
  • -c + --clear Clear datastore, blobstore, and all PYC/PYO files.
  • -p + --port Port to run the application on.
  • -h + --host Host to run the application on.

cake push

Pushes the local project to AppEngine production.

Options

  • -r + --runtime Override runtime declaration in app.yaml.
  • -v + --version Override app version declaration in app.yaml.
  • -a + --app Override app ID declaration in app.yaml.
  • -s + --assets Compile static assets and push to CDN (if configured).
  • -p + --profile Follow a profile's settings ('development', 'staging' & 'production' - configurable in tools.cfg)

Clone this wiki locally