Metadata-Version: 2.4
Name: nber-cli
Version: 0.2.0
Summary: A command line interface for reaching the National Bureau of Economic Research (NBER) paper without brower.
Project-URL: Homepage, https://github.com/sepinetam/nber-cli
Project-URL: Repository, https://github.com/sepinetam/nber-cli
Project-URL: Issues, https://github.com/sepinetam/nber-cli/issues
Project-URL: Documentation, https://sepinetam.github.io/nber-cli/
Author-email: Song Tan <sepinetam@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: cli,mcp,nber,research,working-papers
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: aiohttp
Requires-Dist: aiohttp-retry
Requires-Dist: certifi
Requires-Dist: fake-useragent
Requires-Dist: mcp>=1.27.1
Description-Content-Type: text/markdown

# NBER-CLI
A command line interface for reaching the National Bureau of Economic Research (NBER) paper without brower.

[![Pytest](https://github.com/sepinetam/nber-cli/actions/workflows/pytest.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/pytest.yml)
[![Lint](https://github.com/sepinetam/nber-cli/actions/workflows/lint.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/lint.yml)
[![Docs](https://github.com/sepinetam/nber-cli/actions/workflows/docs.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/docs.yml)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

[简体中文](README.zh-CN.md) | [Documentation](docs/en/index.md)

> **NBER** is a registered trademark of the [National Bureau of Economic Research](https://www.nber.org). This project is an independent open-source tool and is **not affiliated with, endorsed by, or sponsored by** the National Bureau of Economic Research. By using this project, you agree to the [Usage Policy](docs/en/policy.md).

## Features

- Search NBER working papers by title, paper number, author, abstract, or keyword.
- Fetch structured metadata and abstracts for a paper ID such as `w25000`.
- Download single papers or batches as PDF files.
- Expose the same core workflows as MCP tools for AI agents.
- Return human-readable output by default, with JSON output for automation.

## Quick Start

### Use in Agents

NBER-CLI can be used by agents through plugins, the MCP server, and the skill. Claude Code and Codex should install the NBER-CLI plugin first; OpenClaw and other agents should use the MCP server plus the skill.

If you want an agent to install and check NBER-CLI automatically, send it this prompt:

```text
Install NBER-CLI globally for yourself from https://github.com/sepinetam/nber-cli, and check the status.
```

After installation, verify it with either prompt:

```text
I remember that in 2025, Anton had a paper on NBER about Agent for Econ. Download it to the current directory.
```

```text
I remember that paper w25000 was interesting. Show me its abstract.
```

If you are an agent, visit the [Agent Guides](docs/en/agents/index.md).

### CLI Mode
Run commands directly with `uvx`:

```bash
uvx nber-cli search "Labor Economic"
uvx nber-cli info w25000
uvx nber-cli download w34567
```

Or install the command first:

```bash
uv tool install nber-cli
nber-cli search "Labor Economic"
nber-cli info w25000
nber-cli download w34567
```

### MCP Server Mode

NBER-CLI can run as a stdio MCP server:

```bash
uvx nber-cli mcp-server
```

Example MCP client configuration:

```json
{
  "mcpServers": {
    "nber-cli-mcp": {
      "command": "uvx",
      "args": ["nber-cli", "mcp-server"]
    }
  }
}
```

The MCP server exposes tools for paper lookup, search, and PDF download.

## Documentation

More usage details, command references, MCP setup, Python API examples, development notes, and release history are available in the [documentation](docs/en/index.md).

## Development

```bash
uv sync --dev --group docs
uv run pytest
uv run ruff check .
uv run --group docs mkdocs serve
```

## License

NBER-CLI is released under the [Apache-2.0 License](LICENSE).
