A command-line utility that monitors development activities and provides insights into your coding workflow. DevStream tracks file changes, Git operations, build processes, and focus sessions to help developers understand and optimize their productivity patterns.
- Real-time File Monitoring: Track file changes across your project directories
- Git Integration: Monitor Git operations (commits, pushes, pulls, branch changes)
- Build System Awareness: Detect and track build file changes across multiple languages
- Focus Mode: Time-boxed focus sessions with notification management
- Smart Notifications: Context-aware notifications with priority filtering
- Automation System: Create custom automations triggered by development events
- Insights & Analytics: Generate detailed reports on development patterns
- Event-driven Architecture: Built on a robust event streaming system
- Deno (LTS version recommended)
git clone https://github.com/Elastic-Networth-Visualizer/devstream.git
cd devstream
# Build for your platform
deno task build:linux # Linux
deno task build:macos # macOS
deno task build:windows # Windows# Run in development mode with file watching
deno task dev
# Or run directly
deno run --allow-read --allow-write --allow-net --allow-env --allow-run main.ts-
Initial Setup: DevStream will create a configuration directory at
~/.devstream/on first run. -
Start Monitoring:
./devstream watch
-
Interactive Mode:
./devstream --interactive
-
Configure Watch Directories:
./devstream configure
# Show help
devstream --help
# Show version
devstream --version
# Start monitoring (daemon mode)
devstream watch
# Interactive mode with menu
devstream --interactive
# View recent events
devstream events
# View events for specific topic
devstream events --topic=file.changes --limit=20
# List all topics and subscriptions
devstream topics
# Toggle focus mode
devstream focus
# Generate insights report
devstream insights
# Configure settings
devstream configure
# Manage failed events
devstream dlq
# Create automation
devstream automationThe interactive mode provides a menu-driven interface:
- 🔍 View Recent Events - Browse event history by topic
- 📋 List Topics & Subscriptions - See active event streams
⚠️ Manage Dead Letter Queue - Handle failed events- 🧠 Toggle Focus Mode - Start/stop focus sessions
- 🤖 Create Automation - Set up event-driven workflows
- 📊 Generate Insights Report - Analyze development patterns
- ⚙️ Configure Settings - Modify watch directories, notifications, etc.
DevStream uses a JSON configuration file located at ~/.devstream/config.json.
{
"version": "0.1.0",
"watchDirs": ["./src", "./tests", "./docs"],
"ignorePaths": ["node_modules", "dist", ".git", "target", "build"],
"topics": {
"file.changes": {
"persistent": true,
"retentionPeriod": 604800000
},
"git.events": {
"persistent": true,
"retentionPeriod": 2592000000
},
"build.events": {
"persistent": true,
"retentionPeriod": 259200000
},
"notification": { "persistent": false },
"focus.state": { "persistent": true },
"workflow.automation": { "persistent": true }
},
"automations": [],
"notification": {
"focusMode": false,
"silentHours": { "start": "22:00", "end": "08:00" },
"priorityPatterns": ["test failure", "build failure", "security", "deadline"]
},
"insights": {
"collectStats": true,
"dailySummary": true
}
}watchDirs: Directories to monitor for file changesignorePaths: Patterns to ignore (supports glob patterns)topics: Event topic configuration with persistence and retention settingsautomations: Custom automation rulesnotification: Notification settings including focus mode and silent hoursinsights: Analytics and reporting settings
DevStream is built around an event-driven architecture with these main topics:
file.changes: File system events (create, modify, delete)git.events: Git operations (commit, push, pull, merge, branch, checkout)build.events: Build system events (start, success, failure)notification: System notificationsfocus.state: Focus mode state changesworkflow.automation: Automation execution events
{
path: string;
operation: "create" | "modify" | "delete";
extension: string;
size?: string;
}{
operation: "commit" | "push" | "pull" | "merge" | "branch" | "checkout";
message?: string;
branch?: string;
hash?: string;
}{
operation: "start" | "success" | "failure";
buildFile?: string;
language?: string;
duration?: number;
errors?: string[];
warnings?: string[];
}DevStream automatically detects build files for various languages and frameworks:
- JavaScript/Node.js:
package.json,package-lock.json,yarn.lock,bun.lockb - TypeScript:
tsconfig.json,tsconfig.build.json - Deno:
deno.json,deno.jsonc,deps.ts,import_map.json - Rust:
Cargo.toml,Cargo.lock - Go:
go.mod,go.sum,Gopkg.toml - Python:
setup.py,pyproject.toml,requirements.txt,Pipfile,poetry.lock - Java:
pom.xml,build.gradle,build.gradle.kts,settings.gradle,build.xml - Ruby:
Gemfile,Gemfile.lock,Rakefile - PHP:
composer.json,composer.lock - C++:
CMakeLists.txt,Makefile,meson.build,SConstruct - C#:
*.csproj,*.sln,packages.config - And many more...
Create custom automations that trigger on specific events:
{
"name": "Run Tests on Test File Changes",
"trigger": {
"topic": "file.changes",
"eventType": "file.modify",
"condition": "/test/"
},
"action": {
"type": "command",
"command": "npm test"
}
}- Trigger: Defines when the automation runs
topic: Event topic to listen toeventType: Specific event type (optional)condition: Text pattern to match in event payload (optional)
- Action: What to execute
type: Currently supports "command"command: Shell command to execute
Focus mode helps manage distractions during coding sessions:
- Timed Sessions: Set focus duration (default: 25 minutes)
- Notification Filtering: Only priority notifications are shown
- Automatic Completion: Alerts when focus session ends
- Statistics Tracking: Records focus session data for insights
Configure which notifications are considered high priority:
- "test failure"
- "build failure"
- "security"
- "deadline"
Generate detailed reports on your development patterns:
- File Activity: Changes by extension, time of day, day of week
- Focus Sessions: Duration, frequency, effectiveness
- Git Activity: Commits, pushes, pulls frequency
- Build Events: Success/failure rates, languages used
# Generate and display insights
devstream insights
# Reports are saved to ~/.devstream/reports/DevStream includes a Dead Letter Queue (DLQ) system for handling failed events:
- Automatic Retry: Failed events are automatically retried
- Manual Management: View and manage failed events via CLI
- Debugging: Detailed error information for troubleshooting
- Event Broker: Central event streaming system
- File Watchers: Monitor file system changes
- Git Monitor: Track Git repository changes
- Build Detector: Identify build system events
- Notification System: OS-native notifications
- Automation Engine: Execute triggered workflows
- Insights Collector: Gather and analyze metrics
- Event Store: Persistent event history
- Configuration: JSON-based settings
- Reports: Markdown-formatted insights
-
Clone the repository:
git clone https://github.com/Elastic-Networth-Visualizer/devstream.git cd devstream -
Install Deno: Follow the official installation guide
-
Run in development mode:
deno task dev
devstream/
├── commands/ # CLI command implementations
├── config/ # Configuration and setup
├── helpers/ # Utility functions
├── types/ # TypeScript type definitions
├── .github/workflows/ # CI/CD configuration
├── main.ts # Application entry point
└── mod.ts # Module exports
- Linting: Uses Deno's built-in linter
- Formatting: 2-space indentation, 80-character line width
- Type Safety: Strict TypeScript configuration
# Run tests
deno test
# Run with coverage
deno test --coverage- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Ensure all tests pass
- Follow existing code style
- Submit a pull request with clear description
- Events: Define new event types in
types/events.ts - Commands: Add CLI commands in
commands/directory - Watchers: Extend monitoring in
config/watchers.ts - Automations: Enhance automation system in
config/setup.ts
GPL-3.0 License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: elasticnetworthvisualizer@gmail.com
Built with Deno and powered by the @env/env-event-stream event system.