Package Exports
- sentineltm-cli
- sentineltm-cli/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sentineltm-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
đĄď¸ SentinelTM: Your AI Development Companion
Transform Your IDE into an Intelligent Development Environment
Agent-Oriented Architecture ⢠Context-Aware AI ⢠Zero Tolerance Quality
SentinelTM (st) is a revolutionary Agent Companion that transforms how you build software. Combining enterprise-grade CLI tools with cutting-edge MCP (Model Context Protocol), intelligent workflows, and context-aware AI, it provides a seamless development experience across 20+ AI providers and 23+ IDEs.
đ Revolutionary Features (v2.2+)
đ¤ Friendly AI Companion
- Personalized Interaction: Configure tone, language, and personality through
friendly.yml - Smart Aliases: Use natural language commands (Persian/English)
- Context Memory: Remembers your preferences and workflows
- Encouragement System: Celebrates your successes and helps with challenges
đď¸ Context Window Monitor
- Real-Time Tracking: Monitor token usage across all AI operations
- Smart Warnings: Get alerts at 85% and 95% usage
- Estimated Turns: Know how many interactions remain
- MCP Integration: Available as
sentinel_context_monitortool
đď¸ High-Level Workflows
- Declarative Operations: From imperative commands to intelligent workflows
- Component Scaffolding:
st workflow component UserProfilegenerates complete structure - API Endpoints: Auto-generate controllers with tests and validation
- Project-Wide Refactoring: Rename symbols across entire codebase
đ§ Context Enrichment System
- Pattern Detection: Learns from your existing code
- Smart Suggestions: AI generates code matching your project style
- Dependency Analysis: Understands your tech stack
- Convention Extraction: Follows your naming and structure patterns
đ Named Scripts System
- Reusable Workflows: Define complex operations in
scripts.yml - Security Validation: Whitelist/blacklist commands
- Parameter Substitution: Dynamic script execution
- Confirmation Prompts: For sensitive operations
⨠Core Capabilities
- đŻ Zero Tolerance Quality: AI-powered code review with structured feedback
- đ Security-First: Sandboxed file system and controlled shell execution
- đ¤ Provider Agnostic: Works with Ollama, OpenAI, Claude, Gemini, Mistral, OpenRouter, and any OpenAI-compatible API
- đ Interactive Setup: Guided configuration with smart defaults
- đ Quality Gates: Automated compliance checking with actionable insights
- đ¨ IDE Integration: One-command setup for VS Code, Cursor, Zed, Windsurf, and 19+ more
đ Quick Start (2 Minutes)
1ď¸âŁ Install
npm install -g sentineltm-cli@latest2ď¸âŁ Configure Your AI Provider (Interactive)
SentinelTM provides an interactive setup wizard for seamless configuration:
st set providerThis will guide you through:
- đ Select Provider: Choose from Ollama, OpenAI, Claude, Gemini, Mistral, or OpenRouter
- đ Enter API Key: Provide your API credentials (or skip for Ollama)
- đ¤ Select Model: Pick from available models (auto-fetched from the provider)
Example Providers:
Ollama (Local, Free)
# Install Ollama first: https://ollama.ai
ollama pull llama3
# Then configure
st set provider
# â Select: ollama
# â API Key: (leave blank)
# â Model: llama3OpenRouter (Best for Production)
st set provider
# â Select: openrouter
# â API Key: sk-or-v1-xxxxx
# â Model: deepseek/deepseek-chat or x-ai/grok-2-latestOpenAI
st set provider
# â Select: openai
# â API Key: sk-xxxxx
# â Model: gpt-4-turbo3ď¸âŁ Set Up IDE Integration (Interactive)
Configure your development environment with one command:
st set ideThis will:
- â Select IDEs: Choose from VS Code, Cursor, Zed, Windsurf, Continue, Cline, etc.
- đ¤ Configure Provider: Select AI provider and model (if not already set)
- đ Apply Rules: Optionally apply Zero Tolerance coding standards
4ď¸âŁ Verify Installation
# Check provider status
st provider status
# Run quality gate
st gate runđ Command Reference
đ¤ Provider Management
| Command | Description |
|---|---|
st set provider |
Interactive setup for AI provider (recommended) |
st provider configure |
Alternative interactive setup command |
st provider set <name> |
Set existing provider as default |
st provider list |
List available models from provider |
st provider status |
Show current provider and model |
st provider detect |
Auto-detect available providers |
đ¨ IDE Configuration
| Command | Description |
|---|---|
st set ide |
Interactive IDE setup (recommended) |
st ide set [names...] |
Configure specific IDEs |
st ide list |
List all supported IDE targets |
Supported IDEs: VS Code, Cursor, Zed, Windsurf, Continue, Cline, Codex, Claude, Gemini, OpenCode, Roo, Amp, Kilo, Trae, Kiro
â Quality Gates
| Command | Description |
|---|---|
st gate run |
Run all quality checks |
st gate run --min 90 |
Run with custom passing score |
Built-in Checks:
- đ§Ş Tests
- đ¨ Linting & Formatting
- đď¸ Build Verification
- đ Security Scan
- đ Project Structure
- đ§š Code Hygiene
- đ¤ AI Rule Check (enforces Zero Tolerance standards)
đ File System Operations
| Command | Description |
|---|---|
st fs ls [path] |
List files and directories |
st fs read <path> |
Read file contents |
st fs write <path> |
Write to file |
st fs search <query> |
Search across codebase |
đ Code Indexing
| Command | Description |
|---|---|
st index build |
Build code index |
st index status |
Show index statistics |
st index search <query> |
Search indexed code |
đ Dashboard & Reporting
| Command | Description |
|---|---|
st dashboard report |
Full project health report |
st dashboard metrics |
Key metrics summary |
st status |
Quick project overview |
đ ď¸ Task Management
| Command | Description |
|---|---|
st task list |
List all tasks |
st task create --title "Fix bug" |
Create new task |
st task update <id> --status done |
Update task status |
st task delete <id> --force |
Delete task |
đď¸ Workflow Commands (v2.2+)
| Command | Description |
|---|---|
st workflow analyze |
Analyze project patterns |
st workflow component <name> |
Scaffold React component with tests |
st workflow api <name> --method POST |
Create API endpoint |
st workflow rename <old> <new> |
Refactor symbol across project |
st workflow batch --config workflow.json |
Execute batch operations |
đď¸ Context Monitor (v2.2+)
| Command | Description |
|---|---|
st monitor stats |
Show token usage statistics |
st monitor summary |
Session summary with history |
st monitor recent |
Recent operations |
st monitor reset |
Reset monitoring session |
đ¤ Friendly Companion (v2.2+)
| Command | Description |
|---|---|
st alias list |
Show all command aliases |
st friendly greet |
Get personalized greeting |
st friendly preferences |
Show your preferences |
st shell scripts |
List named scripts |
st shell exec <script> |
Execute named script |
Example Aliases (configure in friendly.yml):
aliases:
Ů؜ؚŰŘŞ: "st status" # Status
تست_ڊاŮ
Ů: "st gate run" # Full test
ڊاŮ
ŮžŮŮŮŘŞ_ŘŹŘŻŰŘŻ: "st workflow component $1" # New componentđŻ Zero Tolerance Contract
SentinelTM enforces strict coding standards through its Zero Tolerance Contract system:
- â Type safety and hints required
- â No hardcoded values (strings, numbers, URLs)
- â Configuration externalized to YAML
- â Modular architecture (max 300 lines per file)
- â PEP8/ESLint compliance
- â Comprehensive error handling
- â Security best practices
See ZERO_TOLERANCE_CONTRACT.md for full details.
đ§ Configuration Files
SentinelTM uses multiple configuration files for maximum flexibility:
Core Configuration (.sentineltm/config/config.json)
{
"defaults": {
"provider": "openrouter",
"model": "deepseek/deepseek-chat"
},
"providers": {
"openrouter": {
"type": "openai-compatible",
"baseURL": "https://openrouter.ai/api",
"apiKey": "sk-or-v1-xxxxx"
}
}
}Friendly Companion (friendly.yml) - v2.2+
personality:
tone: "enthusiastic_partner"
use_emojis: true
user_name: "Your Name"
aliases:
status: "st status"
test: "st gate run"
component: "st workflow component $1"
preferences:
default_component_path: "src/components"
min_quality_score: 85
message_language: "english" # or "persian"Named Scripts (scripts.yml) - v2.2+
scripts:
install: "npm install"
test: "npm test"
deploy:
- "npm run build"
- "npm test"
- "st gate run"
- "npm publish"
security:
allowedCommands: ["npm", "git", "st"]
requireConfirmation: ["deploy", "publish"]Project Rules (project_rules.md) - v2.1+
# Project Coding Standards
- All state management must use Zustand
- API calls through `src/api/client.ts` only
- Use react-query for data fetching
- Functional components with TypeScript typesđ MCP Tools Integration
SentinelTM provides powerful MCP tools for IDE integration:
Available Tools
| Tool | Description | Actions |
|---|---|---|
sentinel_task |
Task management | create, list, update, delete, subtasks |
sentinel_fs |
File operations | list, read, write, move, copy, remove |
sentinel_shell |
Shell execution | execute, detectShells, listAllowed |
sentinel_index |
Code indexing | build, search, symbols, status |
sentinel_context_monitor |
Token tracking | getStats, recordUsage, getWarning, getSummary |
sentinel_security |
Security validation | validatePath, whitelist, blacklist |
sentinel_dashboard |
Project metrics | getMetrics, generateReport |
sentinel_gate |
Quality checks | run with configurable threshold |
Example MCP Usage
// Monitor context window
const stats = await mcp.callTool('sentinel_context_monitor', {
action: 'getStats'
});
// Returns: { usagePercentage: 65, remainingTurns: 12, warningLevel: 'safe' }
// Record AI operation
await mcp.callTool('sentinel_context_monitor', {
action: 'recordUsage',
payload: {
inputTokens: 1500,
outputTokens: 800,
operation: 'code_generation'
}
});
// Scaffold component
await mcp.callTool('sentinel_task', {
action: 'createTask',
payload: {
title: 'Build UserProfile component',
priority: 'high'
}
});đ Advanced Guides
- API Integration Guide - Deep dive into provider configuration
- Zero Tolerance Contract - Complete coding standards
- MCP Server Usage - Using SentinelTM as an MCP server
đ Troubleshooting
Provider not working?
st provider status # Check configuration
st provider detect # Auto-detect available providersIDE configuration not applying?
st ide list # Check supported IDEs
st set ide # Re-run interactive setupQuality gate failing?
st gate run --min 70 # Lower threshold for testingđ¤ Contributing
We welcome contributions! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
đ License
ISC License Š 2025 Amin Azmoodeh