Adding extra cli arguments to jupyter lab?


I’m working on a project that implements a Jupyter contents manager. Is it possible to add custom CLI arguments and have the contents manager use them?

I’m imagining something like this:

jupyter lab --custom-param value

I’ve been looking at the source code and it seems that CLI arguments are defined at the application level, so I’m wondering whether I have to subclass LabApp. That seems too much for my use case so I’m considering other options:

  • Have the contents manager read from a file (e.g., config.yaml)
  • Use environment variables

What would be the best way to achieve this? Any feedback appreciated!