HTTP CLI and external-agent skills for Paper Plane X
Project description
Paper Plane X CLI
English | 中文
ppx is the JSON-first command-line client and external-agent integration package for Paper Plane X. It provides stable HTTP commands for project discovery, literature search, paper comparison, PDF parsing, project-file editing, and durable paper notes.
The package also ships two Agent Skills:
ppx-researcher: evidence-driven literature research through a Paper Plane X project.ppx-pdf-to-markdown: local PDF conversion through the configured Paper Plane X parser.
Every remote command calls a running Paper Plane X Backend under /api/v1; the CLI never reads the backend database directly.
Who should use it
- Researchers who prefer terminal and scriptable workflows.
- Automation that needs predictable JSON output and non-zero failure codes.
- Codex, Claude Code, Pi agent, and other Agent Skills-compatible tools.
- Developers integrating Paper Plane X into local research pipelines.
Requirements
- Python 3.12+
- uv
- A running Paper Plane X Backend for remote commands
- A project ID for project-scoped commands
Installation
Install the released package from PyPI:
uv tool install paper-plane-x-cli
ppx --help
Upgrade or uninstall:
uv tool upgrade paper-plane-x-cli
uv tool uninstall paper-plane-x-cli
Install the current source checkout for development:
uv tool install .
Quick start
Configure the backend and a default project:
ppx context set --base-url http://127.0.0.1:8000/api/v1
ppx context set --project-id prj_x
ppx context show
Explore and compare project papers:
ppx project global-finder
ppx librarian search \
--query-expr "(meta.title CONTAINS transformer)" \
--limit 20
ppx librarian matrix \
--paper-ids pap_a,pap_b \
--field-paths meta.title,quick_scan.quick_summary
ppx librarian deep-dive \
--paper-id pap_a \
--question "What is the core contribution?"
Persist a result in the project workspace:
ppx files upload --source ./comparison.md --path /notes/comparison.md
Context resolution
ppx resolves configuration in this order:
- command-line options:
--base-url,--project-id; - environment variables:
PPX_BASE_URL,PPX_PROJECT_ID; - local context:
./.paper-plane-x/context.json; - global context:
~/.config/paper-plane-x/context.json; - default base URL:
http://127.0.0.1:8000/api/v1.
Local context overrides global context, which is useful when each working directory maps to a different Paper Plane X project.
# Global defaults
ppx context set --base-url http://127.0.0.1:8000/api/v1
ppx context set --project-id prj_default
# Current directory only
ppx context set --local --project-id prj_current
For temporary or CI usage:
PPX_BASE_URL=http://127.0.0.1:8000/api/v1 \
PPX_PROJECT_ID=prj_x \
ppx project global-finder
Do not store secrets in context files. The CLI context contains server and project identifiers, not LLM API keys.
Command groups
| Group | Purpose |
|---|---|
ppx context |
Set and inspect global or local context |
ppx project |
Project-level discovery |
ppx librarian |
Search, matrix comparison, and deep dive |
ppx pdf |
Convert a local PDF to Markdown and images |
ppx paper |
Download stored paper Markdown |
ppx paper-note |
Read, write, or delete durable paper notes |
ppx files |
List, read, write, upload, patch, and delete project files |
ppx skills |
Install or remove bundled Agent Skills |
Run ppx <group> --help for authoritative options.
Project files
ppx files list --dir /
ppx files read --path /notes/idea.md
ppx files lines --path /draft.md --start-line 1 --end-line 40
ppx files find --path /draft.md --query "Related Work"
ppx files write --path /notes/idea.md --content "# Idea"
ppx files upload --source ./idea.md --path /notes/idea.md
ppx files patch \
--path /draft.md \
--action insert_after \
--anchor-text "## Related Work" \
--content "..."
ppx files delete --path /notes/obsolete.md
Project files are sandboxed by the backend: path traversal is rejected, only approved text/data extensions are accepted, and uploads are limited to 10 MB per file.
Prefer targeted find, lines, replace-*, or patch operations when an Agent modifies an existing document. This reduces accidental overwrites and makes failures explicit.
Paper Markdown and notes
Download the parsed Markdown stored for a paper:
ppx paper markdown --paper-id pap_x --save-dir ./paper-markdown
The default filename is <paper-id>.md; override it with --output-md-name.
Maintain a durable paper note:
ppx paper-note get --paper-id pap_x
ppx paper-note write --paper-id pap_x --content "Stable research note"
ppx paper-note delete --paper-id pap_x
Use paper notes for stable conclusions about one paper. Use project files for cross-paper synthesis, matrices, plans, and drafts.
PDF to Markdown
ppx pdf parse --source ./paper.pdf --save-dir ./paper-pdf
The command uploads the PDF to the configured backend parser, writes Markdown and referenced images, prunes unreferenced images, and prints a JSON summary:
{
"md_path": "paper-pdf/paper.md",
"image_paths": ["paper-pdf/images/fig1.png"],
"parser_type": "local_mineru"
}
Parser choice and credentials are managed by the backend Settings, not by the CLI.
Agent Skills
Bundled skills:
skills/ppx-researcher/SKILL.md
skills/ppx-pdf-to-markdown/SKILL.md
List and install them:
ppx skills list
ppx skills install
The default target is ${CODEX_HOME:-~/.codex}/skills. Use an explicit target for other tools:
| Tool or scope | Command |
|---|---|
| Codex default | ppx skills install |
| Generic Agent Skills directory | ppx skills install --target-dir ~/.agents/skills |
| Pi agent | ppx skills install --target-dir ~/.pi/agent/skills |
| Claude Code user scope | ppx skills install --target-dir ~/.claude/skills |
| Claude Code project scope | ppx skills install --target-dir ./.claude/skills |
Existing bundled skill directories are skipped unless --force is provided. uninstall removes only the bundled ppx-* skill names:
ppx skills uninstall
ppx skills uninstall --target-dir ~/.agents/skills
Restart the Agent application or open a new session after installation.
Output and automation contract
- Successful remote commands print JSON to stdout.
- HTTP, context, and validation failures print structured JSON to stderr.
- Failures return a non-zero exit code.
- Download commands write files only to the requested local directory.
- The CLI does not log or persist backend LLM credentials.
Scripts should parse JSON rather than human-readable terminal formatting.
Development
git clone https://github.com/WindLX/paper_plane_x_cli.git
cd paper_plane_x_cli
uv sync
uv run ppx --help
Quality checks:
just lint
just format-check
just typecheck
just test
just build
just pre-commit
Equivalent uv commands:
uv run ruff check src tests
uv run ruff format --check src tests
uv run pyright
uv run pytest
uv build
Contributing and pull requests
- Create a focused branch from the latest
main. - Preserve JSON output compatibility unless the change explicitly introduces a breaking contract.
- Add tests for command parsing, context precedence, request payloads, and file output.
- Update both
README.mdandREADME.zh.mdfor user-visible changes. - Update bundled Skill instructions when the workflow or CLI contract changes.
- Run
just pre-commitbefore opening a PR.
PR descriptions should include motivation, affected commands, compatibility impact, and verification commands. Never include API keys, private paper content, or local context files in issues or test fixtures.
Report problems at GitHub Issues.
Release
The CLI version is managed by the Paper Plane X monorepo VERSION file. A top-level vX.Y.Z release builds the wheel and source distribution and publishes them to PyPI through GitHub Actions Trusted Publishing.
Do not bump the CLI version independently; use the monorepo release process.
License
Paper Plane X CLI is licensed under the GNU Affero General Public License v3.0 or later.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paper_plane_x_cli-0.1.4.tar.gz.
File metadata
- Download URL: paper_plane_x_cli-0.1.4.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5530794de28c3e32289fe5d9753403ed01f949ba9f69876c4ab2cf27f028c0ec
|
|
| MD5 |
2645f8cf49ba4a3b09327c22f550f016
|
|
| BLAKE2b-256 |
246b7badd7fc34cce7b6904fdefd1e3f145ed65de2c4752506c87967c4a77cdd
|
Provenance
The following attestation bundles were made for paper_plane_x_cli-0.1.4.tar.gz:
Publisher:
release.yml on WindLX/paper_plane_x
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paper_plane_x_cli-0.1.4.tar.gz -
Subject digest:
5530794de28c3e32289fe5d9753403ed01f949ba9f69876c4ab2cf27f028c0ec - Sigstore transparency entry: 2171795885
- Sigstore integration time:
-
Permalink:
WindLX/paper_plane_x@908f0eb73920ca46d59d7044766bd5895863ff05 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/WindLX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@908f0eb73920ca46d59d7044766bd5895863ff05 -
Trigger Event:
push
-
Statement type:
File details
Details for the file paper_plane_x_cli-0.1.4-py3-none-any.whl.
File metadata
- Download URL: paper_plane_x_cli-0.1.4-py3-none-any.whl
- Upload date:
- Size: 36.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c54d0469c75875dff120c0bcdb88370ba955dad7ae1fe01e868311f541a1fae
|
|
| MD5 |
158574c6d8af65f63d53f80d8b576bab
|
|
| BLAKE2b-256 |
b7979229f5734bedc8dbb02d0a8a2ff9a0372c8954f3c1c2c37ec81884a13bce
|
Provenance
The following attestation bundles were made for paper_plane_x_cli-0.1.4-py3-none-any.whl:
Publisher:
release.yml on WindLX/paper_plane_x
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paper_plane_x_cli-0.1.4-py3-none-any.whl -
Subject digest:
9c54d0469c75875dff120c0bcdb88370ba955dad7ae1fe01e868311f541a1fae - Sigstore transparency entry: 2171795925
- Sigstore integration time:
-
Permalink:
WindLX/paper_plane_x@908f0eb73920ca46d59d7044766bd5895863ff05 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/WindLX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@908f0eb73920ca46d59d7044766bd5895863ff05 -
Trigger Event:
push
-
Statement type: