12 June, 2026
This release introduces the @index schema attribute for declaring non-unique database indexes, a new keel inspect CLI for exploring your project's generated context, and significant query performance improvements for computed fields and @where filters.
@index Attribute for Non-Unique Indexes
You can now declare non-unique database indexes directly in your Keel schema using the new @index attribute. This follows the same syntax as @unique — use it on a field for a single-column index, or at the model level for composite indexes.
Previously, the only way to add a non-unique index was to create it directly in the database, and the migration reconciler would drop it on the next deploy. Now you can declare indexes in your schema and Keel manages them through migrations automatically.
model OrderTask {
fields {
status OrderTaskStatus @index
type Text
deferredUntil Timestamp?
customer Customer
}
@index([status, type, createdAt])
@index([customer, deferredUntil])
}Single-column @index goes on the field; composite @index([...]) goes at the model level and requires two or more fields. Relationship fields like customer are automatically translated to the underlying foreign key column. Removing an @index from the schema drops the index on the next migration.
Keel also warns you about redundant indexes — for example, adding @index to a field that already has @unique, or to a relationship field that's already indexed automatically:
model Product {
fields {
sku Text {
@unique
@index // ⚠ warning: @unique fields already have an index
}
category Text
region Text
}
@unique([sku, category])
@index([sku, category]) // ⚠ warning: matches the @unique
@index([category, sku]) // ✓ different column order, different index
}Tasks support @index identically to models.
keel inspect CLI
The new keel inspect command lets you explore the generated context of your Keel project — model details, generated indexes, tool configurations, and more. It's useful for understanding what Keel generates from your schema without digging through internal files.
keel inspect project # compact project overview
keel inspect model # list all models with field/action/index counts
keel inspect model OrderTask # fields, actions, and indexes for one model
keel inspect model OrderTask --section indexes # just the indexes
keel inspect config tool # list all generated tools
keel inspect config spaces # spaces hierarchyAll commands output human-readable tables by default. Add --json for structured output suitable for scripting or AI agent workflows.
Fixes and Improvements
- Fixed
keel runrebuild loop — projects with integration modules no longer get stuck in an endless rebuild cycle. Generated.gen.tsfiles are now excluded from the file watcher.
For a full list of fixes and improvements, check out our GitHub releases page (opens in a new tab).
For any issues or feedback, please contact us at help@keel.so.
Thank you for using Keel!