apdf-cloud-cli 0.1.0__tar.gz → 0.3.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.
- apdf_cloud_cli-0.3.0/PKG-INFO +192 -0
- apdf_cloud_cli-0.3.0/README.md +159 -0
- {apdf_cloud_cli-0.1.0 → apdf_cloud_cli-0.3.0}/pyproject.toml +6 -1
- {apdf_cloud_cli-0.1.0 → apdf_cloud_cli-0.3.0}/src/apdf_cloud_cli/__init__.py +1 -1
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/cli.py +338 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/config.py +178 -0
- {apdf_cloud_cli-0.1.0 → apdf_cloud_cli-0.3.0}/src/apdf_cloud_cli/operations.py +23 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/resources/skills/apdf-cloud-mcp/SKILL.md +106 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/resources/skills/apdf-cloud-mcp/agents/openai.yaml +4 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/resources/skills/apdf-cloud-mcp/references/live-tests.md +30 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/resources/skills/apdf-cloud-mcp/references/mcp-config.md +65 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/resources/skills/apdf-cloud-mcp/references/prompts.md +43 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/resources/skills/apdf-cloud-mcp/references/security.md +38 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/resources/skills/apdf-cloud-mcp/references/setup.md +54 -0
- apdf_cloud_cli-0.3.0/src/apdf_cloud_cli/skill_installer.py +80 -0
- apdf_cloud_cli-0.1.0/PKG-INFO +0 -109
- apdf_cloud_cli-0.1.0/README.md +0 -76
- apdf_cloud_cli-0.1.0/src/apdf_cloud_cli/cli.py +0 -162
- apdf_cloud_cli-0.1.0/src/apdf_cloud_cli/config.py +0 -75
- {apdf_cloud_cli-0.1.0 → apdf_cloud_cli-0.3.0}/src/apdf_cloud_cli/client.py +0 -0
- {apdf_cloud_cli-0.1.0 → apdf_cloud_cli-0.3.0}/src/apdf_cloud_cli/mcp_server.py +0 -0
- {apdf_cloud_cli-0.1.0 → apdf_cloud_cli-0.3.0}/src/apdf_cloud_cli/py.typed +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: apdf-cloud-cli
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: CLI and MCP server tools for Aspose PDF Cloud
|
|
5
|
+
Keywords: aspose,pdf,cli,mcp
|
|
6
|
+
Author: Andriy Andruhovski
|
|
7
|
+
Author-email: andruhovski@gmail.com
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Office/Business
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: asposepdfcloud (>=26.4.0,<27.0.0)
|
|
21
|
+
Requires-Dist: build (>=1.2.0) ; extra == "dev"
|
|
22
|
+
Requires-Dist: mcp (>=1.0.0)
|
|
23
|
+
Requires-Dist: pytest (>=8.0.0) ; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest-mock (>=3.12.0) ; extra == "dev"
|
|
25
|
+
Requires-Dist: rich (>=13.0.0)
|
|
26
|
+
Requires-Dist: twine (>=5.0.0) ; extra == "dev"
|
|
27
|
+
Requires-Dist: typer (>=0.12.0)
|
|
28
|
+
Project-URL: Homepage, https://github.com/andruhovski/apdf-tools
|
|
29
|
+
Project-URL: Issues, https://github.com/andruhovski/apdf-tools/issues
|
|
30
|
+
Project-URL: Repository, https://github.com/andruhovski/apdf-tools
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# APDF Cloud CLI + MCP Tools
|
|
34
|
+
|
|
35
|
+
APDF Cloud CLI exposes Aspose PDF Cloud storage and PDF operations through
|
|
36
|
+
both a command-line interface and an MCP server.
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
Install from PyPI:
|
|
41
|
+
|
|
42
|
+
```powershell
|
|
43
|
+
python -m pip install apdf-cloud-cli
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Check that the CLI is available:
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
apdf-cloud-cli --help
|
|
50
|
+
apdf --help
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
For local development from a checkout:
|
|
54
|
+
|
|
55
|
+
```powershell
|
|
56
|
+
python -m pip install -e ".[dev]"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Configuration
|
|
60
|
+
|
|
61
|
+
Set credentials before running CLI commands or the MCP server. The easiest
|
|
62
|
+
local setup path is:
|
|
63
|
+
|
|
64
|
+
```powershell
|
|
65
|
+
apdf auth login
|
|
66
|
+
apdf auth status
|
|
67
|
+
apdf auth test
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
You can also set credentials directly in your shell:
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
$env:ASPOSE_CLIENT_ID = "your-client-id"
|
|
74
|
+
$env:ASPOSE_CLIENT_SECRET = "your-client-secret"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Optional environment variables:
|
|
78
|
+
|
|
79
|
+
- `ASPOSE_STORAGE_NAME`: default Aspose storage name.
|
|
80
|
+
- `ASPOSE_BASE_URL`: alternate Aspose PDF Cloud base URL.
|
|
81
|
+
- `ASPOSE_SELF_HOST`: set to `1`, `true`, `yes`, or `on` for self-hosted use.
|
|
82
|
+
|
|
83
|
+
You can also create a local `.env` file. See
|
|
84
|
+
[`.env.example`](.env.example) for a template. Environment variables take
|
|
85
|
+
precedence over `.env` values.
|
|
86
|
+
|
|
87
|
+
## CLI Usage
|
|
88
|
+
|
|
89
|
+
The canonical executable is `apdf-cloud-cli`. A shorter `apdf` alias is
|
|
90
|
+
also installed for convenience.
|
|
91
|
+
|
|
92
|
+
```powershell
|
|
93
|
+
apdf-cloud-cli storage list /
|
|
94
|
+
apdf-cloud-cli auth status
|
|
95
|
+
apdf-cloud-cli auth test
|
|
96
|
+
apdf-cloud-cli storage upload .\sample.pdf /sample.pdf
|
|
97
|
+
apdf-cloud-cli storage download /sample.pdf .\sample.pdf
|
|
98
|
+
apdf-cloud-cli pdf merge /a.pdf /b.pdf merged.pdf
|
|
99
|
+
apdf-cloud-cli pdf extract-text sample.pdf --output sample.txt
|
|
100
|
+
apdf-cloud-cli mcp serve
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## MCP Usage
|
|
104
|
+
|
|
105
|
+
After installing the package, configure your MCP client to launch:
|
|
106
|
+
|
|
107
|
+
```powershell
|
|
108
|
+
apdf-cloud-cli mcp serve
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Codex MCP configuration examples are available in
|
|
112
|
+
[docs/mcp-config.md](docs/mcp-config.md), with a copy-pasteable helper at
|
|
113
|
+
[examples/codex-mcp-config.toml](examples/codex-mcp-config.toml).
|
|
114
|
+
|
|
115
|
+
## Codex Prompts
|
|
116
|
+
|
|
117
|
+
Sample prompts for using this MCP server with Codex are in
|
|
118
|
+
[docs/codex-prompts.md](docs/codex-prompts.md).
|
|
119
|
+
|
|
120
|
+
## Install as an Agent Skill
|
|
121
|
+
|
|
122
|
+
The package includes an `apdf-cloud-mcp` skill for Codex and Claude Code.
|
|
123
|
+
Install the package first, then install the bundled skill:
|
|
124
|
+
|
|
125
|
+
```powershell
|
|
126
|
+
python -m pip install apdf-cloud-cli
|
|
127
|
+
apdf-cloud-cli skill install codex
|
|
128
|
+
apdf-cloud-cli skill install claude-code
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
For Claude Code project-local installation:
|
|
132
|
+
|
|
133
|
+
```powershell
|
|
134
|
+
apdf-cloud-cli skill install claude-code --project
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Use `--force` to replace an existing installed copy. More details are in
|
|
138
|
+
[docs/agent-skill.md](docs/agent-skill.md).
|
|
139
|
+
|
|
140
|
+
## Development
|
|
141
|
+
|
|
142
|
+
Run the default unit test suite:
|
|
143
|
+
|
|
144
|
+
```powershell
|
|
145
|
+
python -m pytest -q
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Run live Aspose Cloud smoke tests only when you intentionally want to call
|
|
149
|
+
the real API:
|
|
150
|
+
|
|
151
|
+
```powershell
|
|
152
|
+
$env:ASPOSE_RUN_LIVE_TESTS = "1"
|
|
153
|
+
python -m pytest -q -m live
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
More live-test setup notes are in [docs/live-tests.md](docs/live-tests.md).
|
|
157
|
+
|
|
158
|
+
Build and validate the package distributions:
|
|
159
|
+
|
|
160
|
+
```powershell
|
|
161
|
+
python -m build
|
|
162
|
+
python -m twine check dist/*
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Security
|
|
166
|
+
|
|
167
|
+
Never commit real credentials. Keep `.env` local, prefer short-lived
|
|
168
|
+
environment variables in CI, and avoid pasting secrets into issue reports,
|
|
169
|
+
test output, logs, or prompts. See [docs/security.md](docs/security.md).
|
|
170
|
+
|
|
171
|
+
## Publishing
|
|
172
|
+
|
|
173
|
+
Publishing is handled by GitHub Actions with PyPI trusted publishing.
|
|
174
|
+
|
|
175
|
+
1. In PyPI, add a trusted publisher for repository
|
|
176
|
+
`andruhovski/apdf-tools`, workflow `publish.yml`, environment `pypi`,
|
|
177
|
+
and project name `apdf-cloud-cli`.
|
|
178
|
+
2. Update the version in `pyproject.toml` and
|
|
179
|
+
`src/apdf_cloud_cli/__init__.py`.
|
|
180
|
+
3. Push a matching version tag, for example:
|
|
181
|
+
|
|
182
|
+
```powershell
|
|
183
|
+
git tag v0.2.0
|
|
184
|
+
git push origin v0.2.0
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Stage 2 Roadmap
|
|
188
|
+
|
|
189
|
+
- Split PDF files
|
|
190
|
+
- Extract images from PDF files
|
|
191
|
+
- Extract tables from PDF files
|
|
192
|
+
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# APDF Cloud CLI + MCP Tools
|
|
2
|
+
|
|
3
|
+
APDF Cloud CLI exposes Aspose PDF Cloud storage and PDF operations through
|
|
4
|
+
both a command-line interface and an MCP server.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Install from PyPI:
|
|
9
|
+
|
|
10
|
+
```powershell
|
|
11
|
+
python -m pip install apdf-cloud-cli
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Check that the CLI is available:
|
|
15
|
+
|
|
16
|
+
```powershell
|
|
17
|
+
apdf-cloud-cli --help
|
|
18
|
+
apdf --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
For local development from a checkout:
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
python -m pip install -e ".[dev]"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Configuration
|
|
28
|
+
|
|
29
|
+
Set credentials before running CLI commands or the MCP server. The easiest
|
|
30
|
+
local setup path is:
|
|
31
|
+
|
|
32
|
+
```powershell
|
|
33
|
+
apdf auth login
|
|
34
|
+
apdf auth status
|
|
35
|
+
apdf auth test
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
You can also set credentials directly in your shell:
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
$env:ASPOSE_CLIENT_ID = "your-client-id"
|
|
42
|
+
$env:ASPOSE_CLIENT_SECRET = "your-client-secret"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Optional environment variables:
|
|
46
|
+
|
|
47
|
+
- `ASPOSE_STORAGE_NAME`: default Aspose storage name.
|
|
48
|
+
- `ASPOSE_BASE_URL`: alternate Aspose PDF Cloud base URL.
|
|
49
|
+
- `ASPOSE_SELF_HOST`: set to `1`, `true`, `yes`, or `on` for self-hosted use.
|
|
50
|
+
|
|
51
|
+
You can also create a local `.env` file. See
|
|
52
|
+
[`.env.example`](.env.example) for a template. Environment variables take
|
|
53
|
+
precedence over `.env` values.
|
|
54
|
+
|
|
55
|
+
## CLI Usage
|
|
56
|
+
|
|
57
|
+
The canonical executable is `apdf-cloud-cli`. A shorter `apdf` alias is
|
|
58
|
+
also installed for convenience.
|
|
59
|
+
|
|
60
|
+
```powershell
|
|
61
|
+
apdf-cloud-cli storage list /
|
|
62
|
+
apdf-cloud-cli auth status
|
|
63
|
+
apdf-cloud-cli auth test
|
|
64
|
+
apdf-cloud-cli storage upload .\sample.pdf /sample.pdf
|
|
65
|
+
apdf-cloud-cli storage download /sample.pdf .\sample.pdf
|
|
66
|
+
apdf-cloud-cli pdf merge /a.pdf /b.pdf merged.pdf
|
|
67
|
+
apdf-cloud-cli pdf extract-text sample.pdf --output sample.txt
|
|
68
|
+
apdf-cloud-cli mcp serve
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## MCP Usage
|
|
72
|
+
|
|
73
|
+
After installing the package, configure your MCP client to launch:
|
|
74
|
+
|
|
75
|
+
```powershell
|
|
76
|
+
apdf-cloud-cli mcp serve
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Codex MCP configuration examples are available in
|
|
80
|
+
[docs/mcp-config.md](docs/mcp-config.md), with a copy-pasteable helper at
|
|
81
|
+
[examples/codex-mcp-config.toml](examples/codex-mcp-config.toml).
|
|
82
|
+
|
|
83
|
+
## Codex Prompts
|
|
84
|
+
|
|
85
|
+
Sample prompts for using this MCP server with Codex are in
|
|
86
|
+
[docs/codex-prompts.md](docs/codex-prompts.md).
|
|
87
|
+
|
|
88
|
+
## Install as an Agent Skill
|
|
89
|
+
|
|
90
|
+
The package includes an `apdf-cloud-mcp` skill for Codex and Claude Code.
|
|
91
|
+
Install the package first, then install the bundled skill:
|
|
92
|
+
|
|
93
|
+
```powershell
|
|
94
|
+
python -m pip install apdf-cloud-cli
|
|
95
|
+
apdf-cloud-cli skill install codex
|
|
96
|
+
apdf-cloud-cli skill install claude-code
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For Claude Code project-local installation:
|
|
100
|
+
|
|
101
|
+
```powershell
|
|
102
|
+
apdf-cloud-cli skill install claude-code --project
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Use `--force` to replace an existing installed copy. More details are in
|
|
106
|
+
[docs/agent-skill.md](docs/agent-skill.md).
|
|
107
|
+
|
|
108
|
+
## Development
|
|
109
|
+
|
|
110
|
+
Run the default unit test suite:
|
|
111
|
+
|
|
112
|
+
```powershell
|
|
113
|
+
python -m pytest -q
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Run live Aspose Cloud smoke tests only when you intentionally want to call
|
|
117
|
+
the real API:
|
|
118
|
+
|
|
119
|
+
```powershell
|
|
120
|
+
$env:ASPOSE_RUN_LIVE_TESTS = "1"
|
|
121
|
+
python -m pytest -q -m live
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
More live-test setup notes are in [docs/live-tests.md](docs/live-tests.md).
|
|
125
|
+
|
|
126
|
+
Build and validate the package distributions:
|
|
127
|
+
|
|
128
|
+
```powershell
|
|
129
|
+
python -m build
|
|
130
|
+
python -m twine check dist/*
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Security
|
|
134
|
+
|
|
135
|
+
Never commit real credentials. Keep `.env` local, prefer short-lived
|
|
136
|
+
environment variables in CI, and avoid pasting secrets into issue reports,
|
|
137
|
+
test output, logs, or prompts. See [docs/security.md](docs/security.md).
|
|
138
|
+
|
|
139
|
+
## Publishing
|
|
140
|
+
|
|
141
|
+
Publishing is handled by GitHub Actions with PyPI trusted publishing.
|
|
142
|
+
|
|
143
|
+
1. In PyPI, add a trusted publisher for repository
|
|
144
|
+
`andruhovski/apdf-tools`, workflow `publish.yml`, environment `pypi`,
|
|
145
|
+
and project name `apdf-cloud-cli`.
|
|
146
|
+
2. Update the version in `pyproject.toml` and
|
|
147
|
+
`src/apdf_cloud_cli/__init__.py`.
|
|
148
|
+
3. Push a matching version tag, for example:
|
|
149
|
+
|
|
150
|
+
```powershell
|
|
151
|
+
git tag v0.2.0
|
|
152
|
+
git push origin v0.2.0
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Stage 2 Roadmap
|
|
156
|
+
|
|
157
|
+
- Split PDF files
|
|
158
|
+
- Extract images from PDF files
|
|
159
|
+
- Extract tables from PDF files
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "apdf-cloud-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "CLI and MCP server tools for Aspose PDF Cloud"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Andriy Andruhovski",email = "andruhovski@gmail.com"}
|
|
@@ -39,6 +39,11 @@ dev = [
|
|
|
39
39
|
apdf-cloud-cli = "apdf_cloud_cli.cli:main"
|
|
40
40
|
apdf = "apdf_cloud_cli.cli:main"
|
|
41
41
|
|
|
42
|
+
[tool.poetry]
|
|
43
|
+
include = [
|
|
44
|
+
{ path = "src/apdf_cloud_cli/resources/skills/apdf-cloud-mcp/**/*", format = ["sdist", "wheel"] },
|
|
45
|
+
]
|
|
46
|
+
|
|
42
47
|
[project.urls]
|
|
43
48
|
Homepage = "https://github.com/andruhovski/apdf-tools"
|
|
44
49
|
Repository = "https://github.com/andruhovski/apdf-tools"
|