Prototype ApherisFold CLI for Hub-backed customer demos.
Project description
ApherisFold CLI
This package contains the prototype customer-facing ApherisFold CLI for Hub prediction, benchmark, and fine-tuning demos.
Development
Use a project-local venv. Conda can coexist, but it should not be the primary
workflow for this CLI.
Bootstrap from the repository root:
task cli:bootstrap
That creates cli/.venv, installs the package in editable mode, and installs a
user-level shim at ~/.local/bin/apherisfold.
Running The CLI
The most reliable option, especially in mixed shell or Conda setups, is direct binary invocation:
cd cli
./.venv/bin/apherisfold --help
If ~/.local/bin is on PATH, task cli:bootstrap also enables:
apherisfold --help
Shell activation may work too, but it is optional and not the primary recommendation.
Usage
apherisfold --help
apherisfold login --profile apheris
apherisfold login --profile apheris-integ
apherisfold login --profile apheris-staging
apherisfold login --url https://hub.example.com
apherisfold login --url https://hub.example.com --callback-host localhost
apherisfold login status
apherisfold workflow list
apherisfold workflow list --status done --weight 3.0.0
apherisfold workflow list --workflow predict --tag smoke --id job_NUly
apherisfold workflow list --limit 50
apherisfold workflow list --limit -1
apherisfold --verbose=true workflow list
apherisfold workflow list --json
apherisfold workflow predict run --help
apherisfold workflow predict run --model openfold3 --weight 3.0.0 --output ./out --input ./request.json
apherisfold workflow predict run --model openfold3 --weight 3.0.0 --output ./out --input ./request.json --tag smoke --tag benchmark
apherisfold workflow predict run --model openfold3 --weight 3.0.0 --output ./out --input ./request.json --wait=true --result-view files
apherisfold workflow predict list
apherisfold workflow predict list --status done --tag smoke
apherisfold workflow predict list --limit 10
apherisfold workflow predict get --id job_NUlyMsnWq
apherisfold workflow benchmark run --model openfold3 --weight 3.0.0 --name "Baseline eval" --output ./out --input prediction_1.cif
apherisfold workflow benchmark run --model openfold3 --weight 3.0.0 --name "Baseline eval" --output ./out --input ./benchmark-inputs
apherisfold workflow benchmark list
apherisfold workflow benchmark list --status done --weight 3.0.0
apherisfold workflow benchmark get --id benchmark_abc123
apherisfold workflow fine-tune prepare --model openfold3 --weight 3.0.0 --name "Ligand tuning" --output ./out --training train_1.cif --training train_2.cif --validation validation.cif
apherisfold workflow fine-tune prepare --model openfold3 --weight 3.0.0 --name "Ligand tuning" --output ./out --training train.cif --validation validation.cif --hyper-params @fine-tune-params.json
apherisfold workflow fine-tune prepare --model openfold3 --weight 3.0.0 --name "Ligand tuning" --output ./out --training train.cif --validation validation.cif --batch-size 32 --learning-rate 0.0003 --maximum-training-time 86400
apherisfold workflow fine-tune run --id finetune_abc123
apherisfold workflow fine-tune list
apherisfold workflow fine-tune list --status running --name "FT Mock E2E"
apherisfold workflow fine-tune get --id finetune_abc123
apherisfold workflow fine-tune download-weight --id finetune_abc123 --step 16
apherisfold workflow fine-tune download-weight --id finetune_abc123 --step 16 --output ./weights/
apherisfold workflow fine-tune deploy-weight --id finetune_abc123 --step 16
apherisfold workflow fine-tune continue --id finetune_abc123 --duration 3600
apherisfold weights list
apherisfold weights list --model openfold3
apherisfold weights list --json
apherisfold --overwrite=true workflow predict run --model openfold3 --weight 3.0.0 --output ./out --input ./request.json
apherisfold --overwrite=true workflow predict download-result --id job_NUlyMsnWq --output ./job_NUlyMsnWq-results
apherisfold --overwrite=true workflow predict download-result --id job_NUlyMsnWq --output ./job_NUlyMsnWq-results --show
apherisfold --overwrite=true workflow benchmark download-result --id benchmark_abc123 --output ./benchmark_abc123-results
Smoke Test Files
The repository includes ready-to-run examples under
cli/examples/smoke:
request-minimal.json: smallest useful protein-only requestrequest-protein-ligand.json: protein + ligand request based on Hub/UI demorequest-multi-query.json: two queries in one input fileprotein_ligand.a3m,multimer_a.a3m,multimer_b.a3m: sample repeatable assetsmodel-params.json: fallback payload for--model-params @...input.cif: real ubiquitin ModelCIF matchingrequest-minimal.json
Example commands:
cd cli
./.venv/bin/apherisfold workflow predict run \
--model openfold3 \
--output ./out-minimal \
--weight 3.0.0 \
--input ./examples/smoke/request-minimal.json
./.venv/bin/apherisfold workflow predict run \
--model openfold3 \
--output ./out-ligand \
--weight 3.0.0 \
--input ./examples/smoke/request-protein-ligand.json \
--tag smoke \
--tag ligand \
--asset ./examples/smoke/protein_ligand.a3m \
--diffusion-samples 5 \
--seed 42
./.venv/bin/apherisfold workflow predict run \
--model openfold3 \
--output ./out-model-params \
--weight 3.0.0 \
--input ./examples/smoke/request-multi-query.json \
--asset ./examples/smoke/multimer_a.a3m \
--asset ./examples/smoke/multimer_b.a3m \
--model-params @./examples/smoke/model-params.json
./.venv/bin/apherisfold workflow predict run \
--model openfold3 \
--output ./out-cif \
--weight 3.0.0 \
--input ./examples/smoke/input.cif
Notes
-
The current implementation is the
EN-5932prototype milestone. -
weights listqueries the HubGET /api/v1/models/installedendpoint using the saved CLI login session. -
workflow predict runfollows the same Hub submission path as the UI: it creates an input, uploads assets, and submitsPOST /api/v1/requests. -
Prediction and benchmark execution is centered on
workflow <workflow> run. Fine-tuning usesworkflow fine-tune preparefollowed byworkflow fine-tune run --id <id>so the uploaded dataset can be confirmed before training begins. -
loginaccepts either--urlfor an explicit Hub base URL or--profilefor a built-in target. The current built-in profiles areapheris, which points athttps://try.fold.apheris.netand uses runtime config fromhttps://try.fold.apheris.net/config.json,apheris-integ, which points athttps://hub.integration.apheris.netand uses runtime config fromhttps://hub.integration.apheris.net/config.json, andapheris-staging, which points athttps://hub.staging.apheris.netand uses runtime config fromhttps://hub.staging.apheris.net/config.json. -
loginuses a local PKCE callback athttp://127.0.0.1:8765/callbackby default. Use--callback-hostwhen you need the same loopback flow on a different host name such aslocalhost. -
weights listexposes installed weights in a singleMODEL | MODEL VERSION | WEIGHTtable and also supports--jsonfor machine-readable discovery. -
--model-versionis optional when only one installed version is available for the chosen model. When--modelis provided, the CLI accepts either the full<model>:<version>form or just the version suffix. -
The top-level command surface is
workflow,weights,login, andlogout. -
workflow listshows submitted Hub workflow runs across predict, benchmark, and fine-tune. It renders sectioned Rich tables for filters and runs. -
The default run table hides model and model version/build IDs. Use
--verbose=true workflow listwhen you need theMODELandVERSIONcolumns. -
workflow listsupports one filter per displayed column:--id,--workflow,--model,--weight,--tag,--created-at, and--status. Repeat filters to match multiple values. -
Run list filters are applied across the full returned run list before the row limit is applied. The default output shows the latest 30 matching rows. Use
--limitto change the row count, and--limit -1to show all matching runs. -
workflow predict list,workflow benchmark list, andworkflow fine-tune listfilter the submitted run table to one workflow and accept the same model, weight, created-at, status, and id filters. Predict uses--tag; benchmark and fine-tune use--name(--tagremains accepted as a compatibility alias). -
workflow predict get --id <job-id>,workflow benchmark get --id <id>, andworkflow fine-tune get --id <id>show stored Hub metadata for one run. Add--jsonto return the full Hub detail payload alongside the CLI summary. -
workflow fine-tune preparecreates the Hub fine-tune job, uploads repeated--trainingand--validationCIF/mmCIF files, writesresult.json, and prints theworkflow fine-tune run --id <id>command to run next. -
Fine-tune model settings are discovered from the wrapper schema used by the UI. Defaults are applied automatically, and schema properties are available as CLI flags by kebab-case name, for example
--batch-size 32. Use--hyper-params @fine-tune-params.jsonfor a raw HubhyperParamsobject:{ "maximum_training_time": 86400, "batch_size": 32, "learning_rate": 0.0003, "warmup_steps": 50, "num_gradient_steps_per_epoch": 16, "training_seed": 42, "data_seed": 42, "precision": "bf16", "crop_size": 384, "ema_decay": 0.99, "metric_to_monitor": "lddt_inter_protein_ligand", "save_top_k": -1 }
Values from
--hyper-paramsoverride schema defaults, and explicit flags such as--batch-size 32override the JSON file. -
workflow fine-tune get --id <id>renders the same three LDDT result groups as the UI: Protein-Ligand, Inter-Chain Protein, and Intra-Protein. Add--jsonfor the machine-readable detail and result payload. -
workflow fine-tune download-weight --id <id> --step <n>resolves the persisted weight from the selected gradient step and downloads it locally. The default file name includes the fine-tune id and step, and--outputaccepts either a target file or a directory. -
workflow fine-tune deploy-weight --id <id> --step <n>resolves the same persisted weight and starts a deploy job. If--descriptionis omitted, the CLI generates<fine-tune name> step <n>. -
workflow fine-tune continue --id <id> --duration <seconds>continues a completed run for additional training time. -
workflow predict download-result --id <job-id> --output ./<job-id>-resultsdownloads predict outputs, extracts them locally, and writes a canonicalresult.jsonmanifest for the downloaded files. -
workflow benchmark download-result --id <id> --output ./<id>-resultsexports the benchmark jobs table, including child job ids, statuses, metrics, and errors, to one benchmark-levelresult.jsonmanifest. -
Add
--showtoworkflow predict download-resultwhen you want the downloaded payload printed directly in the terminal as well as written to disk. -
workflow <workflow> run --helpshows available run flags, examples, and selector guidance for predict and benchmark. For fine-tuning, useworkflow fine-tune prepare --help. -
Each workflow validates task-required options before execution and prints the available weight choices inline when
--weightis missing or invalid. -
Every workflow help view includes example commands, and task metadata is expected to carry examples as part of the CLI contract.
-
Reserved global flags such as
--config,--dry-run,--overwrite, and--resumeare shown in workflow help from the same metadata source. -
--output,--model, and--weightare explicit required workflow inputs.--outputmust point to an empty directory unless--overwrite=trueis supplied. -
For
openfold predict,--inputis standardized as the primary input flag. The current prototype accepts file paths only and infers mode from the file extension:.jsonmeans Hub-stylerequestParams,.cifmeans CIF-start prediction setup. -
workflow predict runwrites submission metadata toresult.jsonand returns after the Hub request is created by default. With--wait=true, it polls the job, downloads the resulting files, and rewritesresult.jsonas the canonical machine result containing both predicted structures and meta JSON. -
--result-view full|filescontrols whether downloaded predict outputs are embedded inresult.jsonor represented by file paths only. -
Failed predict jobs now surface the request
statefield directly inworkflow predict get --id <job-id>, with escaped wrapper JSON cleaned up for terminal readability when Hub persists that detail. -
MSA assets are optional in the CLI surface, matching Hub behavior when MSA server usage is enabled. Use
--asset file.a3monly when you want to supply precomputed alignment files explicitly. The option is repeatable for multiple assets. -
--tagis repeatable for predict submissions. Query IDs from the input JSON are always appended to the submitted tags so CLI-created jobs match the UI tag behavior. When the input is a CIF, the default tag remains the file stem. -
For weights that support affinity, the CLI automatically runs affinity prediction. When a query has exactly one ligand chain it is selected automatically. Pass
--affinity-ligand <chain-id>when a query contains multiple ligand chains to specify which one to use for affinity scoring. Queries without any ligand chain run as normal structure predictions. -
--model-paramsaccepts raw Hub-style JSON, while flags like--diffusion-samplesand--seedremain convenience overrides for common settings.--use-msaand--use-templateare available as Protenix-specific convenience flags. -
There is no separate
moduleabstraction in the prototype surface. -
Only workflow commands write artifacts; listing commands print directly to the terminal.
-
Predict and benchmark execution happens via
apherisfold workflow <workflow> run, with explicit--modeland--weightparameters matching the current Hub weight picker UX. Fine-tune usesprepareandrunbecause the Hub flow has a dataset upload phase before training starts. -
workflow benchmark runuses--input, mirroring predict. It accepts repeated CIF/mmCIF files or a directory containing CIF/mmCIF files and auto-detects matching.a3mfiles next to each structure. -
The current
.cifinput path is a mocked CIF-to-query conversion path so the prototype can exercise the intended CLI UX before real Hub integration lands. -
The CLI is intentionally minimal and customer-facing.
-
Foundry RFCs are treated as an internal compatibility constraint, not as user-facing product vocabulary.
-
Packaging is standard Python packaging: editable install for development, wheel/sdist for build artifacts, and
pipxas the preferred future end-user install target.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 apherisfold_cli-0.1.6-py3-none-any.whl.
File metadata
- Download URL: apherisfold_cli-0.1.6-py3-none-any.whl
- Upload date:
- Size: 80.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b52a18cee0d82a7f5939b6971c1a3c2d432d175efa3ece8b0b3ce13767f1d38
|
|
| MD5 |
47c8c33cf0156bd1deb3ad08be29d538
|
|
| BLAKE2b-256 |
1c9e3cb9b45729339186a3f080c4ab84dbc931b92019933b3ec826c89258230e
|
Provenance
The following attestation bundles were made for apherisfold_cli-0.1.6-py3-none-any.whl:
Publisher:
publish-apherisfold-pypi.yaml on apheris/hub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apherisfold_cli-0.1.6-py3-none-any.whl -
Subject digest:
6b52a18cee0d82a7f5939b6971c1a3c2d432d175efa3ece8b0b3ce13767f1d38 - Sigstore transparency entry: 1969285594
- Sigstore integration time:
-
Permalink:
apheris/hub@e1fd333c4eee6a241764e1e37256145e7199efab -
Branch / Tag:
refs/pull/2387/merge - Owner: https://github.com/apheris
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-apherisfold-pypi.yaml@e1fd333c4eee6a241764e1e37256145e7199efab -
Trigger Event:
pull_request
-
Statement type: