Spaces versus tabs and shiftwidth

I’d like to change the default behavior of the “generate” script to use
four spaces instead of two for its shiftwidth when generating new
models/controllers/etc. Where can I do this?