Myning is an idle game designed to be played in your terminal. Mine for ore, battle enemies, manage your garden, upgrade your gear, and so much more!
Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Reload your environment (or just restart your terminal):
exec zsh
Add brew
to your path:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
Install pyenv and virtualenv:
brew install pyenv pyenv-virtualenv
Initialize pyenv in your shell:
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
Reload your environment (or just restart your terminal):
exec zsh
Set up the environment:
make venv
Play the game:
make play
When developing a full-screen terminal application, the python debugger will not work. Instead, use
the textual debug console by running textual console -x SYSTEM -x EVENT -x DEBUG -x INFO
in a
separate terminal and use make dev
to run the app. You can then use print
statements in the
code, and they will be displayed in the console window.
- Textual documentation (TUI framework)
- Textual devtools documentation
- Rich documentation (library for styling and displaying rich text)
Format the code:
black .
Organize imports:
isort .
Run tests:
make test
It may be helpful to visually debug TUI tests by running pytests with the --headed
option:
pytest --headed
View test coverage:
open htmlcov/index.html