showyourwork.cli.main.echo(text='', **kwargs)#

Print a message to the terminal with some custom formatting.

Breaks long lines using TextWrapper and adds custom colors and indentation to code snippets and environment variables.

This may just be the ugliest function I’ve ever written in my life.

  • text (str) – The text to print.

  • kwargs – Additional keyword arguments to pass to click.echo.


Ensures we’re running commands in the top level of a git repo.


exceptions.ShowyourworkException – If not in the top level of a git repo.

showyourwork.cli.main.validate_slug(context, param, slug)#

Checks whether the repo slug was provided correctly.