b-long / moosecli

A project template for CLI building.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

moosecli

A project template & place to experiment with CLI building.

Install and run using Poetry

Install the application using Poetry:

poetry install

Run the application:

poetry run python -m moosecli

Run the tests:

# Run tests with unittest
poetry run python -m unittest tests/*.py
# Run tests with unittest (verbose)
poetry run python -m unittest -v tests/*.py

Use as a PEX file

A pex file can be built using the included shell script:

./build-pex.sh

The file produced should be fairly small:

cd dist/
du -sh portable_cli 
# 724K    portable_cli

Interaction

Once built, copy the file from dist/portable_cli to a computer with Python 3.8+ .

Building binaries

To build a binary, run:

brew install bazel
poetry run nox -e oxidize

Based on:

About

A project template for CLI building.


Languages

Language:Python 73.7%Language:Starlark 21.3%Language:Shell 4.9%