Skip to content

Conversation

@lrsierra
Copy link

@lrsierra lrsierra commented Nov 3, 2025

Summary

Make python -m jarviscli work out of the box by adding a proper package entrypoint. Also add a small bootstrap test to guard this behavior going forward.

What Changed

  • Added jarviscli/__main__.py so python -m jarviscli starts Jarvis by calling Jarvis().start() and then entering the command loop.
  • Added tests: jarviscli/tests/test_bootstrap_entrypoint.py verifies the module exposes a main() and that calling it triggers Jarvis.start() (mocked).

No functional changes to plugins; this only addresses startup/bootstrapping.

Why

On a fresh clone, python -m jarviscli fails because the package has no __main__.py. Providing a standard entrypoint matches the README’s “Run Jarvis from anywhere,” reduces confusion for new contributors, and aligns with Python packaging conventions.

How to Test

From repo root:

# fresh venv (optional but recommended)
python3 -m venv .venv && source .venv/bin/activate
python installer

# ensure the repo is importable during dev
export PYTHONPATH="$PWD/jarviscli:$PWD:$PYTHONPATH"

# 1) Verify module entrypoint launches the app
python -m jarviscli   # should show the interactive prompt (type 'help' to confirm)

# 2) Run the new bootstrap test
python -m unittest jarviscli.tests.test_bootstrap_entrypoint -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant