How companion-inc/alpha-hub works
Alpha Hub is a research-agent CLI and library for searching papers, retrieving reports, asking paper questions, reading associated repositories, and keeping local annotations. Its main workflow starts with a CLI command, dispatches to alphaXiv-backed operations, and presents results; paper retrieval also reads saved notes. Login provides alphaXiv access, while annotations persist locally. A stdio MCP server exposes related tools to agents, and the library API offers programmatic access. The documented features are represented, but unsampled command and server implementation details are not inferred beyond indexed references and README statements.
Main entry points: alphaxiv.js alphaXiv client · index.js CLI dispatcher · get.js Paper retrieval · output.js Output formatting
Components 19
CLI commands
- CLI dispatcher
cli/src/index.js - Paper search
cli/src/commands/search.js - Paper retrieval
cli/src/commands/get.js - Paper Q&A
cli/src/commands/ask.js - Repository reading
cli/src/commands/code.js - Annotation commands
cli/src/commands/annotate.js - Login and status
cli/src/commands/login.js - Output formatting
cli/src/lib/output.js
Paper research
- alphaXiv client
cli/src/lib/alphaxiv.js - Paper ID helpers
cli/src/lib/papers.js
Local state
- Annotation storage
cli/src/lib/annotations.js
Authentication
- OAuth and tokens
cli/src/lib/auth.js - Auth token file
cli/src/lib/auth.js
Agent integrations
- Library API
cli/src/lib/index.js - MCP server
cli/src/mcp/server.js - MCP tools
cli/src/mcp/tools.js
Other components
- Research agent
- alphaXiv services
- MCP agent
Connections 33
- Research agent → CLI dispatcher: runs commands
README.md - CLI dispatcher → Paper search: registers
cli/src/index.js - CLI dispatcher → Paper retrieval: registers
cli/src/index.js - CLI dispatcher → Paper Q&A: registers
cli/src/index.js - CLI dispatcher → Repository reading: registers
cli/src/index.js - CLI dispatcher → Annotation commands: registers
cli/src/index.js - CLI dispatcher → Login and status: registers
cli/src/index.js - Paper search → alphaXiv client: searches papers
cli/src/commands/search.js - Paper search → Output formatting: formats results
cli/src/commands/search.js - Paper retrieval → Paper ID helpers: normalizes IDs
cli/src/commands/get.js - Paper retrieval → alphaXiv client: fetches report
cli/src/commands/get.js - Paper retrieval → Annotation storage: reads note
cli/src/commands/get.js - Paper retrieval → Output formatting: formats result
cli/src/commands/get.js - Paper Q&A → alphaXiv client: asks question
cli/src/commands/ask.js - Paper Q&A → Output formatting: formats answer
cli/src/commands/ask.js - Repository reading → alphaXiv client: reads repository
cli/src/commands/code.js - Repository reading → Output formatting: formats result
cli/src/commands/code.js - Annotation commands → Paper ID helpers: normalizes IDs
cli/src/commands/annotate.js - Annotation commands → Annotation storage: reads and writes
cli/src/commands/annotate.js - Annotation commands → Output formatting: formats output
cli/src/commands/annotate.js - Login and status → OAuth and tokens: manages session
cli/src/commands/login.js - alphaXiv client → OAuth and tokens: gets valid token
cli/src/lib/alphaxiv.js - alphaXiv client → alphaXiv services: calls MCP and REST
cli/src/lib/alphaxiv.js - OAuth and tokens → Auth token file: reads and writes
cli/src/lib/auth.js - OAuth and tokens → alphaXiv services: OAuth and verifies
cli/src/lib/auth.js - Library API → alphaXiv client: calls paper operations
cli/src/lib/index.js - Library API → Annotation storage: manages notes
cli/src/lib/index.js - Library API → Paper ID helpers: normalizes papers
cli/src/lib/index.js - MCP agent → MCP server: uses stdio tools
README.md - MCP server → MCP tools: dispatches tools
cli/src/mcp/server.js - MCP tools → alphaXiv client: runs paper operations
cli/src/mcp/tools.js - MCP tools → Annotation storage: manages notes
cli/src/mcp/tools.js - MCP tools → Paper ID helpers: normalizes IDs
cli/src/mcp/tools.js