Add `hf papers ls` CLI command (#3723)
* Add `hf papers ls` CLI command
Implement a new papers command for the CLI with options:
- --sort: Sort by 'publishedAt' or 'trending'
- --date: Filter by date (YYYY-MM-DD format or 'today')
- --limit: Number of results (default 50)
- --token: Authentication token
Also add recursive datetime serialization to handle nested
datetime objects in PaperInfo dataclass.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Rename repo_info_to_dict to dataclass_to_json_serializable_dict
The new name better reflects the function's purpose since it now
handles PaperInfo in addition to repo info types.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add hf papers ls documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix import sorting (ruff)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Apply formatting and update CLI reference
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Empty commit for testing
Co-Authored-By: OpenAI Codex <codex@users.noreply.github.com>
* Empty commit for testing
Co-Authored-By: Cursor Agent <cursoragent@users.noreply.github.com>
* Remove redundant token in papers CLI
Co-authored-by: julien <julien@huggingface.co>
* Rename dataclass_to_json_serializable_dict to api_object_to_dict
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Apply suggestion from @hanouticelina
Co-authored-by: célina <hanouticelina@gmail.com>
* Add DailyPapersSort_T type alias and use get_args in papers CLI
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update CLI reference docs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: OpenAI Codex <codex@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: célina <hanouticelina@gmail.com>