Developer Tools
Last updated
Last updated
Cement ships with a CLI utility that includes tools and helpers for application developement. It is in-itself an application Built on Cement™, and can serve as a working example of some of the key features of the framework.
Install additional dependencies:
See:
$ cement --help
The Cement CLI uses the builtin in order to easily create new projects, extensions, plugins, or scripts.
See:
$ cement generate --help
Using the Cement Developer Tools CLI, you can quickly generate a new project:
Note: Press <ENTER>
in order to take the default values for myapp
:
We have just generated a new project in the directory ./myapp
. The included README.md
includes general information that is built-in to your new project out-of-the box including how to setup a development environment, run tests, push packages to PyPi, and deploy via Docker.
Add the following to ~/.cement.yml
:
Then clone an existing template:
Your template is now part of Cement! Customize it to your liking, and use it in the same way as the builtin templates:
The reads templates from any template directory paths, therefore adding your own templates to Cement is as simple as adding a template directory to Cement's configuration file, cloning a builtin template, and then generating from your own templates using the same utility.