> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Todo

> Manage todo lists and generate tasks from agent responses

The `todo` command and `--todo` flag help you manage task lists and automatically generate todos from agent responses.

## Quick Start

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# List all todos
praisonai todo list
```

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/praisonai/docs/cli/todo-list-task-items.gif" alt="List task items example" />
</Frame>

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Generate todo from task
praisonai "Plan the project" --todo

# Add a todo manually
praisonai todo add "Implement feature X"
```

<img src="https://mintcdn.com/praisonai/fT4nF3hY6KPMOPvS/docs/cli/todo-generate-todo.gif?s=f371ac68d2795e0140b20ab5ce7fd452" alt="Generate Todo" width="1497" height="1104" data-path="docs/cli/todo-generate-todo.gif" />

<img src="https://mintlify.s3.us-west-1.amazonaws.com/praisonai/docs/cli/todo-manage-task-lists-and-generate.gif" alt="Manage Task Lists and Generate" />

## Commands

### Add Todo

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai todo add "Implement user authentication"
```

**Expected Output:**

```
✅ Added: Implement user authentication

📋 Todo List:
--------------------------------------------------
  1. ⬜ 🟡 Implement user authentication
--------------------------------------------------
  0/1 completed
```

### List Todos

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai todo list
```

**Expected Output:**

```
📋 Todo List:
--------------------------------------------------
  1. ⬜ 🔴 Fix critical bug in payment system
  2. ⬜ 🟡 Implement user authentication
  3. ⬜ 🟡 Write API documentation
  4. ✅ 🟢 Set up CI/CD pipeline
  5. ⬜ 🟢 Add unit tests
--------------------------------------------------
  1/5 completed

Legend: 🔴 High  🟡 Medium  🟢 Low
        ⬜ Pending  ✅ Completed
```

### Complete Todo

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai todo complete 2
```

**Expected Output:**

```
✅ Completed: Implement user authentication

📋 Todo List:
--------------------------------------------------
  1. ⬜ 🔴 Fix critical bug in payment system
  2. ✅ 🟡 Implement user authentication
  3. ⬜ 🟡 Write API documentation
  4. ✅ 🟢 Set up CI/CD pipeline
  5. ⬜ 🟢 Add unit tests
--------------------------------------------------
  2/5 completed
```

### Delete Todo

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai todo delete 3
```

**Expected Output:**

```
🗑️  Deleted: Write API documentation

📋 Todo List:
--------------------------------------------------
  1. ⬜ 🔴 Fix critical bug in payment system
  2. ✅ 🟡 Implement user authentication
  3. ✅ 🟢 Set up CI/CD pipeline
  4. ⬜ 🟢 Add unit tests
--------------------------------------------------
  2/4 completed
```

### Clear Todos

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai todo clear
```

**Expected Output:**

```
⚠️  Clear all todos? (y/N): y

🗑️  All todos cleared.
```

### Help

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai todo help
```

**Expected Output:**

```
Todo Commands:

  praisonai todo add <task>       - Add a new todo item
  praisonai todo list             - List all todos
  praisonai todo complete <id>    - Mark todo as complete
  praisonai todo delete <id>      - Delete a todo
  praisonai todo clear            - Clear all todos
  praisonai todo help             - Show this help

Using --todo Flag:
  praisonai "task" --todo         - Generate todos from response
```

## Using --todo Flag

### Generate Todos from Task

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai "Plan the implementation of a REST API" --todo
```

**Expected Output:**

```
╭─ Agent Info ─────────────────────────────────────────────────────────────────╮
│  👤 Agent: DirectAgent                                                       │
│  Role: Assistant                                                             │
│  📋 Todo Generation: Enabled                                                │
╰──────────────────────────────────────────────────────────────────────────────╯

╭────────────────────────────────── Response ──────────────────────────────────╮
│ Here's a plan for implementing the REST API:                                 │
│                                                                              │
│ 1. Design the API schema and endpoints                                       │
│ 2. Set up the project structure                                              │
│ 3. Implement authentication middleware                                       │
│ 4. Create CRUD endpoints for resources                                       │
│ 5. Add input validation                                                      │
│ 6. Implement error handling                                                  │
│ 7. Write unit tests                                                          │
│ 8. Add API documentation                                                     │
╰──────────────────────────────────────────────────────────────────────────────╯

📋 Generated Todos:
--------------------------------------------------
  1. ⬜ 🟡 Design the API schema and endpoints
  2. ⬜ 🟡 Set up the project structure
  3. ⬜ 🟡 Implement authentication middleware
  4. ⬜ 🟡 Create CRUD endpoints for resources
  5. ⬜ 🟡 Add input validation
  6. ⬜ 🟡 Implement error handling
  7. ⬜ 🟢 Write unit tests
  8. ⬜ 🟢 Add API documentation
--------------------------------------------------
  0/8 completed

✅ 8 todos generated from response
```

### Combine with Planning

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai "Plan a machine learning project" --todo --planning
```

**Expected Output:**

```
📋 PLANNING PHASE
Creating implementation plan...

[Planning output...]

📋 Generated Todos from Plan:
--------------------------------------------------
  1. ⬜ 🔴 Define problem statement and success metrics
  2. ⬜ 🔴 Collect and prepare training data
  3. ⬜ 🟡 Perform exploratory data analysis
  4. ⬜ 🟡 Feature engineering
  5. ⬜ 🟡 Model selection and training
  6. ⬜ 🟡 Hyperparameter tuning
  7. ⬜ 🟢 Model evaluation
  8. ⬜ 🟢 Deploy model to production
--------------------------------------------------
  0/8 completed
```

## Use Cases

### Project Planning

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai "Plan the development of a mobile app" --todo
```

### Sprint Planning

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai "Break down the user story: As a user, I want to reset my password" --todo
```

### Learning Path

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai "Create a learning plan for Kubernetes" --todo
```

### Bug Triage

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai "Analyze this error and suggest fixes" --todo --fast-context ./src
```

## Todo Storage

Todos are stored locally in `.praison/todos.json`:

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "todos": [
    {
      "id": 1,
      "task": "Implement user authentication",
      "priority": "medium",
      "completed": false,
      "created": "2024-12-16T15:30:00Z"
    }
  ]
}
```

## Priority Levels

| Priority | Icon | Description              |
| -------- | ---- | ------------------------ |
| High     | 🔴   | Critical tasks, blockers |
| Medium   | 🟡   | Standard priority        |
| Low      | 🟢   | Nice-to-have, can wait   |

## Best Practices

<Tip>
  Use `--todo` with `--planning` for comprehensive project breakdowns with actionable tasks.
</Tip>

<CardGroup cols={2}>
  <Card title="Regular Review">
    Use `praisonai todo list` regularly to track progress
  </Card>

  <Card title="Clear Completed">
    Periodically clear completed todos to keep list manageable
  </Card>

  <Card title="Combine with Planning">
    Use `--planning --todo` for detailed task breakdowns
  </Card>

  <Card title="Project-Specific">
    Consider using different workspaces for different projects
  </Card>
</CardGroup>

## Workflow Example

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# 1. Generate todos from project plan
praisonai "Plan the API implementation" --todo --planning

# 2. View todos
praisonai todo list

# 3. Work on first task
praisonai "Help me design the API schema" --fast-context ./src

# 4. Mark as complete
praisonai todo complete 1

# 5. Continue with next task
praisonai todo list
```

## Related

* [Planning Mode](/features/planning-mode)
* [Session CLI](/docs/cli/session)
* [Workflows](/features/workflows)
