1.2 KiB
1.2 KiB
Development
Prerequisites
- Python 3.10+
Setup
All commands below should be run from the python/ directory:
cd python
Install local (editable) + run
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
# Install in editable mode
pip install -e .
# Run
mem0 --help
mem0 version
After moving to the new directory structure: If you previously had the CLI installed from the old repo root, you need to re-run
pip install -e .from inside thepython/directory to pick up the new location.
Run without installing globally
This still installs the package into your active virtualenv (editable), but you can invoke it via module execution:
source .venv/bin/activate
pip install -e .
python -m mem0_cli --help
Optional extras
OSS integration extras
pip install -e ".[oss]"
Dev tools (tests/lint)
pip install -e ".[dev]"
Run tests
pip install -e ".[dev]"
# Run all tests
pytest
# Run a specific test file
pytest tests/test_cli_integration.py
# Run a single test
pytest -k test_help
Lint
ruff check .
ruff format .