A personal context system for AI agents that manages markdown-based context for efficient time management and task tracking.
- Smart Scheduling: AI-powered scheduling based on task duration and profile preferences
- Task Management: Add, complete, and track tasks with markdown-based storage
- Email Integration: Create drafts or send emails directly from CLI
- Profile Learning: AI learns your work patterns to improve scheduling accuracy
- Rich CLI Interface: Beautiful terminal output with colors and tables
- Background Daemon: Optional background process for continuous monitoring
- Markdown Storage: All data stored in human-readable markdown files
Install the package in development mode:
pip install -e .Initialize the Personal Assistant system:
tm initThis creates the data directory at ~/.tm with the following structure:
.tm/
├── today.md # Today's schedule and tasks
├── tasks/
│ ├── backlog.md # Unscheduled tasks
│ └── completed/ # Completed task archives
├── profile.json # Your work profile and preferences
├── config.json # System configuration
├── email.json # Email configuration
├── daemon.log # Background process logs
└── backups/ # Daily backup archives
# Show today's schedule and tasks
tm today
# Add a task to today
tm add "Task description"
# Add a task with specific time
tm add "Task" --schedule "2pm"
# Mark a task as complete
tm complete "Task description"
# Generate a schedule from backlog
tm schedule today
# Generate schedule for tomorrow
tm schedule tomorrow
# Limit number of scheduled tasks
tm schedule today --max-tasks 3# Create email draft
tm email --to recipient@example.com --subject "Meeting" "Meeting agenda..."
# Send email directly
tm email --to recipient@example.com --subject "Update" "Project update..." --send
# Use template
tm email --to team@company.com --template meeting.txt --subject "Team Meeting" "Hi team..."The system learns your work patterns automatically. Tasks are scheduled based on:
- Historical completion times
- Preferred working hours
- Task complexity estimates
- Your personal productivity patterns
- Tasks are assigned optimal time slots
- Buffer time is automatically added between tasks
- Breaks are scheduled based on your profile
- Overbooking is prevented
Start the background process for continuous monitoring:
# Run daemon in background
tm daemon start
# Stop daemon
tm daemon stop
# Check daemon status
tm daemon statustm/
├── __init__.py # Package initialization
├── cli.py # Command-line interface
├── config.py # Configuration management
├── daemon.py # Background daemon process
├── email.py # Email integration service
├── init.py # Data directory initialization
├── learning.py # Profile learning engine
├── markdown.py # Markdown file parser/writer
├── scheduler.py # Smart scheduling algorithm
└── writer.py # Schedule file writer
# Today - 2024-01-15
## Schedule
- 09:00-10:00: Morning standup meeting
- 10:30-12:00: Work on feature implementation
## Tasks
- [x] Morning standup meeting
- [ ] Work on feature implementation
- [ ] Review pull requests# Backlog
- [ ] Implement user authentication
- [ ] Write unit tests
- [ ] Update documentation
- [ ] Deploy to staging{
"working_hours": {
"start": "09:00",
"end": "17:00"
},
"preferred_break_duration": 15,
"average_task_duration": 60,
"productivity_patterns": {
"morning": "high",
"afternoon": "medium",
"evening": "low"
}
}User: I need to finish the user authentication feature by Friday
Claude: I'll help you schedule this task. Let me check your current workload and find the best time slot.
tm add "Implement user authentication" --schedule "2pm today"
tm schedule today --max-tasks 5
User: Also need to write documentation for the new API endpoints
Claude: Adding that to your backlog...
tm add "Write API documentation"
tm schedule tomorrow --max-tasks 4
- Task Addition: "Add [task] to my schedule for [time/day]"
- Schedule Review: "Show me my schedule for [today/tomorrow]"
- Task Completion: "Mark [task] as complete"
- Rescheduling: "Move [task] to [time/day]"
- Email Integration: "Send email to [recipient] about [subject]"
- Priority Adjustment: "I have more energy today, schedule harder tasks first"
Create ~/.tm/email.json:
{
"smtp_server": "smtp.gmail.com",
"smtp_port": 587,
"username": "your_email@gmail.com",
"password": "your_app_password",
"template_dir": "/path/to/templates"
}Create ~/.tm/config.json:
{
"data_dir": "~/.tm",
"backup_enabled": true,
"backup_interval": "daily",
"daemon_enabled": false,
"log_level": "INFO"
}Run all tests:
pytest tests/ -v# Run all tests
pytest tests/ -v
# Run specific test file
pytest tests/test_cli_commands.py -v
# Run with coverage
pytest tests/ --cov=tm --cov-report=html- Create a new feature branch
- Add tests for new functionality
- Run the test suite
- Submit a pull request
MIT License - see LICENSE file for details.