# Feast CLI reference
## Overview
The Feast CLI comes bundled with the Feast Python package. It is immediately available after [installing Feast](../how-to-guides/feast-snowflake-gcp-aws/install-feast.md).
```text
Usage: feast [OPTIONS] COMMAND [ARGS]...
Feast CLI
For more information, see our public docs at https://docs.feast.dev/
Options:
-c, --chdir TEXT Switch to a different feature repository directory before
executing the given subcommand.
--help Show this message and exit.
Commands:
apply Create or update a feature store deployment
configuration Display Feast configuration
delete Delete a Feast object from the registry
demo-notebooks Generate demo Jupyter notebooks for the project
entities Access entities
feature-views Access feature views
init Create a new Feast repository
materialize Run a (non-incremental) materialization job to...
materialize-incremental Run an incremental materialization job to ingest...
permissions Access permissions
registry Manage the feature registry
registry-dump Print contents of the metadata registry
teardown Tear down deployed feature store infrastructure
version Display Feast SDK version
```
## Global Options
The Feast CLI provides one global top-level option that can be used with other commands
**chdir \(-c, --chdir\)**
This command allows users to run Feast CLI commands in a different folder from the current working directory.
```text
feast -c path/to/my/feature/repo apply
```
## Apply
Creates or updates a feature store deployment
```bash
feast apply
```
**Options:**
* `--skip-source-validation`: Skip validation of data sources (don't check if tables exist)
* `--skip-feature-view-validation`: Skip validation of feature views. Use with caution as this skips important checks
```bash
# Skip only data source validation
feast apply --skip-source-validation
# Skip only feature view validation
feast apply --skip-feature-view-validation
# Skip both validations
feast apply --skip-source-validation --skip-feature-view-validation
```
**What does Feast apply do?**
1. Feast will scan Python files in your feature repository and find all Feast object definitions, such as feature views, entities, and data sources.
2. Feast will validate your feature definitions (e.g. for uniqueness of features). This validation can be skipped using the `--skip-feature-view-validation` flag if the type/validation system is being overly strict.
3. Feast will sync the metadata about Feast objects to the registry. If a registry does not exist, then it will be instantiated. The standard registry is a simple protobuf binary file that is stored on disk \(locally or in an object store\).
4. Feast CLI will create all necessary feature store infrastructure. The exact infrastructure that is deployed or configured depends on the `provider` configuration that you have set in `feature_store.yaml`. For example, setting `local` as your provider will result in a `sqlite` online store being created.
{% hint %}
The `--skip-feature-view-validation` flag is particularly useful for On-Demand Feature Views (ODFVs) with complex transformations that may fail validation. However, use it with caution and please report any validation issues to the Feast team on GitHub.
{% endhint %}
{% hint %}
`feast apply` \(when configured to use cloud provider like `gcp` or `aws`\) will create cloud infrastructure. This may incur costs.
{% endhint %}
{% hint %}
**Important:** `feast apply` only registers or updates objects found in your Python files. It does **not** delete objects that you've removed from your code. To delete objects from the registry, you must use the `feast delete` command or explicit delete methods in the Python SDK. See the [Delete command](#delete) below and the [Registry documentation](../getting-started/components/registry.md#deleting-objects-from-the-registry) for details.
{% endhint %}
## Configuration
Display the actual configuration being used by Feast, including both user-provided configurations and default configurations applied by Feast.
```bash
feast configuration
```
```yaml
project: foo
registry: data/registry.db
provider: local
online_store:
type: sqlite
path: data/online_store.db
offline_store:
type: dask
entity_key_serialization_version: 3
auth:
type: no_auth
```
## Delete
Delete a Feast object from the registry by its name.
```bash
feast delete
```
**What does feast delete do?**
The `feast delete` command removes a Feast object (such as a feature view, entity, data source, feature service, etc.) from the registry. The command will:
1. Search for the object by name across all object types (entities, feature views, feature services, data sources, saved datasets, validation references, etc.)
2. Delete the first matching object found
3. Remove any associated infrastructure
**Example:**
```bash
# Delete a feature view named "driver_hourly_stats"
feast delete driver_hourly_stats
# Delete an entity named "driver"
feast delete driver
```
{% hint %}
The delete operation is permanent and will remove the object from the registry. Make sure you want to delete the object before running this command.
{% endhint %}
{% hint %}
If multiple objects have the same name across different types, `feast delete` will delete the first one it finds. For programmatic deletion with more control, use the Python SDK methods like `store.delete_feature_view()`, `store.delete_feature_service()`, etc.
{% endhint %}
## Demo Notebooks
Generate tailored demo Jupyter notebooks for each Feast project found in the current directory.
```bash
feast demo-notebooks
```
The command searches for `feature_store.yaml` in the current directory and every file inside the `feast-config/` directory. Each file is treated as a separate project config, and notebooks are created under `./feast-demo-notebooks//`.
The generated notebooks adapt to your project configuration (online/offline store types, authentication, vector search) and cover:
* **Feature store overview** explore registered entities, feature views, and services.
* **Historical feature retrieval** build training datasets with point-in-time correct joins.
* **Online feature serving** materialize features and retrieve them at low latency.
**Options:**
* `-o, --output-dir` Directory where the notebooks are written. Default: `./feast-demo-notebooks`.
* `--overwrite` Overwrite existing notebooks if the output directory already exists.
```bash
feast demo-notebooks -o ./my-notebooks --overwrite
```
You can also use the `--chdir` global option to point at a different feature repository:
```bash
feast -c /path/to/feature_repo demo-notebooks
```
The same functionality is available via the Python SDK:
```python
from feast import copy_demo_notebooks
copy_demo_notebooks(output_dir="./feast-demo-notebooks", repo_path=".")
```
For more details see the [Demo Notebooks tutorial](../tutorials/demo-notebooks.md).
## Entities
List all registered entities
```text
feast entities list
Options:
--tags TEXT Filter by tags (e.g. --tags 'key:value' --tags 'key:value,
key:value, ...'). Items return when ALL tags match.
```
```text
NAME DESCRIPTION TYPE
driver_id driver id ValueType.INT64
```
## Feature views
List all registered feature views
```text
feast feature-views list
Options:
--tags TEXT Filter by tags (e.g. --tags 'key:value' --tags 'key:value,
key:value, ...'). Items return when ALL tags match.
```
```text
NAME ENTITIES TYPE
driver_hourly_stats {'driver'} FeatureView
```
List version history for a feature view
```text
feast feature-views list-versions FEATURE_VIEW_NAME
```
```text
VERSION TYPE CREATED VERSION_ID
v0 feature_view 2024-01-15 10:30:00 a1b2c3d4-...
v1 feature_view 2024-01-16 14:22:00 e5f6g7h8-...
```
## Init
Creates a new feature repository
```text
feast init my_repo_name
```
```text
Creating a new Feast repository in /projects/my_repo_name.
```
```text
.
data
driver_stats.parquet
example.py
feature_store.yaml
```
It's also possible to use other templates
```text
feast init -t gcp my_feature_repo
```
or to set the name of the new project
```text
feast init -t gcp my_feature_repo
```
## Materialize
Load data from feature views into the online store.
**With timestamps:**
```bash
feast materialize 2020-01-01T00:00:00 2022-01-01T00:00:00
```
**Without timestamps (uses current datetime):**
```bash
feast materialize --disable-event-timestamp
```
Load data for specific feature views:
```text
feast materialize -v driver_hourly_stats 2020-01-01T00:00:00 2022-01-01T00:00:00
```
```text
feast materialize --disable-event-timestamp -v driver_hourly_stats
```
The `--disable-event-timestamp` flag is useful when your source data lacks event timestamp columns, allowing you to materialize all available data using the current datetime as the event timestamp.
```text
Materializing 1 feature views from 2020-01-01 to 2022-01-01
driver_hourly_stats:
100%|| 5/5 [00:00 feast permissions check
The following resources are not secured by any permission configuration:
NAME TYPE
driver Entity
driver_hourly_stats_fresh FeatureView
The following actions are not secured by any permission configuration (Note: this might not be a security concern, depending on the used APIs):
NAME TYPE UNSECURED ACTIONS
driver Entity CREATE
DESCRIBE
UPDATE
DELETE
READ_ONLINE
READ_OFFLINE
WRITE_ONLINE
WRITE_OFFLINE
driver_hourly_stats_fresh FeatureView CREATE
DESCRIBE
UPDATE
DELETE
READ_ONLINE
READ_OFFLINE
WRITE_ONLINE
WRITE_OFFLINE
Based on the above results, the administrator can reassess the permissions configuration and make any necessary adjustments to meet their security requirements.
If no resources are accessible publicly, the permissions check command will return the following response:
> feast permissions check
The following resources are not secured by any permission configuration:
NAME TYPE
The following actions are not secured by any permission configuration (Note: this might not be a security concern, depending on the used APIs):
NAME TYPE UNSECURED ACTIONS
```
### List of the configured roles
List all the configured roles
```text
feast permissions list-roles
Options:
--verbose Print the resources and actions permitted to each configured
role
```
```text
ROLE NAME
admin
reader
writer
```
`verbose` option describes the resources and actions permitted to each managed role:
```text
feast permissions list-roles -v
```
```text
ROLE NAME RESOURCE NAME RESOURCE TYPE PERMITTED ACTIONS
admin driver_hourly_stats_source FileSource CREATE
DELETE
QUERY_OFFLINE
QUERY_ONLINE
DESCRIBE
UPDATE
admin vals_to_add RequestSource CREATE
DELETE
QUERY_OFFLINE
QUERY_ONLINE
DESCRIBE
UPDATE
admin driver_stats_push_source PushSource CREATE
DELETE
QUERY_OFFLINE
QUERY_ONLINE
DESCRIBE
UPDATE
admin driver_hourly_stats_source FileSource CREATE
DELETE
QUERY_OFFLINE
QUERY_ONLINE
DESCRIBE
UPDATE
admin vals_to_add RequestSource CREATE
DELETE
QUERY_OFFLINE
QUERY_ONLINE
DESCRIBE
UPDATE
admin driver_stats_push_source PushSource CREATE
DELETE
QUERY_OFFLINE
QUERY_ONLINE
DESCRIBE
UPDATE
reader driver_hourly_stats FeatureView DESCRIBE
reader driver_hourly_stats_fresh FeatureView DESCRIBE
...
```
## Registry
### create-schema
Pre-create the SQL registry schema so the application does not need DDL privileges at runtime. Use this with `schema_mode: verify` or `schema_mode: skip` in your `feature_store.yaml`.
```text
feast registry create-schema
```
This command only applies to SQL-based registries (`registry_type: sql`). It is safe to run multiple times existing tables are not modified.
## Teardown
Tear down deployed feature store infrastructure
```text
feast teardown
```
## Version
Print the current Feast version
```text
feast version
```