A sample CLI tool made in V that prints geometric shapes to the screen.
👉 Accompanying blog posts:
This project is meant to be a demonstration showcasing how easy it is to make a good CLI application with V. There is also an example to how to effectively structure a V project with modules and conduct unit tests.
Make sure to do
v up to download and update to the latest version of V.
You can use
v run . [OPTIONS] to run the tool while
developing it. If you want a production build, you can use
v -prod ., which will generate a binary file
geo.exe on Windows) at the root of the repository.
To get started, try
./geo --help. It will print the
following usage guide:
geo 0.2.x ----------------------------------------------- Usage: geo [options] [ARGS] Description: A sample CLI app for printing geometric shapes to the terminal. Options: -p, --shape <string> The shape to use for the geometry. Allowed shapes are: left-triangle, right-triangle, pyramid, square, diamond -z, --size <int> The size parameter for the shapes. -m, --symbol <string> The symbol to use for the geometry. -h, --help display this help and exit --version output version information and exit
Run Unit Tests
To run units tests, run this command at the root of this repository:
v test .
This work is licensed under the MIT license, see LICENSE for more details.
This project is hosted on GitHub: hungrybluedev/geo
As a backup, this repository is also available on Codeberg: hungrybluedev/geo