paper-plane-x-cli 0.2.0__tar.gz → 0.2.1__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.
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/PKG-INFO +9 -6
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/README.md +8 -5
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/pyproject.toml +1 -1
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/skills/ppx-researcher/SKILL.md +2 -2
- paper_plane_x_cli-0.2.1/skills/ppx-researcher/references/advanced-topics.md +72 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/skills/ppx-researcher/references/tool-guide.md +40 -103
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/__init__.py +1 -1
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/skills.py +3 -8
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/.gitignore +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/LICENSE +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/skills/ppx-paper-acquisition/SKILL.md +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/skills/ppx-pdf-to-markdown/SKILL.md +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/__init__.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/context.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/files.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/librarian.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/paper.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/paper_note.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/pdf.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/project.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/task.py +0 -0
- {paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/src/paper_plane_x_cli/cli/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: paper-plane-x-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: HTTP CLI and external-agent skills for Paper Plane X
|
|
5
5
|
Author-email: windlx <1418043337@qq.com>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -20,10 +20,11 @@ English | [中文](README.zh.md)
|
|
|
20
20
|
|
|
21
21
|
`ppx` is the JSON-first command-line client and external-agent integration package for [Paper Plane X](https://github.com/WindLX/paper_plane_x). It provides stable HTTP commands for project discovery, literature search, paper comparison, PDF parsing, project-file editing, and durable paper notes.
|
|
22
22
|
|
|
23
|
-
The package also ships
|
|
23
|
+
The package also ships three Agent Skills:
|
|
24
24
|
|
|
25
25
|
- `ppx-researcher`: evidence-driven literature research through a Paper Plane X project.
|
|
26
26
|
- `ppx-pdf-to-markdown`: local PDF conversion through the configured Paper Plane X parser.
|
|
27
|
+
- `ppx-paper-acquisition`: acquire original paper PDFs and upload them into a Paper Plane X project.
|
|
27
28
|
|
|
28
29
|
Every remote command calls a running Paper Plane X Backend under `/api/v1`; the CLI never reads the backend database directly.
|
|
29
30
|
|
|
@@ -247,12 +248,12 @@ ppx skills list
|
|
|
247
248
|
ppx skills install
|
|
248
249
|
```
|
|
249
250
|
|
|
250
|
-
|
|
251
|
+
Both installation and uninstallation default to the generic Agent Skills directory `~/.agents/skills`, independently of `CODEX_HOME`. Use `--target-dir` to choose another directory:
|
|
251
252
|
|
|
252
253
|
| Tool or scope | Command |
|
|
253
254
|
| ------------------------------ | ---------------------------------------------------- |
|
|
254
|
-
|
|
|
255
|
-
|
|
|
255
|
+
| Generic Agent Skills directory | `ppx skills install` |
|
|
256
|
+
| Explicit Codex directory | `ppx skills install --target-dir ~/.codex/skills` |
|
|
256
257
|
| Pi agent | `ppx skills install --target-dir ~/.pi/agent/skills` |
|
|
257
258
|
| Claude Code user scope | `ppx skills install --target-dir ~/.claude/skills` |
|
|
258
259
|
| Claude Code project scope | `ppx skills install --target-dir ./.claude/skills` |
|
|
@@ -261,9 +262,11 @@ Existing bundled skill directories are skipped unless `--force` is provided. `un
|
|
|
261
262
|
|
|
262
263
|
```bash
|
|
263
264
|
ppx skills uninstall
|
|
264
|
-
ppx skills uninstall --target-dir ~/.
|
|
265
|
+
ppx skills uninstall --target-dir ~/.codex/skills
|
|
265
266
|
```
|
|
266
267
|
|
|
268
|
+
Changing the default does not move existing installations. Specify their directory with `--target-dir` to update or remove them.
|
|
269
|
+
|
|
267
270
|
Restart the Agent application or open a new session after installation.
|
|
268
271
|
|
|
269
272
|
## Output and automation contract
|
|
@@ -8,10 +8,11 @@ English | [中文](README.zh.md)
|
|
|
8
8
|
|
|
9
9
|
`ppx` is the JSON-first command-line client and external-agent integration package for [Paper Plane X](https://github.com/WindLX/paper_plane_x). It provides stable HTTP commands for project discovery, literature search, paper comparison, PDF parsing, project-file editing, and durable paper notes.
|
|
10
10
|
|
|
11
|
-
The package also ships
|
|
11
|
+
The package also ships three Agent Skills:
|
|
12
12
|
|
|
13
13
|
- `ppx-researcher`: evidence-driven literature research through a Paper Plane X project.
|
|
14
14
|
- `ppx-pdf-to-markdown`: local PDF conversion through the configured Paper Plane X parser.
|
|
15
|
+
- `ppx-paper-acquisition`: acquire original paper PDFs and upload them into a Paper Plane X project.
|
|
15
16
|
|
|
16
17
|
Every remote command calls a running Paper Plane X Backend under `/api/v1`; the CLI never reads the backend database directly.
|
|
17
18
|
|
|
@@ -235,12 +236,12 @@ ppx skills list
|
|
|
235
236
|
ppx skills install
|
|
236
237
|
```
|
|
237
238
|
|
|
238
|
-
|
|
239
|
+
Both installation and uninstallation default to the generic Agent Skills directory `~/.agents/skills`, independently of `CODEX_HOME`. Use `--target-dir` to choose another directory:
|
|
239
240
|
|
|
240
241
|
| Tool or scope | Command |
|
|
241
242
|
| ------------------------------ | ---------------------------------------------------- |
|
|
242
|
-
|
|
|
243
|
-
|
|
|
243
|
+
| Generic Agent Skills directory | `ppx skills install` |
|
|
244
|
+
| Explicit Codex directory | `ppx skills install --target-dir ~/.codex/skills` |
|
|
244
245
|
| Pi agent | `ppx skills install --target-dir ~/.pi/agent/skills` |
|
|
245
246
|
| Claude Code user scope | `ppx skills install --target-dir ~/.claude/skills` |
|
|
246
247
|
| Claude Code project scope | `ppx skills install --target-dir ./.claude/skills` |
|
|
@@ -249,9 +250,11 @@ Existing bundled skill directories are skipped unless `--force` is provided. `un
|
|
|
249
250
|
|
|
250
251
|
```bash
|
|
251
252
|
ppx skills uninstall
|
|
252
|
-
ppx skills uninstall --target-dir ~/.
|
|
253
|
+
ppx skills uninstall --target-dir ~/.codex/skills
|
|
253
254
|
```
|
|
254
255
|
|
|
256
|
+
Changing the default does not move existing installations. Specify their directory with `--target-dir` to update or remove them.
|
|
257
|
+
|
|
255
258
|
Restart the Agent application or open a new session after installation.
|
|
256
259
|
|
|
257
260
|
## Output and automation contract
|
|
@@ -31,7 +31,7 @@ Else if the user **just wants to work with a single paper**, `project_id` is not
|
|
|
31
31
|
|
|
32
32
|
`project-id` is needed in `project` and `files` commands, and in `librarian search` commands it is optional but recommended for project-scoped searches. It is not needed in other commands.
|
|
33
33
|
|
|
34
|
-
Read
|
|
34
|
+
Read [references/tool-guide.md](references/tool-guide.md) when you need exact CLI syntax, query rules, matrix field paths, or paper-resource and note commands.
|
|
35
35
|
|
|
36
36
|
## Operating Principles
|
|
37
37
|
|
|
@@ -77,7 +77,7 @@ Use `ppx paper pdf --paper-id <paper_id> --save-dir <directory>` when the task d
|
|
|
77
77
|
|
|
78
78
|
### Project Files and Drafts
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
When the task must read, save, upload, or modify project files, read [references/advanced-topics.md](references/advanced-topics.md) for the file commands and editing rules before acting. Literature search, comparison, and deep-dive work does not need it. Inspect existing files before writing or continuing a draft, and prefer the smallest reliable edit over whole-file overwrite.
|
|
81
81
|
|
|
82
82
|
## Common Workflows
|
|
83
83
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Advanced Topics: Project Files
|
|
2
|
+
|
|
3
|
+
Project files live in the Paper Plane X project sandbox. Reach for these commands when the task needs to read, save, upload, or modify project files.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
| Researcher action | CLI command |
|
|
8
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| List files | `ppx files list --dir /` |
|
|
10
|
+
| Read whole file | `ppx files read --path /notes/idea.md` |
|
|
11
|
+
| Read line range | `ppx files lines --path /draft.md --start-line 10 --end-line 20` |
|
|
12
|
+
| Find text | `ppx files find --path /draft.md --query "Related Work"` |
|
|
13
|
+
| Write/overwrite file | `ppx files write --path /notes/summary.md --content "..."` |
|
|
14
|
+
| Upload local file | `ppx files upload --source ./summary.md --path /notes/summary.md` |
|
|
15
|
+
| Replace line range | `ppx files replace-lines --path /draft.md --start-line 4 --end-line 6 --new-text "..."` |
|
|
16
|
+
| Replace exact text | `ppx files replace-text --path /draft.md --old-text "..." --new-text "..."` |
|
|
17
|
+
| Anchor patch | `ppx files patch --path /draft.md --action insert_after --anchor-text "## Methods\n" --content "..."` |
|
|
18
|
+
| Delete file/empty dir | `ppx files delete --path /tmp/old.md` |
|
|
19
|
+
|
|
20
|
+
If `--path` is omitted on `upload`, the file targets `/<source filename>`.
|
|
21
|
+
|
|
22
|
+
## Editing Rules
|
|
23
|
+
|
|
24
|
+
- Inspect before editing: use `list`, `read`, `lines`, or `find`.
|
|
25
|
+
- Prefer the smallest reliable edit: `replace-lines` for known line ranges, `replace-text` for unique fixed text, `patch` for anchor-based edits.
|
|
26
|
+
- Use `write` only for new files or intentional full-file regeneration.
|
|
27
|
+
- Use `upload` when a local file already exists; do not paste large local files into `write`.
|
|
28
|
+
- `replace-text` and `patch` support `--expected-occurrences`; use it for safety. `replace-text` also supports `--replace-all`.
|
|
29
|
+
- If an edit command fails because line numbers, matches, or paths changed, re-read or re-find before retrying.
|
|
30
|
+
- Line numbers are 1-based, and `end_line` is inclusive.
|
|
31
|
+
- Project files must stay inside the sandbox and use one of: `.csv`, `.json`, `.md`, `.txt`, `.yaml`, `.yml`, `.toml`.
|
|
32
|
+
- Single-file size limit is 10485760 bytes.
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
Inspect before editing:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
ppx files list --dir /
|
|
40
|
+
ppx files find --path /draft.md --query "Related Work"
|
|
41
|
+
ppx files lines --path /draft.md --start-line 20 --end-line 40
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Small line edit:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ppx files replace-lines --path /draft.md --start-line 24 --end-line 29 --new-text "new paragraph"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Anchor edit:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
ppx files patch --path /draft.md --action insert_after --anchor-text "## Related Work\n" --content "new content\n"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Whole-file write, only when intended:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
ppx files write --path /notes/lit-review.md --content "# Literature Review\n..."
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Upload a local file into the project sandbox:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
ppx files upload --source ./lit-review.md --path /notes/lit-review.md
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Delete a file or empty directory:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
ppx files delete --path /tmp/old.md
|
|
72
|
+
```
|
{paper_plane_x_cli-0.2.0 → paper_plane_x_cli-0.2.1}/skills/ppx-researcher/references/tool-guide.md
RENAMED
|
@@ -2,98 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
`ppx` is the HTTP bridge from external agents to Paper Plane X. It calls FastAPI endpoints and prints JSON.
|
|
4
4
|
|
|
5
|
+
Read [advanced-topics.md](advanced-topics.md) only when the task must read, save, upload, or modify project files.
|
|
6
|
+
|
|
5
7
|
## Contents
|
|
6
8
|
|
|
7
|
-
- Context
|
|
8
|
-
- Project files
|
|
9
|
-
- Paper resources
|
|
10
|
-
- Paper notes
|
|
11
9
|
- Librarian commands
|
|
12
10
|
- Query rules
|
|
13
11
|
- Matrix field paths
|
|
14
|
-
-
|
|
12
|
+
- Paper notes
|
|
13
|
+
- Paper resources
|
|
14
|
+
- Context
|
|
15
15
|
- Output handling
|
|
16
16
|
|
|
17
|
-
## Context
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
ppx context set --base-url http://127.0.0.1:8000/api/v1 --project-id prj_x
|
|
21
|
-
ppx context set --global --project-id prj_shared
|
|
22
|
-
ppx context set --project-id null
|
|
23
|
-
ppx context show
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Context precedence:
|
|
27
|
-
|
|
28
|
-
1. Command flags: `--base-url`, `--project-id`
|
|
29
|
-
2. Environment variables: `PPX_<CONFIG_KEY>`, such as `PPX_BASE_URL` and `PPX_PROJECT_ID`
|
|
30
|
-
3. Local context: `./.paper-plane-x/context.json`
|
|
31
|
-
4. Global context: `~/.config/paper-plane-x/context.json`
|
|
32
|
-
5. Default base URL: `http://127.0.0.1:8000/api/v1`
|
|
33
|
-
|
|
34
|
-
Context writes are local by default; use `--global` for shared defaults. For context sources, precedence is `ENV > local JSON > global JSON`. The `project_id` values `none`, `null`, `None`, and `NULL` clear the target key with `context set`; as a command option or environment value, they explicitly disable the resolved project.
|
|
35
|
-
|
|
36
|
-
Run `ppx context show` before project-scoped work. Most project file and librarian commands require `project_id`.
|
|
37
|
-
|
|
38
|
-
## Project Files
|
|
39
|
-
|
|
40
|
-
| Researcher action | CLI command |
|
|
41
|
-
| --------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
42
|
-
| List files | `ppx files list --dir /` |
|
|
43
|
-
| Read whole file | `ppx files read --path /notes/idea.md` |
|
|
44
|
-
| Read line range | `ppx files lines --path /draft.md --start-line 10 --end-line 20` |
|
|
45
|
-
| Find text | `ppx files find --path /draft.md --query "Related Work"` |
|
|
46
|
-
| Write/overwrite file | `ppx files write --path /notes/summary.md --content "..."` |
|
|
47
|
-
| Upload local file | `ppx files upload --source ./summary.md --path /notes/summary.md` |
|
|
48
|
-
| Replace line range | `ppx files replace-lines --path /draft.md --start-line 4 --end-line 6 --new-text "..."` |
|
|
49
|
-
| Replace exact text | `ppx files replace-text --path /draft.md --old-text "..." --new-text "..."` |
|
|
50
|
-
| Anchor patch | `ppx files patch --path /draft.md --action insert_after --anchor-text "## Methods\n" --content "..."` |
|
|
51
|
-
| Delete file/empty dir | `ppx files delete --path /tmp/old.md` |
|
|
52
|
-
|
|
53
|
-
File editing rules:
|
|
54
|
-
|
|
55
|
-
- Inspect before editing: use `list`, `read`, `lines`, or `find`.
|
|
56
|
-
- Prefer the smallest reliable edit: `replace-lines` for known line ranges, `replace-text` for unique fixed text, `patch` for anchor-based edits.
|
|
57
|
-
- Use `write` only for new files or intentional full-file regeneration.
|
|
58
|
-
- Use `upload` when a local file already exists; do not paste large local files into `write`.
|
|
59
|
-
- `replace-text` and `patch` support `--expected-occurrences`; use it for safety. `replace-text` also supports `--replace-all`.
|
|
60
|
-
- If an edit command fails because line numbers, matches, or paths changed, re-read or re-find before retrying.
|
|
61
|
-
- Line numbers are 1-based, and `end_line` is inclusive.
|
|
62
|
-
- Project files must stay inside the sandbox and use one of: `.csv`, `.json`, `.md`, `.txt`, `.yaml`, `.yml`, `.toml`.
|
|
63
|
-
- Single-file size limit is 10485760 bytes.
|
|
64
|
-
|
|
65
|
-
## Paper Notes
|
|
66
|
-
|
|
67
|
-
| Researcher action | CLI command |
|
|
68
|
-
| ----------------- | ---------------------------------------------------- |
|
|
69
|
-
| Read note | `ppx paper-note get --paper-id p1` |
|
|
70
|
-
| Write/update note | `ppx paper-note write --paper-id p1 --content "..."` |
|
|
71
|
-
| Delete note | `ppx paper-note delete --paper-id p1` |
|
|
72
|
-
|
|
73
|
-
Paper notes are for stable, reusable conclusions about one paper. Read existing notes before overwriting.
|
|
74
|
-
|
|
75
|
-
## Paper Resources
|
|
76
|
-
|
|
77
|
-
Download a paper's complete stored parsed Markdown:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
ppx paper markdown --paper-id p1 --save-dir ./paper-markdown
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
The default output path is `./paper-markdown/p1.md`. Use `--output-md-name full-paper.md` to choose another `.md` filename. The command prints `paper_id`, `md_path`, and `bytes_written`.
|
|
84
|
-
|
|
85
|
-
Download the preserved original PDF when layout or visual evidence matters:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
ppx paper pdf --paper-id p1 --save-dir ./paper-pdf
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
The default output path is `./paper-pdf/p1.pdf`. Use `--output-pdf-name source.pdf` for another `.pdf` filename. The command prints `paper_id`, `pdf_path`, and `bytes_written`.
|
|
92
|
-
|
|
93
|
-
Use Markdown for full-text reading and local text processing. Use the original PDF for page layout, figures, tables, formulas, or source-file verification.
|
|
94
|
-
|
|
95
|
-
Because full paper files are usually long, prefer delegating focused sections or questions to sub-agents when that capability is available. Otherwise, read the Markdown in targeted chunks rather than loading the entire file at once.
|
|
96
|
-
|
|
97
17
|
## Librarian Commands
|
|
98
18
|
|
|
99
19
|
| Researcher action | CLI command |
|
|
@@ -229,41 +149,58 @@ Useful paths:
|
|
|
229
149
|
- `analysis_report.core_formulation.objective_function.text`
|
|
230
150
|
- `analysis_report.derivation_steps[0].detail_explanation.text`
|
|
231
151
|
|
|
232
|
-
##
|
|
152
|
+
## Paper Notes
|
|
233
153
|
|
|
234
|
-
|
|
154
|
+
| Researcher action | CLI command |
|
|
155
|
+
| ----------------- | ---------------------------------------------------- |
|
|
156
|
+
| Read note | `ppx paper-note get --paper-id p1` |
|
|
157
|
+
| Write/update note | `ppx paper-note write --paper-id p1 --content "..."` |
|
|
158
|
+
| Delete note | `ppx paper-note delete --paper-id p1` |
|
|
235
159
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
ppx files lines --path /draft.md --start-line 20 --end-line 40
|
|
240
|
-
```
|
|
160
|
+
Paper notes are for stable, reusable conclusions about one paper. Read existing notes before overwriting.
|
|
161
|
+
|
|
162
|
+
## Paper Resources
|
|
241
163
|
|
|
242
|
-
|
|
164
|
+
Download a paper's complete stored parsed Markdown:
|
|
243
165
|
|
|
244
166
|
```bash
|
|
245
|
-
ppx
|
|
167
|
+
ppx paper markdown --paper-id p1 --save-dir ./paper-markdown
|
|
246
168
|
```
|
|
247
169
|
|
|
248
|
-
|
|
170
|
+
The default output path is `./paper-markdown/p1.md`. Use `--output-md-name full-paper.md` to choose another `.md` filename. The command prints `paper_id`, `md_path`, and `bytes_written`.
|
|
171
|
+
|
|
172
|
+
Download the preserved original PDF when layout or visual evidence matters:
|
|
249
173
|
|
|
250
174
|
```bash
|
|
251
|
-
ppx
|
|
175
|
+
ppx paper pdf --paper-id p1 --save-dir ./paper-pdf
|
|
252
176
|
```
|
|
253
177
|
|
|
254
|
-
|
|
178
|
+
The default output path is `./paper-pdf/p1.pdf`. Use `--output-pdf-name source.pdf` for another `.pdf` filename. The command prints `paper_id`, `pdf_path`, and `bytes_written`.
|
|
255
179
|
|
|
256
|
-
|
|
257
|
-
ppx files write --path /notes/lit-review.md --content "# Literature Review\n..."
|
|
258
|
-
```
|
|
180
|
+
Use Markdown for full-text reading and local text processing. Use the original PDF for page layout, figures, tables, formulas, or source-file verification.
|
|
259
181
|
|
|
260
|
-
|
|
182
|
+
Because full paper files are usually long, prefer delegating focused sections or questions to sub-agents when that capability is available. Otherwise, read the Markdown in targeted chunks rather than loading the entire file at once.
|
|
183
|
+
|
|
184
|
+
## Context
|
|
261
185
|
|
|
262
186
|
```bash
|
|
263
|
-
ppx
|
|
187
|
+
ppx context set --base-url http://127.0.0.1:8000/api/v1 --project-id prj_x
|
|
188
|
+
ppx context set --global --project-id prj_shared
|
|
189
|
+
ppx context set --project-id null
|
|
190
|
+
ppx context show
|
|
264
191
|
```
|
|
265
192
|
|
|
266
|
-
|
|
193
|
+
Context precedence:
|
|
194
|
+
|
|
195
|
+
1. Command flags: `--base-url`, `--project-id`
|
|
196
|
+
2. Environment variables: `PPX_<CONFIG_KEY>`, such as `PPX_BASE_URL` and `PPX_PROJECT_ID`
|
|
197
|
+
3. Local context: `./.paper-plane-x/context.json`
|
|
198
|
+
4. Global context: `~/.config/paper-plane-x/context.json`
|
|
199
|
+
5. Default base URL: `http://127.0.0.1:8000/api/v1`
|
|
200
|
+
|
|
201
|
+
Context writes are local by default; use `--global` for shared defaults. For context sources, precedence is `ENV > local JSON > global JSON`. The `project_id` values `none`, `null`, `None`, and `NULL` clear the target key with `context set`; as a command option or environment value, they explicitly disable the resolved project.
|
|
202
|
+
|
|
203
|
+
Run `ppx context show` before project-scoped work. Most project file and librarian commands require `project_id`.
|
|
267
204
|
|
|
268
205
|
## Output Handling
|
|
269
206
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
import os
|
|
6
5
|
import shutil
|
|
7
6
|
from pathlib import Path
|
|
8
7
|
from typing import Annotated
|
|
@@ -17,12 +16,8 @@ skills_app = typer.Typer(
|
|
|
17
16
|
)
|
|
18
17
|
|
|
19
18
|
|
|
20
|
-
def _default_codex_skills_dir() -> Path:
|
|
21
|
-
return Path(os.environ.get("CODEX_HOME", "~/.codex")) / "skills"
|
|
22
|
-
|
|
23
|
-
|
|
24
19
|
def _resolve_target_dir(target_dir: Path | None) -> Path:
|
|
25
|
-
return (target_dir or
|
|
20
|
+
return (target_dir or Path.home() / ".agents" / "skills").expanduser()
|
|
26
21
|
|
|
27
22
|
|
|
28
23
|
def _bundled_skills_dir() -> Path:
|
|
@@ -61,7 +56,7 @@ def skills_install(
|
|
|
61
56
|
Path | None,
|
|
62
57
|
typer.Option(
|
|
63
58
|
"--target-dir",
|
|
64
|
-
help="Directory that should contain skill folders. Defaults to
|
|
59
|
+
help="Directory that should contain skill folders. Defaults to ~/.agents/skills (the generic Agent Skills directory).",
|
|
65
60
|
),
|
|
66
61
|
] = None,
|
|
67
62
|
force: Annotated[
|
|
@@ -101,7 +96,7 @@ def skills_uninstall(
|
|
|
101
96
|
Path | None,
|
|
102
97
|
typer.Option(
|
|
103
98
|
"--target-dir",
|
|
104
|
-
help="Directory that contains installed skill folders. Defaults to
|
|
99
|
+
help="Directory that contains installed skill folders. Defaults to ~/.agents/skills (the generic Agent Skills directory).",
|
|
105
100
|
),
|
|
106
101
|
] = None,
|
|
107
102
|
) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|