This is a modern template for a python project with the pyproject.toml with some fields to change based on project. It also has tox configured, docs dir for github pages, .github dir with tox-gh-actions configured and more.
Make sure uv is installed. Here is the install script on macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh- clone the repo and cd into it.
$ git clone <repo_url>
$ cd os_assistant- run
uv syncto install all dependencies in a virtual environment. Note that this step is not necessary as uv automatically runs it before running any script withuv run.
$ uv sync- Make sure that pre-commit hooks are installed.
$ uv run pre-commit install-
Create a
.envfile with necessary variables. You can either copy the example file or create it manually.On Linux/macOS:
cp .env.example .env
On Windows (CMD):
copy .env.example .env -
Edit
.envand replace the value ofMODEL_BASE_URLwith your personal ngrok link, e.g.:MODEL_BASE_URL=https://your-ngrok-link.ngrok-free.app -
Run the environment setup and model pulling script:
Either On Linux/macOS or Windows:
make setup_and_pull
These scripts:
- Load variables from your
.envfile. - Set the
OLLAMA_HOSTenvironment variable usingMODEL_BASE_URL. - Pull required models using
ollama pull.
We primarily use make as a command runner (bad practices ik). Have a look at the makefile for all available commands.
The osassis command line tool provides the following features:
Open an interactive chat session with the OS assistant:
$ make run
# or activate venv first then run
$ osassis chat # inside venvStart tracing file system events in a directory:
$ osassis trace start file_system --dir path/to/watchView trace logs with time filtering:
$ osassis trace show file_system --start "yesterday" --end "now"Clear trace logs for a domain:
$ osassis trace clear file_system $ make streamlit_runtox creates virtual environments and runs all of pytest, ruff, and mypy.
$ make tox