CLI Introduction (0003-cli-intro)
Context
We need a small, future-proof command-line tool to create and inspect
ReMarkable .rm files as the project evolves towards full notebook
read/write support. Users reported difficulty discovering the CLI binary
after activating the project virtualenv.
Decision
Introduce a minimal CLI with two subcommands:
new: create a simple notebook with a triangle on a single layer and write it to a.rmfile.inspect: print basic file info and, ifrmsceneis available, block-type counts.
Expose the CLI in two ways:
Console script via
setup.pyentry point:rmfiles=rmfiles.cli:main(preferred)Module execution fallback:
python -m rmfiles(works even without installing console scripts when run from repo root)
Consequences
Users can immediately run
python -m rmfiles --helpwithin the repo.Installing the package in editable mode (
pip install -e .) provides thermfilesbinary on$PATH.Documented troubleshooting: ensure venv’s
binis first on$PATH, thenhash -ror open a new shell to refresh hashed commands.