citeformer.cli.app¶
Typer entry point for the citeformer command.
Exposes four subcommands that map directly to the library’s public surface:
version— print the installed version.styles— list the bundled CSL styles.render— render a CSL-JSON item file into a bibliography entry in the requested style.fetch— resolve a DOI, arXiv id, or URL to CSL-JSON on stdout.
The generate / verify subcommands would require loading a model and
are intentionally omitted from the CLI — at model sizes where generation is
useful, command-line invocation is awkward. Use the Python API for that.
Module Contents¶
Functions¶
Data¶
API¶
- citeformer.cli.app.app¶
‘Typer(…)’
- citeformer.cli.app.styles() None¶
List the bundled citation styles.
Any name listed here (or its documented aliases — see
citeformer.render.formatters._REGISTRY) can be passed as thestyle=argument toCiteformer()orrender_references().
````{py:function} render(csl_json: typing.Annotated[pathlib.Path, typer.Argument(help=’Path to a CSL-JSON file — either a single item or a JSON array.’, exists=True, file_okay=True, dir_okay=False, readable=True)], style: typing.Annotated[str, typer.Option(’–style’, ‘-s’, help=’Bundled style name (run citeformer styles).’)] = ‘apa-7’) -> None
- canonical:
citeformer.cli.app.render
Render CSL-JSON items as bibliography entries in the chosen style.
Useful as a sanity check before feeding sources to the model — preview what each reference will look like in the final output.
````{py:function} fetch(identifier: typing.Annotated[str, typer.Argument(help='DOI (10.xxx/yyy), arXiv id (2305.14627), URL, or PDF path.')], output: typing.Annotated[pathlib.Path | None, typer.Option('--output', '-o', help='Write CSL-JSON to this file instead of stdout.', dir_okay=False, writable=True)] = None, include_content: typing.Annotated[bool, typer.Option('--include-content/--metadata-only', help='For URL / PDF inputs, include the extracted body text under `content`.')] = False) -> None
:canonical: citeformer.cli.app.fetch
```{autodoc2-docstring} citeformer.cli.app.fetch
```