The Commands module

The commands module abstracts all functionality around the call of the utils functions.

This way they can be used as simple function calls by both the CLI and Terminal User Interface (TUI).

This module provides an abstraction of the functionality previously found in the cli module.

Implemented here are commonly used functions for Nester used in its frontend both cli as well as TUI.

nester.core.commands.clean_project(project_name: str) None

Delete project when it is found in the log.

Parameters:

project_name – Name of the project to be removed.

nester.core.commands.create_project(language: str, project_name: str, git: bool, no_log: bool) None

Create a new project.

Parameters:
  • language – The language the project needs the structure of.

  • project_name – The name of the project.

  • git – Whether or not to create a git repository.

  • no_log – Whether or not to disable logging for this project.

nester.core.commands.print_log(clean_log: bool) None

Print nester log to console.

Parameters:

clean_log – Whether or not to sanitize the log and remove orphaned entries.

nester.core.commands.rename_project(old_project_name: str, new_project_name: str) None

Rename a given project.

The project will be searched in the log and the log entry will get changed.

Parameters:
  • old_project_name – The project to rename.

  • new_project_name – The new name for the given project.

nester.core.commands.validate_project(language: str, project_name: str) None

Validate the project against a given languages’s structure.

Parameters:
  • language – The language to validate against

  • project_name – The name of the project to validate.