# How to Find the List of Supported LLM Models in llmfit: JSON Database and CLI Access

> Easily find supported LLM models in llmfit. Access the complete list via the JSON database or the simple llmfit list CLI command.

- Repository: [Alex Jones/llmfit](https://github.com/AlexsJones/llmfit)
- Tags: how-to-guide
- Published: 2026-08-22

---

**The complete list of supported LLM models in llmfit is stored as an embedded JSON file at [`llmfit-core/data/hf_models.json`](https://github.com/AlexsJones/llmfit/blob/main/llmfit-core/data/hf_models.json), which is accessible via the `llmfit list` CLI command or programmatically through the `ModelDatabase` struct.**

The `llmfit` project by AlexsJones maintains a curated catalog of large language models optimized for local deployment. Understanding where this **list of supported LLM models in llmfit** is stored—and how to query it—enables users to verify hardware compatibility and allows developers to extend the database programmatically.

## JSON Database Location and Structure

The primary storage for model metadata is the file **[`llmfit-core/data/hf_models.json`](https://github.com/AlexsJones/llmfit/blob/main/llmfit-core/data/hf_models.json)**. This file contains a JSON array where each element describes a specific model, including fields for name, provider, parameter count, RAM/VRAM requirements, quantization options, and context length.

During compilation, this data is embedded directly into the binary via Rust's `include_str!` macro. In **[`llmfit-core/src/models.rs`](https://github.com/AlexsJones/llmfit/blob/main/llmfit-core/src/models.rs)**, the constant `HF_MODELS_JSON` captures the entire file content as a string literal:

```rust
const HF_MODELS_JSON: &str = include_str!("../data/hf_models.json");

```

This embedding strategy ensures the **supported LLM models list** ships with the executable and requires no external data files at runtime.

### Parsing the Embedded Catalog

The `ModelDatabase` struct provides the primary interface for accessing this data. The `new()` method deserializes the embedded JSON string using `serde_json::from_str`:

```rust
use llmfit_core::models::ModelDatabase;

let db = ModelDatabase::new()?;  // Parses HF_MODELS_JSON internally
let models = db.models();        // Returns Vec<ModelInfo>

```

## Accessing Models via Command Line

For end users, the **`llmfit list`** command displays the embedded catalog without requiring any code. This command reads the same `HF_MODELS_JSON` constant and renders a formatted table to stdout.

```bash

# View all supported models using cargo

cargo run -- list

# Or using the installed binary

llmfit list

```

The output displays model names, providers, parameter counts, and minimum hardware requirements, allowing you to verify GPU and RAM compatibility before initiating a download.

## Programmatic Access in Rust

Developers integrating `llmfit-core` as a library can iterate over the model database to filter capabilities or analyze available LLMs:

```rust
use llmfit_core::models::ModelDatabase;

let db = ModelDatabase::new()?;
for model in db.models() {
    println!("{} – Min RAM: {:.1} GB", model.name, model.min_ram_gb);
}

```

This approach leverages the same embedded [`hf_models.json`](https://github.com/AlexsJones/llmfit/blob/main/hf_models.json) source consumed by the CLI, ensuring consistency across interfaces.

## Updating the Model Catalog

The JSON file is not intended for manual editing. Instead, the repository includes **[`scripts/scrape_hf_models.py`](https://github.com/AlexsJones/llmfit/blob/main/scripts/scrape_hf_models.py)**, a Python scraper that regenerates [`hf_models.json`](https://github.com/AlexsJones/llmfit/blob/main/hf_models.json) from Hugging Face sources.

To add new models or refresh existing metadata:

```bash
python3 scripts/scrape_hf_models.py
cargo build

```

This workflow pulls fresh metadata, re-embeds the data via the `HF_MODELS_JSON` constant, and recompiles the binary with the updated **list of supported LLM models**.

## Summary

- The canonical **list of supported LLM models in llmfit** resides in **[`llmfit-core/data/hf_models.json`](https://github.com/AlexsJones/llmfit/blob/main/llmfit-core/data/hf_models.json)**
- The file is embedded at compile time via the `HF_MODELS_JSON` constant in **[`llmfit-core/src/models.rs`](https://github.com/AlexsJones/llmfit/blob/main/llmfit-core/src/models.rs)**
- Access the catalog using the **`llmfit list`** CLI command or the **`ModelDatabase::new()`** Rust API
- Regenerate the catalog by running **[`scripts/scrape_hf_models.py`](https://github.com/AlexsJones/llmfit/blob/main/scripts/scrape_hf_models.py)** before rebuilding

## Frequently Asked Questions

### Where is the llmfit model database file located in the repository?

The database file is located at **[`llmfit-core/data/hf_models.json`](https://github.com/AlexsJones/llmfit/blob/main/llmfit-core/data/hf_models.json)** in the AlexsJones/llmfit repository. This JSON file contains an array of model metadata objects specifying hardware requirements, quantization levels, and context lengths for each supported LLM.

### How does llmfit access the model list without external file dependencies?

The project uses Rust's `include_str!` macro to embed [`hf_models.json`](https://github.com/AlexsJones/llmfit/blob/main/hf_models.json) directly into the binary at compile time. The **`HF_MODELS_JSON`** constant in [`llmfit-core/src/models.rs`](https://github.com/AlexsJones/llmfit/blob/main/llmfit-core/src/models.rs) holds the file contents as a static string, allowing **`ModelDatabase::new()`** to parse it internally without runtime file I/O operations.

### Can I view supported models without writing Rust code?

Yes. Install or build the `llmfit` binary and execute the **`llmfit list`** command. This displays all supported models in a terminal-formatted table, reading from the same embedded JSON catalog used by the core library.

### How do I add a new LLM to the llmfit database?

Run **`python3 scripts/scrape_hf_models.py`** to regenerate the JSON catalog from Hugging Face sources, then rebuild the project with **`cargo build`**. The new model data will be embedded into the binary via `HF_MODELS_JSON` and immediately available through both the CLI and programmatic APIs.