|
Entropic 2.3.8
Local-first agentic inference engine
|
entropic download subcommand — fetch GGUF models to the canonical install path.
More...
#include <entropic/config/bundled_models.h>#include <cstdio>#include <cstdlib>#include <cstring>#include <filesystem>#include <string>#include <sys/wait.h>#include <unistd.h>
Go to the source code of this file.
Classes | |
| struct | entropic::cli::DownloadArgs |
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Functions | |
| DownloadArgs | entropic::cli::parse_download_args (int argc, char *argv[]) |
Parse command-line args for entropic download. | |
| const entropic::config::BundledModelEntry * | entropic::cli::resolve_entry (const entropic::config::BundledModels ®istry, const std::string &key) |
| Resolve a registry entry by key with user-friendly error output. | |
| int | entropic::cli::fetch_to (const entropic::config::BundledModelEntry &entry, const std::filesystem::path &target_dir, const std::string &key) |
| Download one registry entry to a target directory. | |
| int | entropic::cli::fetch_mmproj_if_paired (const entropic::config::BundledModelEntry &entry, const entropic::config::BundledModels ®istry, const std::filesystem::path &target_dir) |
| Paired-mmproj follow-up fetch (gh#42, v2.1.8). | |
| int | entropic::cli::dispatch (const DownloadArgs &args, const entropic::config::BundledModels ®istry) |
Handle entropic download subcommand. | |
| int | entropic::cli::run_download (int argc, char *argv[]) |
Handle entropic download subcommand. | |
entropic download subcommand — fetch GGUF models to the canonical install path.
Simulates what the Python wheel's cli_download.py does, for tarball consumers who don't have pip. Shells out to curl — always present on Linux targets, avoids linking libcurl or an SSL backend into the main library.
Usage: entropic download <model-key> # e.g., entropic download primary entropic download –list # list available keys entropic download –dir DIR <key> # override target directory
Target: $ENTROPIC_MODEL_DIR → ~/.entropic/models → /opt/entropic/models (first writable; default ~/.entropic/models). Skips the download if the target file already exists and is non-empty, so reruns are cheap.
Definition in file download.cpp.
| int entropic::cli::dispatch | ( | const DownloadArgs & | args, |
| const entropic::config::BundledModels & | registry | ||
| ) |
Handle entropic download subcommand.
| argc | argc-like count starting at subcommand name. |
| argv | argv-like vector starting at subcommand name. |
Dispatch after args parsed + registry loaded. @utility
Definition at line 261 of file download.cpp.
| int entropic::cli::fetch_mmproj_if_paired | ( | const entropic::config::BundledModelEntry & | entry, |
| const entropic::config::BundledModels & | registry, | ||
| const std::filesystem::path & | target_dir | ||
| ) |
Paired-mmproj follow-up fetch (gh#42, v2.1.8).
If entry.mmproj_key names a registry entry, downloads it into the same target_dir as the base model. Best-effort: missing paired key returns 0 (text-only mode still works); a failed download propagates the curl exit code so the caller surfaces it.
| entry | Already-downloaded base model entry. |
| registry | Bundled models registry. |
| target_dir | Directory the base GGUF landed in. |
Definition at line 232 of file download.cpp.
| int entropic::cli::fetch_to | ( | const entropic::config::BundledModelEntry & | entry, |
| const std::filesystem::path & | target_dir, | ||
| const std::string & | key | ||
| ) |
Download one registry entry to a target directory.
@utility
Definition at line 180 of file download.cpp.
| DownloadArgs entropic::cli::parse_download_args | ( | int | argc, |
| char * | argv[] | ||
| ) |
Parse command-line args for entropic download.
@utility
Definition at line 128 of file download.cpp.
| const entropic::config::BundledModelEntry * entropic::cli::resolve_entry | ( | const entropic::config::BundledModels & | registry, |
| const std::string & | key | ||
| ) |
Resolve a registry entry by key with user-friendly error output.
@utility
Definition at line 154 of file download.cpp.
| int entropic::cli::run_download | ( | int | argc, |
| char * | argv[] | ||
| ) |
Handle entropic download subcommand.
| argc | argc-like count starting at subcommand name. |
| argv | argv-like vector starting at subcommand name. |
Definition at line 296 of file download.cpp.