Skip to content

Personal Task Manager - Learning Cursor IDE features

Notifications You must be signed in to change notification settings

sthirugn/cursor-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 Personal Task Manager - Learn Cursor IDE

A simple command-line task manager built specifically to teach Cursor IDE features and AI-powered development.

🚀 What You'll Learn About Cursor

This project demonstrates key Cursor features:

1. AI-Powered Code Completion

  • Smart autocomplete for Python functions and classes
  • Context-aware suggestions based on your code
  • Import statement auto-completion

2. Chat with AI (Cmd+K / Ctrl+K)

  • Ask questions about the code
  • Get explanations for complex functions
  • Request code improvements and optimizations

3. Code Generation (Cmd+I / Ctrl+I)

  • Generate new functions with natural language
  • Create test cases automatically
  • Add documentation and comments

4. Multi-File Context

  • AI understands relationships between files
  • Smart refactoring across multiple files
  • Consistent coding patterns

📋 Features

  • ✅ Add new tasks with descriptions
  • 📋 List all tasks or filter by status
  • ✓ Mark tasks as complete
  • 🗑️ Delete tasks with confirmation
  • 💾 Persistent storage (JSON file)
  • 🎨 Colorful CLI interface
  • 🧪 Unit tests included

🛠️ Setup Instructions

1. Install Dependencies

pip install -r requirements.txt

2. Run the Application

python main.py

3. Run Tests

python test_task_manager.py

🎓 Cursor Learning Exercises

Try these exercises to learn Cursor features:

Exercise 1: AI Chat (Cmd+K)

  1. Open any Python file
  2. Press Cmd+K (Mac) or Ctrl+K (Windows/Linux)
  3. Ask: "Explain what this function does"
  4. Ask: "How can I improve this code?"

Exercise 2: Code Generation (Cmd+I)

  1. Place cursor in a class or function
  2. Press Cmd+I (Mac) or Ctrl+I (Windows/Linux)
  3. Type: "Add a method to search tasks by keyword"
  4. Watch Cursor generate the code!

Exercise 3: Refactoring

  1. Select a block of code
  2. Press Cmd+K and ask: "Refactor this to be more efficient"
  3. Compare the suggestions with your original code

Exercise 4: Test Generation

  1. Open task_manager.py
  2. Select a method you want to test
  3. Press Cmd+I and type: "Generate unit tests for this method"
  4. Add the tests to test_task_manager.py

Exercise 5: Documentation

  1. Select a function without docstrings
  2. Press Cmd+I and type: "Add comprehensive docstring"
  3. Watch Cursor add proper Python documentation

🔧 Try These Cursor Features

Auto-completion

  • Start typing function names - watch intelligent suggestions
  • Import modules - Cursor knows what you need
  • Variable names - consistent naming suggestions

Error Detection

  • Cursor highlights potential issues
  • Suggests fixes for common problems
  • Helps with type hints and annotations

Code Explanation

  • Hover over complex code for explanations
  • Ask Cursor to explain algorithms or logic
  • Get suggestions for code improvements

📁 Project Structure

cursor-tutorial/
├── main.py              # Main CLI application
├── task_manager.py      # Core task management logic
├── test_task_manager.py # Unit tests
├── requirements.txt     # Python dependencies
├── README.md           # This file
├── .gitignore          # Git ignore patterns
└── tasks.json          # Data file (created when you add tasks)

🎮 Usage Examples

# Adding a task
manager = TaskManager()
task = manager.add_task("Learn Cursor IDE", "Practice AI-powered coding")

# Listing tasks
all_tasks = manager.list_tasks()
pending_tasks = manager.list_tasks(show_completed=False)

# Completing a task
manager.complete_task(task.id)

# Deleting a task
manager.delete_task(task.id)

🧪 Testing

Run the comprehensive test suite:

python -m unittest test_task_manager.py -v

Tests cover:

  • Task creation and completion
  • Task manager operations
  • Data persistence
  • Error handling

🚀 Next Steps for Learning Cursor

  1. Explore the AI Chat: Ask questions about any part of the code
  2. Try Code Generation: Add new features using natural language
  3. Experiment with Refactoring: Ask Cursor to improve your code
  4. Learn from Suggestions: Pay attention to Cursor's recommendations
  5. Build Your Own Features: Use Cursor to add new functionality

💡 Tips for Using Cursor

  • Be Specific: When asking for code generation, be detailed about what you want
  • Use Context: Cursor understands your entire project, not just one file
  • Iterate: Use the AI suggestions as starting points and refine them
  • Learn Shortcuts: Master Cmd+K for chat and Cmd+I for inline generation
  • Explore Settings: Customize Cursor to match your workflow

📚 Advanced Cursor Features to Explore

  • Multi-file editing: Make changes across multiple files simultaneously
  • Git integration: AI-powered commit messages and code reviews
  • Terminal integration: Get help with command-line tasks
  • Code explanations: Understand complex algorithms and patterns
  • Performance optimization: Get suggestions for improving code efficiency

Happy coding with Cursor! 🎉

About

Personal Task Manager - Learning Cursor IDE features

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages