Have you ever had this moment when you wanted to write a small tool or just tryout some new algorithm but the thought of assembling proper project folderstructure spoiled the desire...

CRUTCH is a console development environment, though its definition sounds a bitweird it does allow you to create a fully customized project, manage itslifecycle, including `configure`, `build`, `test`, `clean` `add/removefiles/features/tests`, plus language specific features. Also you can extend itsfunctionality by writing a language module or a feature for already existingone.

.. contents::

Installation============

>From pip::

$ pip install crutch

Usage=====

In its simplest form you interact with CRUTCH via two commands::

$ crutch new <type> $ crutch

Those two lines create a project and `build`, `test`, `run` or whatever defaultaction is configured for this type of project... that is all you need to getthings going. The default project configuration supposed to provide you withthings necessary to just start writing stuff, but if you need more you can addfeatures to your projects.

Features(MOST OF THIS STUFF IS STILL TODO)-------------

Feature is something that extends CRUTCH capabilities and specifically addsfunctionality to your projects's runner. CRUTCH itself has only one feature,which is called `new`, that all it does: *create a new project*, and it willstay this way forever. Additional functionality will be added via languageextensions and features for them.

>From user perspective feature is an action keyword that follows `crutch`command, akin to `new`. For example compile-time projects normally will include`build` feature, most projects will include `clean` and `test` features. Nicefeatures to have are: `install`, `publish`, `debug` etc.

Feature allows for a second cli parameters parsing, thus you can invoke anaction for a feature::

$ crutch test add core/runner

This line invokes `test` feature of the current project with `add` action thatallows you to add a test file in one go(assuming you are not wearing yourssmart ass hat and not trying to modify configuration files manually). Thesymmetrical operation would be::

$ crutch test remove core/runner

This will remove the test files and do cleanup afterwards. Using `test` featureto manage test files is WAY better than doing this manually...

So, how do you add features? One way is to stay with default provided features,another is to specify a list of features with `new` action::

What if you want to add a feature after you've already created a project? Whatmight be the way? Just guess... The `feature` feature of course::

$ crutch feature add doxygen

This line adds `doxygen` based `doc` feature to the project.

The last thing... a feature has a default action, normally it is associatedwith its essence, invoking this::

$ crutch doxygen

Naturally will build documentation, and by invoking this::

$ crutch doc

You achieve the same, because `doxygen` feature belongs to `doc` featurecategory...

Feature Category----------------

Feature categories is something that is not really reflected in CLI, butnonetheless is very important concept. Every feature belongs to a category,duh... This means that at the very least you can invoke an action on a featureby providing its category name instead. This is very true for categories thatcan have only `one` active feature at a time. BUT, if category can havemultiple active features it can modify or even add new actions you can invoke::

$ crutch lint

This `lint` category has several features: `pep8`, `pylint`, `flake8` etc. Soby invoking category's default action you run all those linter features oneafter another to verify your code, alternatively you can run them separately::

$ crutch pep8 $ crutch pylint

This opens door for a very complex scenarios, like running custom test serverbench that is basically a tech-stack that needs to be managed. So you canprovide a custom category `bench` that contains multitude of optional features,like `mysql`, `maria`, `couchbase`, `apache`, etc. And this category providesfew actions like `start`, `stop`, `publish` etc that you can invoke to run allthis madness...Anyway this multi-category is a far feature, and I am writingthis here so I won't forget it later