A modern, feature-rich command-line task manager built with .NET 8. Manage your tasks efficiently with priorities, tags, due dates, and powerful search capabilities.
- ✅ Add, list, update, and remove tasks
- 🎯 Priority levels (1-5, with 5 being highest)
- 🏷️ Tag support for better organization
- 📅 Due date tracking
- 🔍 Powerful search functionality
- ✓ Mark tasks as complete
- 🗑️ Clear completed tasks
- 💾 JSON file-based persistence
- 📊 Statistics and reporting
- 📤 Export to CSV, Markdown, and JSON
- 📥 Import tasks from JSON
- ⚙️ Configuration file support
- 🐳 Docker support for containerized deployment
- 🎨 Clean, intuitive CLI interface
- 🏗️ Modular architecture with dependency injection
- 📝 Comprehensive logging
- 🧪 90%+ test coverage
- 🔧 VSCode integration
- 🚀 CI/CD with GitHub Actions
- 📦 Cross-platform builds
- .NET 8 SDK or later
# Clone the repository
git clone https://github.com/codeforgood-org/dotnet-task-manager.git
cd dotnet-task-manager
# Build the project
dotnet build
# Run the application
dotnet run --project src/TaskManager.CLI -- <command> [options]# Linux/macOS
./build.sh build # Build the solution
./build.sh test # Run tests
./build.sh publish # Publish for all platforms
./build.sh run -- list # Run the application
# Windows
build.cmd build
build.cmd test
build.cmd publish# Build and run with Docker
docker build -t taskmanager .
docker run -v $(pwd)/data:/app/data taskmanager list
# Or use docker-compose
docker-compose up taskmanager-dev# Build and pack
dotnet pack src/TaskManager.CLI/TaskManager.CLI.csproj -c Release
# Install globally
dotnet tool install --global --add-source ./src/TaskManager.CLI/nupkg TaskManager.CLI
# Now you can use 'taskman' from anywhere
taskman help# Simple task
taskman add "Buy groceries"
# Task with priority
taskman add "Complete project report" --priority 5
# Task with due date
taskman add "Submit tax returns" --due 2024-04-15
# Task with tags
taskman add "Review pull requests" --tags work,code-review
# Combine all options
taskman add "Prepare presentation" --priority 4 --due 2024-12-31 --tags work,important# List all tasks (completed and pending)
taskman list
# List only pending tasks
taskman list --pending
# List tasks by tag
taskman list --tag worktaskman complete 1# Update description
taskman update 1 "Buy groceries and cook dinner"
# Update priority
taskman priority 1 5# Search by keyword
taskman search groceries
# Search also looks in tags
taskman search worktaskman remove 1taskman clear# View task statistics
taskman stats# Export to different formats
taskman export --format csv --output tasks.csv
taskman export --format markdown --output tasks.md
taskman export --format json --output tasks.json
# Import from JSON
taskman import tasks-backup.jsonTasks are displayed with the following information:
[✓] [1] Buy groceries ★★★ (Due: 2024-12-25) [shopping, personal]
│ │ │ │ │ └─ Tags
│ │ │ │ └─ Due date (if set)
│ │ │ └─ Priority (1-5 stars)
│ │ └─ Description
│ └─ Task ID
└─ Completion status (✓ = completed, blank = pending)
The project follows modern .NET practices with a clean, modular architecture:
dotnet-task-manager/
├── src/
│ └── TaskManager.CLI/
│ ├── Models/ # Data models
│ │ └── TaskItem.cs
│ ├── Interfaces/ # Service interfaces
│ │ └── ITaskService.cs
│ ├── Services/ # Business logic
│ │ └── TaskService.cs
│ └── Program.cs # CLI entry point
├── tests/
│ └── TaskManager.Tests/ # Unit tests
├── docs/ # Documentation
└── TaskManager.sln # Solution file
- Separation of Concerns: Models, services, and CLI are separate
- Dependency Injection: Using Microsoft.Extensions.DependencyInjection
- Interface-based Design: Services implement interfaces for testability
- Async/Await: File I/O operations are asynchronous
- Logging: Integrated logging with Microsoft.Extensions.Logging
- Error Handling: Comprehensive exception handling and validation
# Build in Debug mode
dotnet build
# Build in Release mode
dotnet build -c Release# Run all tests
dotnet test
# Run tests with coverage
dotnet test /p:CollectCoverage=trueThe project includes:
- EditorConfig for consistent code style
- XML documentation comments
- Nullable reference types enabled
- Comprehensive unit tests
The application can be configured using appsettings.json:
{
"AppConfig": {
"TasksFilePath": "tasks.json",
"DefaultPriority": 3,
"UseColors": true,
"DateFormat": "yyyy-MM-dd",
"ShowCompletedByDefault": true,
"UpcomingDaysThreshold": 7,
"ExportDirectory": "exports"
}
}Tasks are stored in a tasks.json file in the current working directory. The file is automatically created when you add your first task.
Example tasks.json:
[
{
"Id": 1,
"Description": "Buy groceries",
"IsCompleted": false,
"Priority": 3,
"CreatedAt": "2024-01-15T10:30:00Z",
"DueDate": "2024-01-20T00:00:00Z",
"Tags": ["shopping", "personal"]
}
]Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
dotnet test) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
See the examples/ directory for:
- Sample task files
- Common usage scenarios - Task templates
- Best practices
docker build -t taskmanager .# Create a data directory for persistent storage
mkdir -p data
# Run commands
docker run -v $(pwd)/data:/app/data taskmanager add "Docker task" --priority 5
docker run -v $(pwd)/data:/app/data taskmanager list
docker run -v $(pwd)/data:/app/data taskmanager stats# Start development environment
docker-compose up taskmanager-dev
# In another terminal, access the container
docker exec -it taskmanager-dev bash
dotnet run --project src/TaskManager.CLI -- list- Priority levels
- Tag support
- Export to CSV, Markdown, JSON
- Statistics and reports
- Docker support
- Configuration file
- Comprehensive tests
- Color-coded CLI output with Spectre.Console
- Interactive mode
- Recurring tasks
- Task categories/projects
- Cloud synchronization
- Web API
- Web interface
- Mobile companion app
If you encounter any issues or have questions:
- Open an issue on GitHub
- Check existing issues for solutions
- Contribute to the documentation
Built with ❤️ using:
Made by Code for Good