A powerful Neovim plugin for analyzing CLIPS expert system logs. Provides advanced search capabilities, fact relationship analysis, timeline visualization, and fact combination features.
- 🔍 Advanced Search: Multiple search syntax including template filters, slot searches, and fact history queries
- 📊 Fact Analysis: Detailed fact history with modification tracking and lifecycle visualization
- 🔗 Relationship Detection: Automatic detection of relationships between facts
- 📈 Timeline Views: Visual timeline of fact assertions, retractions, and modifications
- 🎯 Multi-Fact Selection: Select and analyze multiple facts together
- 🚀 Performance: Fast parsing and search across large CLIPS logs
Add this to your init.vim or init.lua:
Plug 'techtasie/clips-analyzer.nvim'Then run:
:PlugInstalluse 'techtasie/clips-analyzer.nvim'{
'techtasie/clips-analyzer.nvim',
config = function()
require('clips-analyzer').setup()
end
}- Open a CLIPS log file
- Run
:ClipsSearchto open the search interface - Use the search examples or press
?for help
| Command | Description |
|---|---|
:ClipsSearch |
Open the main search interface |
:ClipsAnalyze |
Alias for :ClipsSearch |
:ClipsDetails |
Show details for fact under cursor |
| Key | Mode | Action |
|---|---|---|
<leader>cs |
Normal | Open search window |
<leader>ca |
Normal | Open analyzer window |
gd |
Normal (CLIPS files) | Show fact details (cursor word → line) |
To disable default mappings, add to your config:
let g:clips_analyzer_no_mappings = 1Note: The gd mapping intelligently detects fact IDs by first checking the word under the cursor (e.g., f-123, 123), and if no fact ID is found there, it falls back to parsing the entire line.
robot:ROBOT3- Find facts where slot 'robot' contains 'ROBOT3'state=WAITING- Find facts where slot 'state' contains 'WAITING'template:task- Find all facts of template 'task'
:[task,worker,goal]- Find facts of multiple templatestemplate:[a,b],gen46- Find templates a,b that contain 'gen46'fact:{template:task, state:!DONE}- Tasks never marked DONE
The most powerful feature - search across entire fact lifecycles:
fact:{template:pddl-action-precondition, state:PRECONDITION-SAT}- Facts that were ever satisfiedfact:{template:pddl-action-precondition, state:!PRECONDITION-SAT}- Facts that were never satisfiedfact:{template:action, status:!FAILED}- Actions that never failed
slot:name- Find facts that have a 'name' slotvalue:failed- Find facts with any slot containing 'failed'
<Enter>- View fact details<Space>- Select/deselect fact for combinationc- View combined details of selected factsx- Clear all selections/- Start new search?- Show help<Esc>- Close window
<Esc>- Close windowt- View timelines- Search for similar facts<Enter>- Jump to line in original file1-9- Quick access to individual facts (combined view)
fact:{template:pddl-action-precondition, state:!PRECONDITION-SAT}
Finds all action preconditions that never became satisfied during their entire lifecycle.
:[task,goal,action]
Shows all facts that are tasks, goals, or actions.
template:[task,goal],robot3
Finds task or goal facts that contain 'robot3' anywhere.
require('clips-analyzer').setup({
-- Configuration options will be added in future versions
})The plugin automatically detects CLIPS log files with extensions:
.clips.log.clips-log
- Neovim 0.5+
- Lua support
Contributions are welcome! Please feel free to submit issues and pull requests.
MIT License - see LICENSE file for details.