apheris-foundry-cli 0.1.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.
Files changed (44) hide show
  1. apheris_foundry_cli-0.1.0/LICENSE +52 -0
  2. apheris_foundry_cli-0.1.0/PKG-INFO +184 -0
  3. apheris_foundry_cli-0.1.0/README.md +161 -0
  4. apheris_foundry_cli-0.1.0/pyproject.toml +51 -0
  5. apheris_foundry_cli-0.1.0/setup.cfg +4 -0
  6. apheris_foundry_cli-0.1.0/src/apheris_foundry_cli.egg-info/PKG-INFO +184 -0
  7. apheris_foundry_cli-0.1.0/src/apheris_foundry_cli.egg-info/SOURCES.txt +42 -0
  8. apheris_foundry_cli-0.1.0/src/apheris_foundry_cli.egg-info/dependency_links.txt +1 -0
  9. apheris_foundry_cli-0.1.0/src/apheris_foundry_cli.egg-info/entry_points.txt +2 -0
  10. apheris_foundry_cli-0.1.0/src/apheris_foundry_cli.egg-info/requires.txt +10 -0
  11. apheris_foundry_cli-0.1.0/src/apheris_foundry_cli.egg-info/top_level.txt +1 -0
  12. apheris_foundry_cli-0.1.0/src/apherisfold_cli/__init__.py +3 -0
  13. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/__init__.py +3 -0
  14. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/aqpotency.py +311 -0
  15. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/benchmark.py +466 -0
  16. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/fine_tune.py +866 -0
  17. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/foundry.py +2003 -0
  18. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/foundry_namespace.py +617 -0
  19. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/jobs.py +2340 -0
  20. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/login.py +407 -0
  21. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/predict.py +1152 -0
  22. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/weights.py +100 -0
  23. apheris_foundry_cli-0.1.0/src/apherisfold_cli/commands/workflow.py +1695 -0
  24. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/__init__.py +4 -0
  25. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/auth.py +1356 -0
  26. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/config.py +110 -0
  27. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/context.py +19 -0
  28. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/errors.py +39 -0
  29. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/hub_models.py +321 -0
  30. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/hub_requests.py +682 -0
  31. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/io.py +115 -0
  32. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/login_profiles.py +48 -0
  33. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/model_schema.py +202 -0
  34. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/msa_assets.py +375 -0
  35. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/predict_inputs.py +212 -0
  36. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/render.py +25 -0
  37. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/result_artifacts.py +209 -0
  38. apheris_foundry_cli-0.1.0/src/apherisfold_cli/core/workflow_catalog.py +390 -0
  39. apheris_foundry_cli-0.1.0/src/apherisfold_cli/handlers.py +98 -0
  40. apheris_foundry_cli-0.1.0/src/apherisfold_cli/main.py +125 -0
  41. apheris_foundry_cli-0.1.0/src/apherisfold_cli/version.py +1 -0
  42. apheris_foundry_cli-0.1.0/tests/test_auth.py +1235 -0
  43. apheris_foundry_cli-0.1.0/tests/test_cli.py +6351 -0
  44. apheris_foundry_cli-0.1.0/tests/test_hub_requests.py +113 -0
@@ -0,0 +1,52 @@
1
+ Apheris Foundry Software License
2
+ Copyright © 2025-2026 apheris AI GmbH, Kolonnenstr. 8, 10827 Berlin, Germany ("Licensor" or "Apheris"). All rights reserved.
3
+ Definitions:
4
+ "Software" means the Apheris Foundry software made available by Licensor to Licensee, in whole or in part and in any form of delivery, including the Foundry modules and container (e.g. Docker) images, the Foundry command-line interface (CLI), Python packages and wheel (.whl) distributions, workflow definitions and configuration files, the Foundry Hub orchestration service, and any accompanying libraries, scripts, skills, and documentation, together with any updates, patches, and new versions provided by Licensor.
5
+ "Commercial Agreement" means the order form, master subscription or services agreement, evaluation or design-partner agreement, memorandum of understanding, or other written agreement between Licensor and Licensee that governs Licensee's access to and use of the Software.
6
+ "Component" means any separately delivered part of the Software, for example an individual module image, the CLI, or a wheel file.
7
+ License Grant:
8
+ Subject to Licensee's compliance with this License and the Commercial Agreement, Licensor grants Licensee a non-exclusive, non-transferable, and non-sublicensable right to install, run, and use the Software for Licensee's internal business purposes, solely to the extent, for the term, in the scope, and against the fees (if any) set out in the Commercial Agreement.
9
+ Where the Commercial Agreement so provides, use may be granted free of charge, for example for evaluation, design-partner, or limited-time access. Free-of-charge use is not the default and applies only where expressly stated in writing by Licensor.
10
+ If no Commercial Agreement is in place, Licensee's use is limited to internal evaluation of Software lawfully obtained from Licensor, on a non-production and revocable basis, until a Commercial Agreement is concluded or access is withdrawn.
11
+ Restrictions:
12
+ Except as expressly permitted in the Commercial Agreement, Licensee shall not:
13
+ Redistribute, publish, sublicense, sell, rent, lease, or otherwise make the Software or any Component available to any third party, in whole or in part, with or without modification;
14
+ Pledge or encumber the rights granted under this License, or make them subject to any rights of third parties;
15
+ Reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code, model weights, or underlying structure of the Software, except to the extent this restriction cannot be excluded under applicable mandatory law;
16
+ Use the Software, its outputs, or any model weights to train, fine-tune, distil, or develop any model, product, or service that competes with Licensor's products or services, or attempt model extraction, model inversion, or membership-inference attacks against the Software or its models;
17
+ Modify, adapt, translate, or create derivative works of the Software, other than configuration expressly contemplated by the Software or permitted in the Commercial Agreement;
18
+ Remove, obscure, or alter any copyright, license, or other proprietary notice in or on the Software.
19
+ Licensee must reproduce and retain all copyright and ownership notices in all permitted copies or substantial portions of the Software. Licensee acknowledges that breach of these restrictions may cause Licensor irreparable harm for which monetary damages would be inadequate, and that Licensor is entitled to seek injunctive or other equitable relief in addition to any other remedy.
20
+ Notices and Delivery of this License:
21
+ This License governs each Component whether it is delivered together with the Component, embedded within it, or referenced by it. Licensor may include this License, or a short notice referring to it, within each Component, for example as a LICENSE file inside a container image or wheel package, as CLI output, or as accompanying documentation. The absence of a License file next to a given Component does not waive or limit this License.
22
+ Third-Party and Open-Source Components:
23
+ The Software may include third-party or open-source components licensed under their own terms. Those terms are set out in the applicable NOTICE or third-party license files delivered with the Software and govern those components. Nothing in this License limits Licensee's rights, or extends Licensor's rights, under those third-party terms.
24
+ Research and Non-Clinical Use:
25
+ The Software and its outputs are provided for internal research and development only. They are not a medical device and are not intended for diagnosis, treatment, or any use that requires regulatory clearance or approval. Outputs are predictions that may be inaccurate or incomplete, and Licensee is solely responsible for independently validating them before relying on them. Licensee is responsible for controlling how its users, and any agents or automated tools it operates, interact with the Software and with Licensee's own data, including any sensitive sequences or other confidential inputs.
26
+ Models, Weights, and Outputs:
27
+ Rights in any machine-learning models, model weights, and outputs made available through or produced using the Software are governed by the Commercial Agreement. Except as expressly stated there, this License grants no rights in any models, weights, or outputs.
28
+ Feedback:
29
+ Any suggestions, ideas, or other feedback that Licensee provides regarding the Software belong exclusively to Licensor. Licensee assigns to Licensor all rights in such feedback to the extent assignable and, to the extent any right cannot be assigned, grants Licensor a perpetual, irrevocable, worldwide, royalty-free license to use it without restriction and without obligation to Licensee.
30
+ Confidentiality:
31
+ The Software, including its non-public components, structure, and performance characteristics, is confidential information of Licensor. Licensee shall protect it with at least reasonable care, shall not disclose it to third parties, and shall use it only as permitted under this License and the Commercial Agreement. This obligation does not apply to information that is or becomes public through no fault of Licensee, or that Licensee is required to disclose by law or court order, provided that Licensee gives Licensor reasonable prior notice where lawful.
32
+ Compliance, Export Control, and Data Protection:
33
+ Licensee shall comply with all applicable export control and sanctions laws and shall not export, re-export, or use the Software in violation of them. Licensee represents that any data it inputs into the Software has been lawfully obtained and that its use of such data, including any personal data under the EU General Data Protection Regulation and other applicable data protection law, complies with applicable law.
34
+ No Transfer of Ownership:
35
+ This License does not convey any ownership in the Software. The Software, and all intellectual property rights in it, remain the sole and exclusive property of Licensor and its licensors. All rights not expressly granted are reserved.
36
+ Assignment:
37
+ Licensor may assign or transfer this License, in whole or in part, including in connection with a merger, acquisition, financing, or sale of assets. Licensee may not assign or transfer this License or any rights under it, whether by operation of law, change of control, or otherwise, without Licensor's prior written consent. Any purported assignment in violation of this section is void.
38
+ Term and Termination:
39
+ This License is effective until terminated and, where use is tied to a Commercial Agreement, runs co-terminously with that agreement. During the term of an active Commercial Agreement, Licensor will not terminate this License for convenience. Either party may terminate for cause on 30 days' written notice if the other materially breaches this License or the Commercial Agreement and fails to cure the breach within that period. Where no Commercial Agreement is in place, or for free-of-charge or evaluation use, either party may terminate at any time and Licensor may withdraw access at any time. On termination, all rights granted to Licensee end immediately, and Licensee shall cease all use of the Software and delete or destroy all copies in its possession or control, except for copies retained in routine backups or as required by applicable law, which remain subject to this License.
40
+ Disclaimer and Liability:
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL LICENSOR OR ITS AFFILIATES BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, EXCEPT IN CASE OF INTENT OR GROSS NEGLIGENCE OR IN CASE OF HARM TO LIFE, BODY, OR HEALTH.
42
+ In addition, the Licensor is liable for breaches of cardinal obligations, that is, essential duties whose fulfilment enables proper performance of this License and on which Licensee may reasonably rely. In cases of ordinary negligence, such liability is limited to foreseeable, typical damages at the time of conclusion. Indirect or consequential damages are compensable only if foreseeable when using the Software as intended. Any monetary limitation or cap on liability is as set out in the Commercial Agreement; where use is free of charge and no Commercial Agreement applies, Licensor's aggregate liability is limited to the maximum extent permitted by applicable law. Mandatory statutory liability, for example under product liability law, remains unaffected.
43
+ Survival:
44
+ Termination does not affect any provision that by its nature should survive, including Restrictions, Research and Non-Clinical Use, Models, Weights, and Outputs, Feedback, Confidentiality, Compliance, Export Control, and Data Protection, No Transfer of Ownership, Assignment, Disclaimer and Liability, Precedence, and Governing Law.
45
+ Precedence:
46
+ If there is a conflict between this License and the Commercial Agreement, the Commercial Agreement prevails to the extent of the conflict.
47
+ Severability:
48
+ If a provision of this License should be held invalid, this shall not affect the validity of the remaining provisions.
49
+ Governing Law:
50
+ This License shall be governed by and construed in accordance with the laws of the Federal Republic of Germany, without regard to its conflict of law principles.
51
+ For licensing inquiries, please contact support@apheris.com.
52
+
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: apheris-foundry-cli
3
+ Version: 0.1.0
4
+ Summary: Command-line interface for Apheris Foundry workflows.
5
+ Author: Apheris
6
+ License-Expression: LicenseRef-Apheris-Foundry-Software-License
7
+ Project-URL: Homepage, https://github.com/apheris/apheris-foundry-cli
8
+ Project-URL: License, https://www.apheris.com/docs/hub/hub-license.html
9
+ Project-URL: Repository, https://github.com/apheris/apheris-foundry-cli
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: jsonschema<5,>=4
14
+ Requires-Dist: rich>=13
15
+ Requires-Dist: truststore<1,>=0.10
16
+ Requires-Dist: typer<1,>=0.12
17
+ Provides-Extra: dev
18
+ Requires-Dist: build<2,>=1; extra == "dev"
19
+ Requires-Dist: pytest<10,>=9; extra == "dev"
20
+ Requires-Dist: ruff<1,>=0.9; extra == "dev"
21
+ Requires-Dist: wheel<1,>=0.45; extra == "dev"
22
+ Dynamic: license-file
23
+
24
+ # Apheris Foundry CLI
25
+
26
+ Command-line interface for submitting and managing prediction, benchmark, and fine-tuning workflows on an Apheris Foundry instance.
27
+
28
+ ## Requirements
29
+
30
+ - Python 3.10 or later
31
+ - Access to an Apheris Foundry instance
32
+
33
+ ## Installation
34
+
35
+ ### conda
36
+
37
+ Recommended if you already use conda for scientific Python work. A dedicated environment avoids dependency conflicts.
38
+
39
+ #### Linux / macOS
40
+
41
+ ```bash
42
+ conda create -n apherisfold python=3.11 -y
43
+ conda activate apherisfold
44
+ pip install apherisfold-cli
45
+ ```
46
+
47
+ #### Windows (Anaconda Prompt or PowerShell)
48
+
49
+ ```powershell
50
+ conda create -n apherisfold python=3.11 -y
51
+ conda activate apherisfold
52
+ pip install apherisfold-cli
53
+ ```
54
+
55
+ Activate the environment at the start of each session with `conda activate apherisfold`.
56
+
57
+ ### venv (standard Python)
58
+
59
+ #### Linux / macOS (venv)
60
+
61
+ ```bash
62
+ python3 -m venv ~/.venvs/apherisfold
63
+ source ~/.venvs/apherisfold/bin/activate
64
+ pip install apherisfold-cli
65
+ ```
66
+
67
+ #### Windows (PowerShell, venv)
68
+
69
+ ```powershell
70
+ python -m venv $env:USERPROFILE\.venvs\apherisfold
71
+ & $env:USERPROFILE\.venvs\apherisfold\Scripts\Activate.ps1
72
+ pip install apherisfold-cli
73
+ ```
74
+
75
+ Activate the environment at the start of each session with the `activate` command above.
76
+
77
+ ### Verify
78
+
79
+ ```bash
80
+ apherisfold --version
81
+ apherisfold --help
82
+ ```
83
+
84
+ ### Upgrade
85
+
86
+ ```bash
87
+ pip install --upgrade apherisfold-cli
88
+ ```
89
+
90
+ ## Quick start
91
+
92
+ ```bash
93
+ # Log in with your Apheris Foundry URL
94
+ apherisfold login --url https://hub.example.com
95
+
96
+ # See available models and weights
97
+ apherisfold weights list
98
+
99
+ # Submit a prediction
100
+ apherisfold workflow predict run \
101
+ --model openfold3 \
102
+ --weight 3.0.0 \
103
+ --input ./request.json
104
+
105
+ # By default, local artifacts are written under ./.apherisfold/runs/<workflow>/<id>
106
+ # relative to the directory where you run the command. Use --output to choose another directory.
107
+
108
+ # List submitted jobs
109
+ apherisfold workflow predict list
110
+
111
+ # Inspect a job
112
+ apherisfold workflow predict get --id job_NUlyMsnWq
113
+
114
+ # Print diagnostics, or save them under ./.apherisfold/runs/predict/<job-id>/logs
115
+ apherisfold workflow predict logs --id job_NUlyMsnWq
116
+ apherisfold workflow predict logs --id job_NUlyMsnWq --save
117
+ apherisfold workflow predict error --id job_NUlyMsnWq --output ./diagnostics
118
+ ```
119
+
120
+ ## Workflows
121
+
122
+ | Workflow | Entry point |
123
+ | -------------------- | --------------------------------------------- |
124
+ | Structure prediction | `apherisfold workflow predict run` |
125
+ | Benchmarking | `apherisfold workflow benchmark run` |
126
+ | Fine-tuning | `apherisfold workflow fine-tune prepare` |
127
+
128
+ ### Affinity prediction
129
+
130
+ When using weights that support affinity prediction, the CLI selects the ligand chain automatically if there is only one. For queries with multiple ligand chains, specify which one to score with `--affinity-ligand`:
131
+
132
+ ```bash
133
+ apherisfold workflow predict run \
134
+ --model openfold3 \
135
+ --weight 3.0.0 \
136
+ --input ./request.json \
137
+ --affinity-ligand B
138
+ ```
139
+
140
+ ### Supplying MSAs
141
+
142
+ Pass precomputed alignments with `--asset`. A3Ms are matched to structure chains **by
143
+ sequence** (an `X` in the MSA sequence acts as a wildcard), so filenames need not match the
144
+ structure. Supply one A3M per chain — a single A3M matching several identical chains (for
145
+ example a homomultimer) is applied to all of them. Chains without a supplied match fall back
146
+ to automatic MSA generation, and the CLI warns which chains that affects.
147
+
148
+ ```bash
149
+ # One A3M per chain, matched by sequence
150
+ apherisfold workflow predict run \
151
+ --model openfold3 --weight 3.0.0 \
152
+ --input ./complex.cif \
153
+ --asset ./chain-A.a3m --asset ./chain-B.a3m
154
+ ```
155
+
156
+ To disambiguate which structure an A3M belongs to, scope it with a `structureId=` prefix
157
+ (`queryId=` for predict). This narrows the candidate chains to that one structure:
158
+
159
+ ```bash
160
+ apherisfold workflow benchmark run \
161
+ --model openfold3 --weight 3.0.0 --name eval \
162
+ --input ./structures/ \
163
+ --asset alpha=./alpha-chain-A.a3m \
164
+ --asset alpha=./alpha-chain-B.a3m
165
+ ```
166
+
167
+ Resolved MSA-to-chain mappings are recorded in the run's `result.json`; benchmark runs also
168
+ print the mapping before submission.
169
+
170
+ Use `--help` on any subcommand for the full option reference and examples:
171
+
172
+ ```bash
173
+ apherisfold workflow predict run --help
174
+ apherisfold workflow benchmark run --help
175
+ apherisfold workflow fine-tune prepare --help
176
+ ```
177
+
178
+ ## License
179
+
180
+ This package is licensed under the [Apheris Foundry Software License](https://www.apheris.com/docs/hub/hub-license.html). The full license text is also included in every published wheel as `LICENSE`.
181
+
182
+ ## Support
183
+
184
+ Contact [support@apheris.com](mailto:support@apheris.com) for access and deployment assistance.
@@ -0,0 +1,161 @@
1
+ # Apheris Foundry CLI
2
+
3
+ Command-line interface for submitting and managing prediction, benchmark, and fine-tuning workflows on an Apheris Foundry instance.
4
+
5
+ ## Requirements
6
+
7
+ - Python 3.10 or later
8
+ - Access to an Apheris Foundry instance
9
+
10
+ ## Installation
11
+
12
+ ### conda
13
+
14
+ Recommended if you already use conda for scientific Python work. A dedicated environment avoids dependency conflicts.
15
+
16
+ #### Linux / macOS
17
+
18
+ ```bash
19
+ conda create -n apherisfold python=3.11 -y
20
+ conda activate apherisfold
21
+ pip install apherisfold-cli
22
+ ```
23
+
24
+ #### Windows (Anaconda Prompt or PowerShell)
25
+
26
+ ```powershell
27
+ conda create -n apherisfold python=3.11 -y
28
+ conda activate apherisfold
29
+ pip install apherisfold-cli
30
+ ```
31
+
32
+ Activate the environment at the start of each session with `conda activate apherisfold`.
33
+
34
+ ### venv (standard Python)
35
+
36
+ #### Linux / macOS (venv)
37
+
38
+ ```bash
39
+ python3 -m venv ~/.venvs/apherisfold
40
+ source ~/.venvs/apherisfold/bin/activate
41
+ pip install apherisfold-cli
42
+ ```
43
+
44
+ #### Windows (PowerShell, venv)
45
+
46
+ ```powershell
47
+ python -m venv $env:USERPROFILE\.venvs\apherisfold
48
+ & $env:USERPROFILE\.venvs\apherisfold\Scripts\Activate.ps1
49
+ pip install apherisfold-cli
50
+ ```
51
+
52
+ Activate the environment at the start of each session with the `activate` command above.
53
+
54
+ ### Verify
55
+
56
+ ```bash
57
+ apherisfold --version
58
+ apherisfold --help
59
+ ```
60
+
61
+ ### Upgrade
62
+
63
+ ```bash
64
+ pip install --upgrade apherisfold-cli
65
+ ```
66
+
67
+ ## Quick start
68
+
69
+ ```bash
70
+ # Log in with your Apheris Foundry URL
71
+ apherisfold login --url https://hub.example.com
72
+
73
+ # See available models and weights
74
+ apherisfold weights list
75
+
76
+ # Submit a prediction
77
+ apherisfold workflow predict run \
78
+ --model openfold3 \
79
+ --weight 3.0.0 \
80
+ --input ./request.json
81
+
82
+ # By default, local artifacts are written under ./.apherisfold/runs/<workflow>/<id>
83
+ # relative to the directory where you run the command. Use --output to choose another directory.
84
+
85
+ # List submitted jobs
86
+ apherisfold workflow predict list
87
+
88
+ # Inspect a job
89
+ apherisfold workflow predict get --id job_NUlyMsnWq
90
+
91
+ # Print diagnostics, or save them under ./.apherisfold/runs/predict/<job-id>/logs
92
+ apherisfold workflow predict logs --id job_NUlyMsnWq
93
+ apherisfold workflow predict logs --id job_NUlyMsnWq --save
94
+ apherisfold workflow predict error --id job_NUlyMsnWq --output ./diagnostics
95
+ ```
96
+
97
+ ## Workflows
98
+
99
+ | Workflow | Entry point |
100
+ | -------------------- | --------------------------------------------- |
101
+ | Structure prediction | `apherisfold workflow predict run` |
102
+ | Benchmarking | `apherisfold workflow benchmark run` |
103
+ | Fine-tuning | `apherisfold workflow fine-tune prepare` |
104
+
105
+ ### Affinity prediction
106
+
107
+ When using weights that support affinity prediction, the CLI selects the ligand chain automatically if there is only one. For queries with multiple ligand chains, specify which one to score with `--affinity-ligand`:
108
+
109
+ ```bash
110
+ apherisfold workflow predict run \
111
+ --model openfold3 \
112
+ --weight 3.0.0 \
113
+ --input ./request.json \
114
+ --affinity-ligand B
115
+ ```
116
+
117
+ ### Supplying MSAs
118
+
119
+ Pass precomputed alignments with `--asset`. A3Ms are matched to structure chains **by
120
+ sequence** (an `X` in the MSA sequence acts as a wildcard), so filenames need not match the
121
+ structure. Supply one A3M per chain — a single A3M matching several identical chains (for
122
+ example a homomultimer) is applied to all of them. Chains without a supplied match fall back
123
+ to automatic MSA generation, and the CLI warns which chains that affects.
124
+
125
+ ```bash
126
+ # One A3M per chain, matched by sequence
127
+ apherisfold workflow predict run \
128
+ --model openfold3 --weight 3.0.0 \
129
+ --input ./complex.cif \
130
+ --asset ./chain-A.a3m --asset ./chain-B.a3m
131
+ ```
132
+
133
+ To disambiguate which structure an A3M belongs to, scope it with a `structureId=` prefix
134
+ (`queryId=` for predict). This narrows the candidate chains to that one structure:
135
+
136
+ ```bash
137
+ apherisfold workflow benchmark run \
138
+ --model openfold3 --weight 3.0.0 --name eval \
139
+ --input ./structures/ \
140
+ --asset alpha=./alpha-chain-A.a3m \
141
+ --asset alpha=./alpha-chain-B.a3m
142
+ ```
143
+
144
+ Resolved MSA-to-chain mappings are recorded in the run's `result.json`; benchmark runs also
145
+ print the mapping before submission.
146
+
147
+ Use `--help` on any subcommand for the full option reference and examples:
148
+
149
+ ```bash
150
+ apherisfold workflow predict run --help
151
+ apherisfold workflow benchmark run --help
152
+ apherisfold workflow fine-tune prepare --help
153
+ ```
154
+
155
+ ## License
156
+
157
+ This package is licensed under the [Apheris Foundry Software License](https://www.apheris.com/docs/hub/hub-license.html). The full license text is also included in every published wheel as `LICENSE`.
158
+
159
+ ## Support
160
+
161
+ Contact [support@apheris.com](mailto:support@apheris.com) for access and deployment assistance.
@@ -0,0 +1,51 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "apheris-foundry-cli"
7
+ version = "0.1.0"
8
+ description = "Command-line interface for Apheris Foundry workflows."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [{ name = "Apheris" }]
12
+ license = "LicenseRef-Apheris-Foundry-Software-License"
13
+ license-files = ["LICENSE"]
14
+ dependencies = [
15
+ "jsonschema>=4,<5",
16
+ "rich>=13",
17
+ "truststore>=0.10,<1",
18
+ "typer>=0.12,<1",
19
+ ]
20
+
21
+ [project.optional-dependencies]
22
+ dev = ["build>=1,<2", "pytest>=9,<10", "ruff>=0.9,<1", "wheel>=0.45,<1"]
23
+
24
+ [project.scripts]
25
+ apheris-foundry = "apherisfold_cli.main:main"
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/apheris/apheris-foundry-cli"
29
+ License = "https://www.apheris.com/docs/hub/hub-license.html"
30
+ Repository = "https://github.com/apheris/apheris-foundry-cli"
31
+
32
+ [tool.setuptools]
33
+ package-dir = { "" = "src" }
34
+ include-package-data = true
35
+
36
+ [tool.setuptools.packages.find]
37
+ where = ["src"]
38
+
39
+ [tool.pytest.ini_options]
40
+ testpaths = ["tests"]
41
+
42
+ [tool.ruff]
43
+ line-length = 120
44
+ target-version = "py310"
45
+
46
+ [tool.ruff.lint]
47
+ select = ["E", "F", "W", "I", "UP"]
48
+ ignore = ["E203", "E501"]
49
+
50
+ [tool.ruff.lint.isort]
51
+ known-first-party = ["apherisfold_cli"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: apheris-foundry-cli
3
+ Version: 0.1.0
4
+ Summary: Command-line interface for Apheris Foundry workflows.
5
+ Author: Apheris
6
+ License-Expression: LicenseRef-Apheris-Foundry-Software-License
7
+ Project-URL: Homepage, https://github.com/apheris/apheris-foundry-cli
8
+ Project-URL: License, https://www.apheris.com/docs/hub/hub-license.html
9
+ Project-URL: Repository, https://github.com/apheris/apheris-foundry-cli
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: jsonschema<5,>=4
14
+ Requires-Dist: rich>=13
15
+ Requires-Dist: truststore<1,>=0.10
16
+ Requires-Dist: typer<1,>=0.12
17
+ Provides-Extra: dev
18
+ Requires-Dist: build<2,>=1; extra == "dev"
19
+ Requires-Dist: pytest<10,>=9; extra == "dev"
20
+ Requires-Dist: ruff<1,>=0.9; extra == "dev"
21
+ Requires-Dist: wheel<1,>=0.45; extra == "dev"
22
+ Dynamic: license-file
23
+
24
+ # Apheris Foundry CLI
25
+
26
+ Command-line interface for submitting and managing prediction, benchmark, and fine-tuning workflows on an Apheris Foundry instance.
27
+
28
+ ## Requirements
29
+
30
+ - Python 3.10 or later
31
+ - Access to an Apheris Foundry instance
32
+
33
+ ## Installation
34
+
35
+ ### conda
36
+
37
+ Recommended if you already use conda for scientific Python work. A dedicated environment avoids dependency conflicts.
38
+
39
+ #### Linux / macOS
40
+
41
+ ```bash
42
+ conda create -n apherisfold python=3.11 -y
43
+ conda activate apherisfold
44
+ pip install apherisfold-cli
45
+ ```
46
+
47
+ #### Windows (Anaconda Prompt or PowerShell)
48
+
49
+ ```powershell
50
+ conda create -n apherisfold python=3.11 -y
51
+ conda activate apherisfold
52
+ pip install apherisfold-cli
53
+ ```
54
+
55
+ Activate the environment at the start of each session with `conda activate apherisfold`.
56
+
57
+ ### venv (standard Python)
58
+
59
+ #### Linux / macOS (venv)
60
+
61
+ ```bash
62
+ python3 -m venv ~/.venvs/apherisfold
63
+ source ~/.venvs/apherisfold/bin/activate
64
+ pip install apherisfold-cli
65
+ ```
66
+
67
+ #### Windows (PowerShell, venv)
68
+
69
+ ```powershell
70
+ python -m venv $env:USERPROFILE\.venvs\apherisfold
71
+ & $env:USERPROFILE\.venvs\apherisfold\Scripts\Activate.ps1
72
+ pip install apherisfold-cli
73
+ ```
74
+
75
+ Activate the environment at the start of each session with the `activate` command above.
76
+
77
+ ### Verify
78
+
79
+ ```bash
80
+ apherisfold --version
81
+ apherisfold --help
82
+ ```
83
+
84
+ ### Upgrade
85
+
86
+ ```bash
87
+ pip install --upgrade apherisfold-cli
88
+ ```
89
+
90
+ ## Quick start
91
+
92
+ ```bash
93
+ # Log in with your Apheris Foundry URL
94
+ apherisfold login --url https://hub.example.com
95
+
96
+ # See available models and weights
97
+ apherisfold weights list
98
+
99
+ # Submit a prediction
100
+ apherisfold workflow predict run \
101
+ --model openfold3 \
102
+ --weight 3.0.0 \
103
+ --input ./request.json
104
+
105
+ # By default, local artifacts are written under ./.apherisfold/runs/<workflow>/<id>
106
+ # relative to the directory where you run the command. Use --output to choose another directory.
107
+
108
+ # List submitted jobs
109
+ apherisfold workflow predict list
110
+
111
+ # Inspect a job
112
+ apherisfold workflow predict get --id job_NUlyMsnWq
113
+
114
+ # Print diagnostics, or save them under ./.apherisfold/runs/predict/<job-id>/logs
115
+ apherisfold workflow predict logs --id job_NUlyMsnWq
116
+ apherisfold workflow predict logs --id job_NUlyMsnWq --save
117
+ apherisfold workflow predict error --id job_NUlyMsnWq --output ./diagnostics
118
+ ```
119
+
120
+ ## Workflows
121
+
122
+ | Workflow | Entry point |
123
+ | -------------------- | --------------------------------------------- |
124
+ | Structure prediction | `apherisfold workflow predict run` |
125
+ | Benchmarking | `apherisfold workflow benchmark run` |
126
+ | Fine-tuning | `apherisfold workflow fine-tune prepare` |
127
+
128
+ ### Affinity prediction
129
+
130
+ When using weights that support affinity prediction, the CLI selects the ligand chain automatically if there is only one. For queries with multiple ligand chains, specify which one to score with `--affinity-ligand`:
131
+
132
+ ```bash
133
+ apherisfold workflow predict run \
134
+ --model openfold3 \
135
+ --weight 3.0.0 \
136
+ --input ./request.json \
137
+ --affinity-ligand B
138
+ ```
139
+
140
+ ### Supplying MSAs
141
+
142
+ Pass precomputed alignments with `--asset`. A3Ms are matched to structure chains **by
143
+ sequence** (an `X` in the MSA sequence acts as a wildcard), so filenames need not match the
144
+ structure. Supply one A3M per chain — a single A3M matching several identical chains (for
145
+ example a homomultimer) is applied to all of them. Chains without a supplied match fall back
146
+ to automatic MSA generation, and the CLI warns which chains that affects.
147
+
148
+ ```bash
149
+ # One A3M per chain, matched by sequence
150
+ apherisfold workflow predict run \
151
+ --model openfold3 --weight 3.0.0 \
152
+ --input ./complex.cif \
153
+ --asset ./chain-A.a3m --asset ./chain-B.a3m
154
+ ```
155
+
156
+ To disambiguate which structure an A3M belongs to, scope it with a `structureId=` prefix
157
+ (`queryId=` for predict). This narrows the candidate chains to that one structure:
158
+
159
+ ```bash
160
+ apherisfold workflow benchmark run \
161
+ --model openfold3 --weight 3.0.0 --name eval \
162
+ --input ./structures/ \
163
+ --asset alpha=./alpha-chain-A.a3m \
164
+ --asset alpha=./alpha-chain-B.a3m
165
+ ```
166
+
167
+ Resolved MSA-to-chain mappings are recorded in the run's `result.json`; benchmark runs also
168
+ print the mapping before submission.
169
+
170
+ Use `--help` on any subcommand for the full option reference and examples:
171
+
172
+ ```bash
173
+ apherisfold workflow predict run --help
174
+ apherisfold workflow benchmark run --help
175
+ apherisfold workflow fine-tune prepare --help
176
+ ```
177
+
178
+ ## License
179
+
180
+ This package is licensed under the [Apheris Foundry Software License](https://www.apheris.com/docs/hub/hub-license.html). The full license text is also included in every published wheel as `LICENSE`.
181
+
182
+ ## Support
183
+
184
+ Contact [support@apheris.com](mailto:support@apheris.com) for access and deployment assistance.
@@ -0,0 +1,42 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/apheris_foundry_cli.egg-info/PKG-INFO
5
+ src/apheris_foundry_cli.egg-info/SOURCES.txt
6
+ src/apheris_foundry_cli.egg-info/dependency_links.txt
7
+ src/apheris_foundry_cli.egg-info/entry_points.txt
8
+ src/apheris_foundry_cli.egg-info/requires.txt
9
+ src/apheris_foundry_cli.egg-info/top_level.txt
10
+ src/apherisfold_cli/__init__.py
11
+ src/apherisfold_cli/handlers.py
12
+ src/apherisfold_cli/main.py
13
+ src/apherisfold_cli/version.py
14
+ src/apherisfold_cli/commands/__init__.py
15
+ src/apherisfold_cli/commands/aqpotency.py
16
+ src/apherisfold_cli/commands/benchmark.py
17
+ src/apherisfold_cli/commands/fine_tune.py
18
+ src/apherisfold_cli/commands/foundry.py
19
+ src/apherisfold_cli/commands/foundry_namespace.py
20
+ src/apherisfold_cli/commands/jobs.py
21
+ src/apherisfold_cli/commands/login.py
22
+ src/apherisfold_cli/commands/predict.py
23
+ src/apherisfold_cli/commands/weights.py
24
+ src/apherisfold_cli/commands/workflow.py
25
+ src/apherisfold_cli/core/__init__.py
26
+ src/apherisfold_cli/core/auth.py
27
+ src/apherisfold_cli/core/config.py
28
+ src/apherisfold_cli/core/context.py
29
+ src/apherisfold_cli/core/errors.py
30
+ src/apherisfold_cli/core/hub_models.py
31
+ src/apherisfold_cli/core/hub_requests.py
32
+ src/apherisfold_cli/core/io.py
33
+ src/apherisfold_cli/core/login_profiles.py
34
+ src/apherisfold_cli/core/model_schema.py
35
+ src/apherisfold_cli/core/msa_assets.py
36
+ src/apherisfold_cli/core/predict_inputs.py
37
+ src/apherisfold_cli/core/render.py
38
+ src/apherisfold_cli/core/result_artifacts.py
39
+ src/apherisfold_cli/core/workflow_catalog.py
40
+ tests/test_auth.py
41
+ tests/test_cli.py
42
+ tests/test_hub_requests.py