The filter system controls which files get indexed. It supports two modes: blacklist (exclude matching files) and whitelist (only include matching files). Patterns use glob syntax.Documentation Index
Fetch the complete documentation index at: https://docs.cosmasense.tech/llms.txt
Use this file to discover all available pages before exploring further.
Get Filter Config
GET /api/filters/config
cURL
Response
200 Success
Fields
| Field | Description |
|---|---|
mode | "blacklist" or "whitelist" |
exclude / include | Active patterns for current mode (legacy fields) |
blacklist_exclude / blacklist_include | Patterns stored for blacklist mode |
whitelist_include / whitelist_exclude | Patterns stored for whitelist mode |
Mode-specific pattern storage prevents data loss when switching between blacklist and whitelist modes.
Update Filter Config
PUT /api/filters/config
Update the filter configuration. All fields are optional.
"blacklist" or "whitelist"If true, immediately remove newly-excluded files from the index
cURL
Response
200 Success
Add Pattern
POST /api/filters/pattern
Add a single pattern to the filter config.
cURL
200 Success
Remove Pattern
DELETE /api/filters/pattern
Remove a pattern from the filter config.
cURL
200 Success
Apply Filter Changes
POST /api/filters/apply
Trigger cleanup of excluded files. Use after updating config with apply_immediately: false.
cURL
Get Default Config
GET /api/filters/defaults
Returns the default filter patterns without loading from file.
cURL
Reset to Defaults
POST /api/filters/reset
Reset filter config to defaults and clean up excluded files.
cURL