@elilands/termind
v0.1.0
Published
A terminal with long-term memory. Learns your command patterns, autocompletes workflows, and predicts contextual next commands.
Maintainers
Readme
🧠 termind
Your terminal with long-term memory. Learn from your command patterns, predict your next move, and automate your workflows.
Ever repeated the same complex command sequence because you couldn't remember how you did it last time? Tired of digging through history just to find that one deployment workflow?
termind learns your terminal habits, groups commands into semantic task sequences, and lets you search through your history like it understands what you're trying to do. It even predicts your next command based on context and lets you save workflows as reusable recipes with adjustable parameters.
✨ Features
- 🧠 Smart Pattern Learning: Automatically detects and learns the workflows you repeat most often.
- 🔍 Semantic Search: Find "what I did when staging broke" instead of digging through raw history.
- 🎯 Contextual Predictions: Suggests your next command based on previous sequences and context.
- 📋 Task Grouping: Automatically groups related commands into task sessions using semantic clustering.
- 🎬 Intelligent Macros: Save workflows as recipes with template parameters ([version], [path], etc.) for instant reuse.
- 🌍 Multi-language Support: English and Spanish locales built-in.
- ⚡ Blazing Fast: Built with TypeScript, SQLite, and optimized for minimal overhead.
📦 Installation
You can run it directly without installation using your favorite package manager:
# Using NPM
npx @elilands/termind recipe list
# Using PNPM
pnpm dlx @elilands/termind recipe list
# Using Yarn
yarn dlx @elilands/termind recipe listOr install it as a dev dependency in your project:
npm install -D @elilands/termind🚀 Usage
1. View Your Recent Task Recipes
See the task sequences you've performed recently, grouped by semantic similarity:
npx @elilands/termind recipe list2. Search Your Command History Semantically
Find tasks by natural language queries instead of exact command matching:
npx @elilands/termind recipe search "deploy frontend"
npx @elilands/termind recipe search "what broke staging"3. Filter by Semantic Tags
Find tasks that share common action tags (build, deploy, test, etc.):
npx @elilands/termind recipe tags deploy
npx @elilands/termind recipe tags build4. View a Specific Task Recipe
Display the full command sequence for a particular task with exit codes and timing:
npx @elilands/termind recipe show 55. View Statistics
See aggregate statistics about your command patterns:
npx @elilands/termind recipe stats6. Predict the Next Command
Get suggestions for what command you might want to run next:
npx @elilands/termind predict7. Learn from Your History
Analyze your existing shell history and extract workflows:
npx @elilands/termind learn🤔 How It Works
- Command Recording: termind tracks the commands you run and their exit codes.
- Semantic Tagging: Each command is automatically tagged with action type (build, deploy, test, vcs, etc.), time of day, and directory.
- Task Clustering: Similar command sequences are grouped into tasks using semantic similarity (Jaccard index on command sets + tag overlap).
- Pattern Learning: Recurring workflows are detected and suggestions are generated for optimization.
- Intelligent Search: Your commands are indexed and searchable by natural language queries, not just raw text matching.
🤝 Contributing
Found a bug or have an idea? PRs welcome!
- Clone the repo.
- Run
npm install. - Make your changes in
src/. - Run
npm run testto ensure tests pass. - Submit your PR!
📄 License
MIT License. See LICENSE for details. Built for developers, by developers. 4. Enable Tab autocomplete for your most-used workflows
Predict Next Command
npx @elilands/termind predict
# Or predict contextually
npx @elilands/termind predict "git pull"Returns the most likely next command with confidence scores.
Get Suggestions
npx @elilands/termind suggestAnalyzes your workflows and suggests:
- Commands that should be combined into macros
- Complex workflows that could be automated
- Potential optimizations based on your patterns
View Statistics
npx @elilands/termind statsShows:
- Total commands tracked
- Unique patterns found
- Top recurring patterns
Multiple Language Support
Default language is English, but you can switch to Spanish:
TERMIND_LANG=es termind learn
# or
termind learn --language esDevelopment
Setup
git clone https://github.com/elilands/termind.git
cd termind
npm installBuild
npm run buildRun in Development Mode
npm run devRun Tests
npm testLint and Format
npm run lint
npm run formatArchitecture
src/
├── cli.ts # Main CLI interface
├── index.ts # Module exports
├── lib/
│ ├── i18n.ts # Internationalization
│ ├── predictor.ts # Command prediction engine
│ ├── learner.ts # Workflow learning
│ └── recorder.ts # Command macro recording
└── db/
└── database.ts # SQLite database managementHow It Works
- Command Tracking: Each command you run is added to the local SQLite database
- Pattern Detection: Sequences of 3+ commands that repeat are identified as patterns
- Prediction: When you're typing, Termind predicts the next command based on your history
- Macro Recording: Complex workflows can be recorded and replayed with custom parameters
- Optimization: Weekly analysis suggests improvements based on your usage patterns
Data Privacy
All data is stored locally in ~/.termind/history.db. No data is sent to external servers.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Author
Built with ❤️ for terminal enthusiasts
