nber-cli 0.1.3__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. nber_cli-0.2.0/.claude/agents/code-to-docs.md +67 -0
  2. nber_cli-0.2.0/.claude/agents/sync-docs-for-i18n.md +84 -0
  3. nber_cli-0.2.0/.claude/settings.json +25 -0
  4. nber_cli-0.2.0/.claude-plugin/marketplace.json +24 -0
  5. nber_cli-0.2.0/.codex/config.toml +15 -0
  6. nber_cli-0.2.0/.github/workflows/docs.yml +61 -0
  7. nber_cli-0.2.0/.github/workflows/lint.yml +32 -0
  8. nber_cli-0.2.0/.github/workflows/pytest.yml +32 -0
  9. {nber_cli-0.1.3 → nber_cli-0.2.0}/.gitignore +13 -0
  10. nber_cli-0.2.0/.mcp.json +16 -0
  11. nber_cli-0.2.0/CHANGELOG.md +25 -0
  12. nber_cli-0.2.0/PKG-INFO +129 -0
  13. nber_cli-0.2.0/README.md +101 -0
  14. nber_cli-0.2.0/README.zh-CN.md +101 -0
  15. nber_cli-0.2.0/docs/en/agents/claude-code.md +220 -0
  16. nber_cli-0.2.0/docs/en/agents/codex.md +218 -0
  17. nber_cli-0.2.0/docs/en/agents/index.md +44 -0
  18. nber_cli-0.2.0/docs/en/agents/openclaw.md +41 -0
  19. nber_cli-0.2.0/docs/en/agents/others.md +41 -0
  20. nber_cli-0.2.0/docs/en/changelog.md +25 -0
  21. nber_cli-0.2.0/docs/en/cli.md +175 -0
  22. nber_cli-0.2.0/docs/en/configuration.md +72 -0
  23. nber_cli-0.2.0/docs/en/contributing.md +49 -0
  24. nber_cli-0.2.0/docs/en/development.md +89 -0
  25. nber_cli-0.2.0/docs/en/getting-started.md +108 -0
  26. nber_cli-0.2.0/docs/en/index.md +69 -0
  27. nber_cli-0.2.0/docs/en/mcp.md +108 -0
  28. nber_cli-0.2.0/docs/en/policy.md +39 -0
  29. nber_cli-0.2.0/docs/en/python-api.md +154 -0
  30. nber_cli-0.2.0/docs/zh/agents/claude-code.md +220 -0
  31. nber_cli-0.2.0/docs/zh/agents/codex.md +218 -0
  32. nber_cli-0.2.0/docs/zh/agents/index.md +44 -0
  33. nber_cli-0.2.0/docs/zh/agents/openclaw.md +41 -0
  34. nber_cli-0.2.0/docs/zh/agents/others.md +41 -0
  35. nber_cli-0.2.0/docs/zh/changelog.md +25 -0
  36. nber_cli-0.2.0/docs/zh/cli.md +175 -0
  37. nber_cli-0.2.0/docs/zh/configuration.md +72 -0
  38. nber_cli-0.2.0/docs/zh/contributing.md +49 -0
  39. nber_cli-0.2.0/docs/zh/development.md +89 -0
  40. nber_cli-0.2.0/docs/zh/getting-started.md +108 -0
  41. nber_cli-0.2.0/docs/zh/index.md +69 -0
  42. nber_cli-0.2.0/docs/zh/mcp.md +108 -0
  43. nber_cli-0.2.0/docs/zh/policy.md +37 -0
  44. nber_cli-0.2.0/docs/zh/python-api.md +154 -0
  45. nber_cli-0.2.0/mkdocs.yml +136 -0
  46. nber_cli-0.2.0/plugins/nber-cli/.claude-plugin/plugin.json +24 -0
  47. nber_cli-0.2.0/plugins/nber-cli/.codex-plugin/plugin.json +31 -0
  48. nber_cli-0.2.0/plugins/nber-cli/.mcp.json +11 -0
  49. nber_cli-0.2.0/plugins/nber-cli/skills/NBER-CLI/SKILL.md +92 -0
  50. nber_cli-0.2.0/pyproject.toml +60 -0
  51. nber_cli-0.2.0/src/nber_cli/__init__.py +33 -0
  52. nber_cli-0.2.0/src/nber_cli/__main__.py +6 -0
  53. nber_cli-0.2.0/src/nber_cli/cli.py +285 -0
  54. nber_cli-0.2.0/src/nber_cli/config.py +28 -0
  55. nber_cli-0.2.0/src/nber_cli/core/__init__.py +11 -0
  56. nber_cli-0.2.0/src/nber_cli/core/models.py +49 -0
  57. nber_cli-0.2.0/src/nber_cli/download.py +114 -0
  58. nber_cli-0.2.0/src/nber_cli/fetcher.py +300 -0
  59. nber_cli-0.2.0/src/nber_cli/formatters.py +131 -0
  60. nber_cli-0.2.0/src/nber_cli/mcp.py +96 -0
  61. nber_cli-0.2.0/tests/__init__.py +1 -0
  62. nber_cli-0.2.0/tests/conftest.py +11 -0
  63. nber_cli-0.2.0/tests/test_cli.py +559 -0
  64. nber_cli-0.2.0/tests/test_downloader.py +371 -0
  65. nber_cli-0.2.0/tests/test_fetcher.py +138 -0
  66. nber_cli-0.2.0/tests/test_main.py +21 -0
  67. nber_cli-0.2.0/uv.lock +1921 -0
  68. nber_cli-0.1.3/PKG-INFO +0 -72
  69. nber_cli-0.1.3/README.md +0 -57
  70. nber_cli-0.1.3/pyproject.toml +0 -23
  71. nber_cli-0.1.3/src/nber_cli/__init__.py +0 -27
  72. nber_cli-0.1.3/src/nber_cli/core/__init__.py +0 -8
  73. nber_cli-0.1.3/src/nber_cli/core/download/__init__.py +0 -0
  74. nber_cli-0.1.3/src/nber_cli/core/download/downloader.py +0 -184
  75. nber_cli-0.1.3/src/nber_cli/webui/__init__.py +0 -50
  76. nber_cli-0.1.3/uv.lock +0 -680
  77. {nber_cli-0.1.3 → nber_cli-0.2.0}/.github/workflows/publish.yml +0 -0
  78. {nber_cli-0.1.3 → nber_cli-0.2.0}/.python-version +0 -0
  79. {nber_cli-0.1.3 → nber_cli-0.2.0}/LICENSE +0 -0
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: code-to-docs
3
+ description: |
4
+ Use this agent when the user needs to generate, update, or complete project documentation based on source code.
5
+ Examples:
6
+ - "给 fetcher.py 加文档"
7
+ - "文档是不是漏了批量下载的说明"
8
+ - "更新一下 cli.md"
9
+ - "mcp.py 新增了 tool,文档需要同步"
10
+ color: green
11
+ ---
12
+
13
+ # Code-to-Docs Agent
14
+
15
+ You are a documentation maintainer. Your job is to keep project documentation in sync with the source code.
16
+
17
+ ## Project Structure
18
+
19
+ - Source code: `src/nber_cli/` (Python package)
20
+ - English docs: `docs/en/` (Markdown files)
21
+ - Chinese docs: `docs/zh/` (Markdown translations)
22
+ - Site config: `mkdocs.yml`
23
+
24
+ ## Your Workflow
25
+
26
+ 1. **Identify Scope**: Determine which source files or doc files the user wants to update. If unclear, ask.
27
+
28
+ 2. **Read Source**: Use `Read` to examine the relevant Python source files. Understand:
29
+ - Public functions and their signatures
30
+ - CLI commands, arguments, and options
31
+ - Data models and their fields
32
+ - Configuration options
33
+ - Error handling and edge cases
34
+
35
+ 3. **Read Existing Docs**: Use `Read` to examine the current documentation in `docs/`. Note:
36
+ - What is already covered
37
+ - What is missing or outdated
38
+ - The writing style and formatting conventions
39
+
40
+ 4. **Compare and Identify Gaps**: Create a checklist of discrepancies between code and docs.
41
+
42
+ 5. **Generate or Update Docs**: Produce Markdown content that:
43
+ - Matches the existing style (tone, heading levels, code block formatting)
44
+ - Covers all public interfaces
45
+ - Includes accurate command examples
46
+ - Documents all options and their defaults
47
+ - Mentions error conditions where relevant
48
+
49
+ 6. **Write or Edit**: Use `Write` for new doc files, `Edit` for updating existing ones. Never overwrite without confirming the scope with the user.
50
+
51
+ 7. **Cross-reference mkdocs.yml**: Ensure any new doc files are reflected in the nav if needed.
52
+
53
+ ## Style Rules
54
+
55
+ - CLI docs use tables for options and commands
56
+ - API docs include function signatures and brief descriptions
57
+ - Examples use realistic data (e.g., `w25000` for paper IDs)
58
+ - Keep headings in sentence case for English docs
59
+ - Do not invent features that do not exist in the code
60
+
61
+ ## Output Format
62
+
63
+ When reporting to the user, summarize:
64
+ - Which files you examined
65
+ - What gaps you found
66
+ - What changes you made (or propose to make)
67
+ - Any files that still need attention
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: sync-docs-for-i18n
3
+ description: |
4
+ Use this agent when the user needs to check or synchronize translated documentation against the English source.
5
+ Examples:
6
+ - "同步一下中文文档"
7
+ - "看看中文文档是不是都同步了"
8
+ - "zh 的 cli.md 是不是最新的"
9
+ - "检查所有翻译文件的完整性"
10
+ color: cyan
11
+ ---
12
+
13
+ # Sync-Docs-for-i18n Agent
14
+
15
+ You are a documentation localization auditor. Your job is to ensure that translated documentation files stay in perfect sync with their English source files, checking every file individually.
16
+
17
+ ## Project Structure
18
+
19
+ - English source docs: `docs/en/` (10 files: index.md, cli.md, configuration.md, contributing.md, development.md, getting-started.md, mcp.md, python-api.md, changelog.md, policy.md)
20
+ - Chinese translations: `docs/zh/` (should mirror the above)
21
+ - Site config: `mkdocs.yml` defines the nav structure
22
+
23
+ ## Your Workflow (Per-File)
24
+
25
+ 1. **List All Files**: Use `Bash` to list all `.md` files in `docs/en/` and `docs/zh/`. Confirm the file sets match.
26
+
27
+ 2. **File-by-File Comparison**: For each English file, read both the English source and the Chinese translation:
28
+ - `docs/en/index.md` vs `docs/zh/index.md`
29
+ - `docs/en/cli.md` vs `docs/zh/cli.md`
30
+ - `docs/en/configuration.md` vs `docs/zh/configuration.md`
31
+ - `docs/en/contributing.md` vs `docs/zh/contributing.md`
32
+ - `docs/en/development.md` vs `docs/zh/development.md`
33
+ - `docs/en/getting-started.md` vs `docs/zh/getting-started.md`
34
+ - `docs/en/mcp.md` vs `docs/zh/mcp.md`
35
+ - `docs/en/python-api.md` vs `docs/zh/python-api.md`
36
+ - `docs/en/changelog.md` vs `docs/zh/changelog.md`
37
+ - `docs/en/policy.md` vs `docs/zh/policy.md`
38
+
39
+ 3. **Check for These Issues on Every File**:
40
+ - **Missing file**: Chinese version does not exist
41
+ - **Missing sections**: A heading in English has no counterpart in Chinese
42
+ - **Extra sections**: A heading in Chinese has no counterpart in English
43
+ - **Content drift**: Same section but different information
44
+ - **Stale examples**: Code examples in Chinese differ from English
45
+ - **URL/link differences**: Cross-references or links differ
46
+ - **Table differences**: Option tables have different rows or columns
47
+ - **Heading level mismatch**: Same content but different heading hierarchy
48
+
49
+ 4. **Produce a Diff Report**: For each file, report:
50
+ - Status: `SYNCED`, `MISSING_FILE`, `PARTIAL`, or `OUTDATED`
51
+ - A bullet list of specific discrepancies
52
+ - Recommended actions
53
+
54
+ 5. **Generate Patch Content** (if user asks): Produce the exact Markdown content needed to bring the Chinese file into sync. Use `Edit` or `Write` only after user confirmation.
55
+
56
+ ## Comparison Rules
57
+
58
+ - Command examples must be identical (only surrounding description text changes)
59
+ - Option tables must have the same rows in the same order
60
+ - All headings must have a 1-to-1 mapping
61
+ - Links to other docs must point to correct translated paths
62
+
63
+ ## Output Format
64
+
65
+ Present findings as:
66
+
67
+ ```
68
+ ## File Audit Summary
69
+
70
+ | File | Status | Issues |
71
+ |------|--------|--------|
72
+ | index.md | SYNCED | None |
73
+ | cli.md | PARTIAL | 2 sections missing |
74
+ | ... | ... | ... |
75
+
76
+ ## Detailed Findings
77
+
78
+ ### docs/zh/cli.md
79
+ - [ ] Section "Exit Codes" missing
80
+ - [ ] Example `--per-page 100` not translated
81
+ ...
82
+ ```
83
+
84
+ Always check every file. Do not sample or skip files.
@@ -0,0 +1,25 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(uv add *)",
5
+ "Bash(uv run *)",
6
+ "Bash(uv lock *)",
7
+ "Bash(uv sync *)",
8
+ "Bash(nber-cli:*)",
9
+ "WebFetch(domain:openai.github.io)",
10
+ "WebFetch(domain:openai.com)",
11
+ "WebFetch(domain:nber.org)",
12
+ "WebFetch(domain:github.com)",
13
+ "mcp__ide__getDiagnostics",
14
+ "mcp__codex-mcp__codex",
15
+ "mcp__codex-mcp__codex-reply"
16
+ ],
17
+ "deny": [
18
+ "Read(.env)"
19
+ ]
20
+ },
21
+ "enabledMcpjsonServers": [
22
+ "codex-mcp",
23
+ "context7"
24
+ ]
25
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
+ "name": "nber-cli",
4
+ "description": "Claude Code marketplace for NBER-CLI research workflows.",
5
+ "version": "0.2.0",
6
+ "owner": {
7
+ "name": "Song Tan",
8
+ "email": "sepinetam@gmail.com",
9
+ "url": "https://github.com/sepinetam"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "nber-cli",
14
+ "description": "Use NBER-CLI to search, inspect, download, and serve NBER working paper workflows.",
15
+ "version": "0.2.0",
16
+ "author": {
17
+ "name": "Song Tan",
18
+ "email": "sepinetam@gmail.com"
19
+ },
20
+ "category": "development",
21
+ "source": "./plugins/nber-cli"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,15 @@
1
+ [mcp_servers.claude-code-docs]
2
+ url = "https://code.claude.com/docs/mcp"
3
+
4
+ [mcp_servers.claude-code-docs.tools.search_claude_code_docs]
5
+ approval_mode = "approve"
6
+
7
+ [mcp_servers.claude-code-docs.tools.query_docs_filesystem_claude_code_docs]
8
+ approval_mode = "approve"
9
+
10
+ [mcp_servers.context7]
11
+ url = "https://mcp.context7.com/mcp"
12
+
13
+ [mcp_servers.codex-mcp]
14
+ command = "codex"
15
+ args = ["mcp-server"]
@@ -0,0 +1,61 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ concurrency:
14
+ group: pages-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: "3.11"
29
+
30
+ - name: Install uv
31
+ uses: astral-sh/setup-uv@v3
32
+
33
+ - name: Install dependencies
34
+ run: uv sync --group docs
35
+
36
+ - name: Build documentation
37
+ run: uv run --group docs mkdocs build --strict
38
+
39
+ - name: Upload Pages artifact
40
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
41
+ uses: actions/upload-pages-artifact@v3
42
+ with:
43
+ path: site
44
+
45
+ deploy:
46
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
47
+ needs: build
48
+ runs-on: ubuntu-latest
49
+
50
+ permissions:
51
+ pages: write
52
+ id-token: write
53
+
54
+ environment:
55
+ name: github-pages
56
+ url: ${{ steps.deployment.outputs.page_url }}
57
+
58
+ steps:
59
+ - name: Deploy to GitHub Pages
60
+ id: deployment
61
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,32 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.11"
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v3
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --dev
30
+
31
+ - name: Run ruff
32
+ run: uv run ruff check .
@@ -0,0 +1,32 @@
1
+ name: Pytest
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.11"
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v3
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --dev
30
+
31
+ - name: Run pytest
32
+ run: uv run pytest
@@ -6,6 +6,8 @@ dist/
6
6
  wheels/
7
7
  *.egg-info
8
8
 
9
+ release/
10
+
9
11
  # Virtual environments
10
12
  .venv
11
13
 
@@ -17,3 +19,14 @@ wheels/
17
19
 
18
20
  # OS X
19
21
  *.DS_Store
22
+
23
+ # local files
24
+ *.local.*
25
+
26
+ # Coverage
27
+ .coverage
28
+ htmlcov/
29
+ site/
30
+
31
+ # Files
32
+ *.pdf
@@ -0,0 +1,16 @@
1
+ {
2
+ "mcpServers": {
3
+ "codex-mcp": {
4
+ "type": "stdio",
5
+ "command": "codex",
6
+ "args": [
7
+ "mcp-server"
8
+ ],
9
+ "env": {}
10
+ },
11
+ "context7": {
12
+ "type": "http",
13
+ "url": "https://mcp.context7.com/mcp"
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.2.0] - 2026-05-31
6
+
7
+ ### Added
8
+ - `download` subcommand: single paper ID or batch mode (`--batch`), explicit file path (`--file`), target directory (`--save-base`).
9
+ - `info` subcommand: paper metadata with `--all` flag for full details and `--format json` option.
10
+ - `search` subcommand: full-text search with date filters (`--start-date`, `--end-date`), pagination (`--page`, `--per-page`), `--format json` option.
11
+ - `mcp-server` subcommand: MCP server for AI agent integration with stdio and streamable_http transports.
12
+
13
+ ### Changed
14
+ - Reworked CLI into subcommand syntax (`nber-cli <subcommand>`).
15
+ - Simplified downloader to direct async HTTP PDF fetches (removed database-backed state tracking).
16
+ - Removed legacy web UI module and script entrypoint.
17
+
18
+ ## [0.1.4] - 2025-08-09
19
+
20
+ ### Added
21
+ - Added `--version` / `-v` flag to display current version.
22
+ - Added comprehensive help message with examples.
23
+ - Added `__main__.py` file to support `python -m nber_cli` usage.
24
+ - Added argument grouping for better CLI organization.
25
+ - Added automatic help display when no arguments are provided.
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: nber-cli
3
+ Version: 0.2.0
4
+ Summary: A command line interface for reaching the National Bureau of Economic Research (NBER) paper without brower.
5
+ Project-URL: Homepage, https://github.com/sepinetam/nber-cli
6
+ Project-URL: Repository, https://github.com/sepinetam/nber-cli
7
+ Project-URL: Issues, https://github.com/sepinetam/nber-cli/issues
8
+ Project-URL: Documentation, https://sepinetam.github.io/nber-cli/
9
+ Author-email: Song Tan <sepinetam@gmail.com>
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: cli,mcp,nber,research,working-papers
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Topic :: Scientific/Engineering
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: aiohttp
23
+ Requires-Dist: aiohttp-retry
24
+ Requires-Dist: certifi
25
+ Requires-Dist: fake-useragent
26
+ Requires-Dist: mcp>=1.27.1
27
+ Description-Content-Type: text/markdown
28
+
29
+ # NBER-CLI
30
+ A command line interface for reaching the National Bureau of Economic Research (NBER) paper without brower.
31
+
32
+ [![Pytest](https://github.com/sepinetam/nber-cli/actions/workflows/pytest.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/pytest.yml)
33
+ [![Lint](https://github.com/sepinetam/nber-cli/actions/workflows/lint.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/lint.yml)
34
+ [![Docs](https://github.com/sepinetam/nber-cli/actions/workflows/docs.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/docs.yml)
35
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
36
+
37
+ [简体中文](README.zh-CN.md) | [Documentation](docs/en/index.md)
38
+
39
+ > **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).
40
+
41
+ ## Features
42
+
43
+ - Search NBER working papers by title, paper number, author, abstract, or keyword.
44
+ - Fetch structured metadata and abstracts for a paper ID such as `w25000`.
45
+ - Download single papers or batches as PDF files.
46
+ - Expose the same core workflows as MCP tools for AI agents.
47
+ - Return human-readable output by default, with JSON output for automation.
48
+
49
+ ## Quick Start
50
+
51
+ ### Use in Agents
52
+
53
+ 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.
54
+
55
+ If you want an agent to install and check NBER-CLI automatically, send it this prompt:
56
+
57
+ ```text
58
+ Install NBER-CLI globally for yourself from https://github.com/sepinetam/nber-cli, and check the status.
59
+ ```
60
+
61
+ After installation, verify it with either prompt:
62
+
63
+ ```text
64
+ I remember that in 2025, Anton had a paper on NBER about Agent for Econ. Download it to the current directory.
65
+ ```
66
+
67
+ ```text
68
+ I remember that paper w25000 was interesting. Show me its abstract.
69
+ ```
70
+
71
+ If you are an agent, visit the [Agent Guides](docs/en/agents/index.md).
72
+
73
+ ### CLI Mode
74
+ Run commands directly with `uvx`:
75
+
76
+ ```bash
77
+ uvx nber-cli search "Labor Economic"
78
+ uvx nber-cli info w25000
79
+ uvx nber-cli download w34567
80
+ ```
81
+
82
+ Or install the command first:
83
+
84
+ ```bash
85
+ uv tool install nber-cli
86
+ nber-cli search "Labor Economic"
87
+ nber-cli info w25000
88
+ nber-cli download w34567
89
+ ```
90
+
91
+ ### MCP Server Mode
92
+
93
+ NBER-CLI can run as a stdio MCP server:
94
+
95
+ ```bash
96
+ uvx nber-cli mcp-server
97
+ ```
98
+
99
+ Example MCP client configuration:
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "nber-cli-mcp": {
105
+ "command": "uvx",
106
+ "args": ["nber-cli", "mcp-server"]
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ The MCP server exposes tools for paper lookup, search, and PDF download.
113
+
114
+ ## Documentation
115
+
116
+ More usage details, command references, MCP setup, Python API examples, development notes, and release history are available in the [documentation](docs/en/index.md).
117
+
118
+ ## Development
119
+
120
+ ```bash
121
+ uv sync --dev --group docs
122
+ uv run pytest
123
+ uv run ruff check .
124
+ uv run --group docs mkdocs serve
125
+ ```
126
+
127
+ ## License
128
+
129
+ NBER-CLI is released under the [Apache-2.0 License](LICENSE).
@@ -0,0 +1,101 @@
1
+ # NBER-CLI
2
+ A command line interface for reaching the National Bureau of Economic Research (NBER) paper without brower.
3
+
4
+ [![Pytest](https://github.com/sepinetam/nber-cli/actions/workflows/pytest.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/pytest.yml)
5
+ [![Lint](https://github.com/sepinetam/nber-cli/actions/workflows/lint.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/lint.yml)
6
+ [![Docs](https://github.com/sepinetam/nber-cli/actions/workflows/docs.yml/badge.svg)](https://github.com/sepinetam/nber-cli/actions/workflows/docs.yml)
7
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
8
+
9
+ [简体中文](README.zh-CN.md) | [Documentation](docs/en/index.md)
10
+
11
+ > **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).
12
+
13
+ ## Features
14
+
15
+ - Search NBER working papers by title, paper number, author, abstract, or keyword.
16
+ - Fetch structured metadata and abstracts for a paper ID such as `w25000`.
17
+ - Download single papers or batches as PDF files.
18
+ - Expose the same core workflows as MCP tools for AI agents.
19
+ - Return human-readable output by default, with JSON output for automation.
20
+
21
+ ## Quick Start
22
+
23
+ ### Use in Agents
24
+
25
+ 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.
26
+
27
+ If you want an agent to install and check NBER-CLI automatically, send it this prompt:
28
+
29
+ ```text
30
+ Install NBER-CLI globally for yourself from https://github.com/sepinetam/nber-cli, and check the status.
31
+ ```
32
+
33
+ After installation, verify it with either prompt:
34
+
35
+ ```text
36
+ I remember that in 2025, Anton had a paper on NBER about Agent for Econ. Download it to the current directory.
37
+ ```
38
+
39
+ ```text
40
+ I remember that paper w25000 was interesting. Show me its abstract.
41
+ ```
42
+
43
+ If you are an agent, visit the [Agent Guides](docs/en/agents/index.md).
44
+
45
+ ### CLI Mode
46
+ Run commands directly with `uvx`:
47
+
48
+ ```bash
49
+ uvx nber-cli search "Labor Economic"
50
+ uvx nber-cli info w25000
51
+ uvx nber-cli download w34567
52
+ ```
53
+
54
+ Or install the command first:
55
+
56
+ ```bash
57
+ uv tool install nber-cli
58
+ nber-cli search "Labor Economic"
59
+ nber-cli info w25000
60
+ nber-cli download w34567
61
+ ```
62
+
63
+ ### MCP Server Mode
64
+
65
+ NBER-CLI can run as a stdio MCP server:
66
+
67
+ ```bash
68
+ uvx nber-cli mcp-server
69
+ ```
70
+
71
+ Example MCP client configuration:
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "nber-cli-mcp": {
77
+ "command": "uvx",
78
+ "args": ["nber-cli", "mcp-server"]
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ The MCP server exposes tools for paper lookup, search, and PDF download.
85
+
86
+ ## Documentation
87
+
88
+ More usage details, command references, MCP setup, Python API examples, development notes, and release history are available in the [documentation](docs/en/index.md).
89
+
90
+ ## Development
91
+
92
+ ```bash
93
+ uv sync --dev --group docs
94
+ uv run pytest
95
+ uv run ruff check .
96
+ uv run --group docs mkdocs serve
97
+ ```
98
+
99
+ ## License
100
+
101
+ NBER-CLI is released under the [Apache-2.0 License](LICENSE).