jellycell.cli.commands.checkpoint

jellycell checkpoint — reproducible project snapshots.

Bundles a self-contained .tar.gz of the project (notebooks, data, artifacts, reports, manuscripts, jellycell.toml, and the content-addressed cache) so a reviewer can unpack it and see the last-run outputs without re-executing anything. Restores land in a new sibling directory by default to avoid any chance of clobbering in-flight work.

Scope carefully chosen:

  • Whitelist which directories go in. Anything else (virtualenvs, pip caches, .git, editor scratch) is never archived.

  • Include .jellycell/cache/ so artifacts can be rebuilt locally from cache hits even without re-running the notebook.

  • Skip a small hardcoded set of junk dirs that always appear (__pycache__, .ruff_cache, .mypy_cache, etc.).

  • No gitignore handling for v1 — use jellycell cache clear first if you want lean checkpoints.

Module Contents

Classes

CheckpointSummary

Metadata embedded in the tarball as checkpoint.json.

CheckpointCreateReport

JSON schema for jellycell checkpoint create --json. §10.1 contract.

CheckpointListEntry

One row in checkpoint list.

CheckpointListReport

JSON schema for jellycell checkpoint list --json. §10.1 contract.

CheckpointRestoreReport

JSON schema for jellycell checkpoint restore --json. §10.1 contract.

Functions

checkpoint_create

Write .jellycell/checkpoints/<name>.tar.gz.

checkpoint_list

Show all checkpoints under .jellycell/checkpoints/.

checkpoint_restore

Extract .jellycell/checkpoints/<name>.tar.gz to a target dir.

Data

API

jellycell.cli.commands.checkpoint.checkpoint_app

‘Typer(…)’

class jellycell.cli.commands.checkpoint.CheckpointSummary(/, **data: Any)

Bases: pydantic.BaseModel

Metadata embedded in the tarball as checkpoint.json.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

schema_version: int

1

created_at: str

None

project_name: str

None

message: str | None

None

files: int

None

size_bytes: int

None

class jellycell.cli.commands.checkpoint.CheckpointCreateReport(/, **data: Any)

Bases: pydantic.BaseModel

JSON schema for jellycell checkpoint create --json. §10.1 contract.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

schema_version: int

1

project: str

None

path: str

None

files: int

None

size_bytes: int

None

message: str | None

None

class jellycell.cli.commands.checkpoint.CheckpointListEntry(/, **data: Any)

Bases: pydantic.BaseModel

One row in checkpoint list.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

name: str

None

path: str

None

created_at: str

None

message: str | None

None

size_bytes: int

None

class jellycell.cli.commands.checkpoint.CheckpointListReport(/, **data: Any)

Bases: pydantic.BaseModel

JSON schema for jellycell checkpoint list --json. §10.1 contract.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

schema_version: int

1

project: str

None

checkpoints: list[jellycell.cli.commands.checkpoint.CheckpointListEntry]

‘Field(…)’

class jellycell.cli.commands.checkpoint.CheckpointRestoreReport(/, **data: Any)

Bases: pydantic.BaseModel

JSON schema for jellycell checkpoint restore --json. §10.1 contract.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

schema_version: int

1

project: str

None

source: str

None

target: str

None

jellycell.cli.commands.checkpoint.checkpoint_create(ctx: typer.Context, project: pathlib.Path | None = typer.Argument(None, help='Project root.'), message: str | None = typer.Option(None, '--message', '-m', help='Short label for this checkpoint.'), name: str | None = typer.Option(None, '--name', help='Override the auto-generated checkpoint name.')) None

Write .jellycell/checkpoints/<name>.tar.gz.

jellycell.cli.commands.checkpoint.checkpoint_list(ctx: typer.Context, project: pathlib.Path | None = typer.Argument(None, help='Project root.')) None

Show all checkpoints under .jellycell/checkpoints/.

jellycell.cli.commands.checkpoint.checkpoint_restore(ctx: typer.Context, name: str = typer.Argument(..., help='Checkpoint name (without .tar.gz).'), project: pathlib.Path | None = typer.Option(None, '--project', help='Project root the checkpoint belongs to.'), into: pathlib.Path | None = typer.Option(None, '--into', help='Target directory. Defaults to <project>-restored-<name>/ as a sibling.'), force: bool = typer.Option(False, '--force', help='Allow extraction into an existing, non-empty directory (merges / overwrites).')) None

Extract .jellycell/checkpoints/<name>.tar.gz to a target dir.