Usage
Nester strives to be as easy to use as possible.
To achieve this it can be used in two ways:
CLI-Mode
This is how Nester was intended to be used: As a small CLI-tool. Nester has four main functions it can perform:
create
validate
list
clean
Let us look into each of the four commands in more detail…
Nester create
- nester create(language, project_name, [-g|--git])
Creates the project structure for the given project. If you are already in a directory which matches the name of the given project, the source files will be created in your current directory. If not Nester will automatically create a directory for your project.
- Parameters:
language (str) – The shortform of a supported programming language. Refer to the :doc: list of supported languages <supported_languages>.
project_name (str) – The name of the project package that will be created.
-g|--git (flag) – An optional flag to initialize a Git repository in the project directory. If specified, a Git repository will be created simultaneously with the project structure.
--no-log (flag) – An optional flag to disable project logging for the current project.
- Returns:
None
- Return type:
None
Nester validate
- nester validate(language, project_name)
Validates the file structure of the given project against our JSON schmemas. Files you created, which are therefore not part of our schema, or such which have been created by other utilites (e.g. git init) will be ignored.
- Parameters:
language (str) – The shortform of a supported programming language. Refer to the :doc: list of supported languages <supported_languages>.
project_name (str) – The name of the project or package you want to validate
- Returns:
Tells you via Terminal wether your structure lines up or not.
- Return type:
str
Nester log
- nester log()
Lists all previously created projects, which had logging enabled, in a table.
- Parameters:
--clean (flag) – An optional flag to clean up orphaned log entries.
- Returns:
None
- Return type:
None
Nester clean
- nester clean(project_name, [-y|--yes])
Deletes the entire content of the given project directory.
This action cannot be undone.
- Parameters:
project_name (str) – The name of the project you want to delete.
-y|--yes (flag) – An optional flag to auto-confirm your decision and skip the “Are you sure?” dialogue.
- Returns:
None
- Return type:
None
Interactive Mode
Calling Nester in the Terminal without providing any additional arguments launches interactive mode.
Here you can choose the operation to perform and are guided through the process for each of them.