Skip to content

Add a minimal CLI for memori: init, --version, and health commands #132

@ritoban23

Description

@ritoban23

Add a minimal CLI: memori init, memori --version, and memori health

Summary

Propose adding a simple command-line interface for the memori package to improve onboarding, environment validation, and usability.

Motivation

  • A CLI makes it easier for users to get started, check their setup, and validate their environment.
  • The project already hints at CLI support in pyproject.toml.
  • Common commands like init and health are standard in modern Python packages and help users quickly bootstrap and debug.

Proposed commands

  • memori --version: Prints the package version.
  • memori init: Creates a starter memori.json config in the current directory (does not overwrite unless --force is used).
  • memori health: Checks config validity, module imports, and (optionally) database connectivity, printing a short report and returning a non-zero exit code on failure.

Implementation plan

  • Add memori/cli.py using only the Python standard library (argparse, json, etc.).
  • Register the CLI in pyproject.toml as a console script: memori = "memori.cli:main".
  • Add basic tests for CLI commands.
  • Update documentation with a short CLI usage section.
  • CLI is available after install.
  • Each command works as described and is covered by tests.
  • Documentation includes CLI usage examples.

Please let me know if you support adding this CLI, or if you have suggestions for additional commands or changes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions