Getting Started¶
This guide helps you choose the right NBER-CLI interface and complete a first task. Researchers should start with Desktop. CLI and MCP are primarily intended for AI agents, scripts, and integrations.
Recommended Desktop Path¶
- Download the package for your operating system and CPU from the official GitHub Release.
- Verify that the file came from
SepineTam/NBER-CLI. Current installers may be unsigned; read the Desktop installation warning before overriding an operating-system prompt. - Install and open NBER-CLI Desktop. No Python or uv installation is required.
- Select 同步最新论文 (Refresh) to synchronize the working-paper Feed and prepare local paper details.
- Select a paper to read its abstract, manage tags or read state, copy a citation, or open the source page.
For the complete task-by-task workflow, see the User Manual. The remaining sections describe the AI-facing CLI and optional integration server.
CLI and Integration Requirements¶
- Python 3.11 or newer.
- Network access to
https://www.nber.org. uv,pipx, orpipfor installation.
These requirements do not apply to Desktop. For an AI agent or integration, the fastest path is uvx, which runs the package in an isolated environment without a permanent install.
Run with uvx¶
uvx nber-cli --version
uvx nber-cli search "Labor Economic"
uvx nber-cli info w25000
uvx nber-cli download w34567
If the command is not found or fails, run uvx nber-cli -v to check the current version. If it is not the latest version, update the cache with:
Install as a Tool¶
Use uv tool install when you want the nber-cli command available on your shell path:
You can also install with pipx:
Run the Optional Local HTTP Server¶
FastAPI, Uvicorn, and Alembic are kept out of the normal CLI dependency set. Use the server extra only when another local integration needs the optional API; Desktop does not use it:
The server binds to loopback by default, upgrades the local database to schema v3, and serves endpoints under /api/v1.
Run as a Python Module¶
The package also exposes a module entry point. This is useful when the nber-cli console script is not on your PATH (for example, when running from a checked-out working tree or inside a virtual environment where the wrapper was not generated):
python -m nber_cli --version
python -m nber_cli search "labor economics"
python -m nber_cli info w25000
python -m nber_cli is functionally identical to the nber-cli command — same arguments, same exit codes, same stdout/stderr contracts. From a working tree you can also run it through uv:
First Search¶
Search accepts title text, author names, abstracts, keywords, and paper numbers. The default result page contains 20 papers.
Add a date range and result size:
Return JSON for scripts:
Read Paper Details¶
Paper IDs can be passed with or without the w prefix:
Use --all to include related fields and published-version information when NBER exposes them:
Follow New Papers with the Feed Cache¶
Initialize the local database:
The database is a local SQLite file, managed through SQLModel/SQLAlchemy. By default it is stored at ~/.nber-cli/nber.db; advanced users can choose another path or a sqlite:///... URL with nber-cli db init --db-path ....
Fetch the NBER new working papers RSS feed:
The first fetch stores the current RSS items in the cache and displays them as new. Later fetches show only items that were not already cached.
Limit output while showing the latest fetched items:
Clean old cache records:
feed clean asks for confirmation before deleting cached records.
Download a PDF¶
Download into the current directory:
Save into a directory:
Save to an explicit file path:
Batch Download¶
Batch mode supports --save-base; it does not support --file.
Next Steps¶
- Follow the User Manual or review the detailed Desktop App guide.
- Configure an AI agent with the Agent Guides.
- Integrate with the Local HTTP API.
- Read the CLI Reference for all commands and options.
- Configure the MCP Server for agent workflows.
- Use the Python API in your own async code.