jellycell.cli.app¶
Typer CLI root for jellycell.
Every command supports --json (spec §2.8 / §10.1). Human mode uses rich;
JSON mode prints a single pydantic-serialized object to stdout.
Module Contents¶
Classes¶
Global flags available to every subcommand. |
Functions¶
Resolve a notebook argument against a project root. |
|
jellycell — reproducible-analysis notebook tool. |
Data¶
API¶
- jellycell.cli.app.app¶
‘Typer(…)’
- class jellycell.cli.app.GlobalOptions¶
Global flags available to every subcommand.
- project_override: pathlib.Path | None¶
None
- jellycell.cli.app.resolve_notebook_and_project(notebook: pathlib.Path, project_override: pathlib.Path | None) tuple[pathlib.Path, jellycell.paths.Project]¶
Resolve a notebook argument against a project root.
Used by every command that takes a
<notebook>argument (run,export ipynb|md|tearsheet). Two modes:Walk-up (
project_overrideisNone): resolvenotebookagainst CWD, then walk up from it to findjellycell.toml. Matches the long-standing default behavior.Explicit (
--projectset): useproject_overrideas the root and resolvenotebookagainst it first, falling back to CWD if nothing exists at the project-relative location. Lets callers runjellycell --project showcase-foo run notebooks/01.pyfrom anywhere without needing to prefix the showcase path twice.
Returns the resolved-absolute notebook path and the loaded :class:
Project.Raises: ProjectNotFoundError: If
jellycell.tomlcannot be found.
- jellycell.cli.app.global_options(ctx: typer.Context, project: pathlib.Path | None = typer.Option(None, '--project', '-p', help='Project root. Defaults to discovery from cwd.', file_okay=False, dir_okay=True), quiet: bool = typer.Option(False, '--quiet', '-q', help='Reduce output.'), verbose: bool = typer.Option(False, '--verbose', '-V', help='Increase output.'), json_output: bool = typer.Option(False, '--json', help='Emit JSON instead of rich-formatted output.'), version: bool = typer.Option(False, '--version', callback=_version_callback, is_eager=True, help='Show version and exit.')) None¶
jellycell — reproducible-analysis notebook tool.