scitex_hub
SciTeX Hub - CLI tools and APIs for SciTeX deployment and management.
- Usage:
pip install scitex-hub scitex-hub –help
- Python API:
>>> import scitex_hub >>> client = scitex_hub.CloudClient() >>> client.scholar_search("neural networks") >>> client.enrich_bibtex("@article{...}")
- MCP Server:
scitex-hub serve # stdio (Claude Desktop) scitex-hub serve -t sse # SSE (remote)
Functions
|
Evaluate JavaScript in the user's connected browser. |
|
Get web app context: username, page, skills, available actions. |
Get scitex-hub version. |
|
|
Check scitex-hub service health. |
|
Drive browser UI: navigate, highlight, click, fill, scroll. |
- scitex_hub.get_context(page: str = '', **kw) dict[source]
Get web app context: username, page, skills, available actions.
Convenience wrapper over
CloudClient.get_context.- Parameters:
page (str, optional) – Page name or URL fragment to query context for.
""means the current page.**kw – Forwarded to
CloudClient(e.g. base URL, auth credentials).
- Returns:
Context dict (
username,page,actions, …).- Return type:
- scitex_hub.eval_js(code: str, timeout: int = 10, **kw) dict[source]
Evaluate JavaScript in the user’s connected browser.
Convenience wrapper over
CloudClient.eval_js.- Parameters:
code (str) – JavaScript code to evaluate.
timeout (int, optional) – Seconds to wait for the result (default
10).**kw – Forwarded to
CloudClient.
- Returns:
Result of the JavaScript evaluation.
- Return type:
- scitex_hub.ui_action(steps: list, delay_ms: int = 900, **kw) dict[source]
Drive browser UI: navigate, highlight, click, fill, scroll.
Convenience wrapper over
CloudClient.ui_action.- Parameters:
steps (list) – List of action-step dicts; each describes one browser action.
delay_ms (int, optional) – Milliseconds to wait between steps (default
900).**kw – Forwarded to
CloudClient.
- Returns:
Result summary.
- Return type:
- class scitex_hub.CloudClient(api_key: str | None = None, base_url: str | None = None)[source]
Python client for SciTeX Hub API.
- Parameters:
api_key (str, optional) – API key for authenticated endpoints. Falls back to SCITEX_HUB_API_KEY env var.
base_url (str, optional) – Cloud server URL. Falls back to SCITEX_HUB_URL env var or https://scitex.ai.
Examples
>>> client = CloudClient() >>> result = client.scholar_search("machine learning") >>> print(result["papers"])
- _request(method: str, endpoint: str, data: dict | None = None, files: dict | None = None, auth_required: bool = True) dict[source]
Make HTTP request to SciTeX Hub API.
- scholar_search(query: str, limit: int = 10) dict[source]
Search papers via SciTeX Hub (public, no auth required).
- crossref_search(query: str, rows: int = 10, offset: int = 0) dict[source]
Search CrossRef database via cloud proxy.
- enrich_bibtex(bibtex_content: str, use_cache: bool = True, timeout: int = 120) str[source]
Enrich BibTeX content with metadata.
- writer_compile(project_id: str, document_type: str = 'manuscript') dict[source]
Compile LaTeX manuscript via cloud.
- class scitex_hub.Environment(name: str, docker_compose_file: str, env_file: str, host: str, port: int, description: str)[source]
Deployment environment configuration.
- scitex_hub.get_environment(name: str | None = None) Environment[source]
Get environment configuration by name or auto-detect.
- class scitex_hub.DockerManager(env: Environment | None = None, project_root: Path | None = None)[source]
Manage Docker containers for SciTeX Hub.
- _run_compose(args: List[str], capture: bool = False) CompletedProcess[source]
Run docker-compose command.
Modules
SciTeX App Tools — init, validate, develop, publish, and manage app plugins. |
|
SciTeX Hub Module -- decorator and output APIs for custom workspace modules. |
|
SciTeX Hub project management. |
|
SciTeX SDK — backward-compatible re-export from scitex-app. |