tag
The tag command provides comprehensive tag management functionality, enabling users to create, organize, and utilize tags for better task categorization. Tags serve as a flexible labeling system that allows users to group and filter tasks by project, priority, type, or any custom criteria.
kasl tag [COMMAND]Commands
Section titled “Commands”add - Add a new tag
Section titled “add - Add a new tag”kasl tag add <NAME> [OPTIONS]Arguments:
NAME: Unique name for the tag (required)
Options:
-c, --color <COLOR>: Optional color for visual organization- Common color names: “red”, “blue”, “green”, “yellow”, “purple”, “orange”
- Hex color codes: “#FF0000”, “#00FF00”, etc.
Examples:
# Add a simple tagkasl tag add "urgent"
# Add a tag with colorkasl tag add "backend" --color "blue"
# Add a tag with hex colorkasl tag add "frontend" --color "#FF6B6B"list - List all available tags
Section titled “list - List all available tags”kasl tag listDisplays a formatted table of all existing tags with their names, colors, and creation dates.
Example:
kasl tag listshow - Show a tag and the tasks that carry it
Section titled “show - Show a tag and the tasks that carry it”kasl tag show <TAG>Arguments:
TAG: Tag name or ID to show
Example:
kasl tag show "urgent"edit - Edit an existing tag
Section titled “edit - Edit an existing tag”kasl tag edit <TAG>Arguments:
TAG: Tag name or ID to edit
Prompts interactively for the new name and color.
Examples:
# Edit tag interactivelykasl tag edit "urgent"
# Edit by IDkasl tag edit 1remove - Remove a tag
Section titled “remove - Remove a tag”kasl tag remove <TAG> [OPTIONS]Arguments:
TAG: Tag name or ID to remove
Options:
-y, --yes: Remove without asking for confirmation
Examples:
# Remove tag with confirmationkasl tag remove "old-tag"
# Remove without confirmationkasl tag remove "old-tag" -yTag Features
Section titled “Tag Features”Tag CRUD Operations
Section titled “Tag CRUD Operations”- Add: Define new tags with names and colors
- Read: List and view existing tags
- Update: Modify tag properties
- Remove: Remove tags and clean up associations
Color Coding
Section titled “Color Coding”Visual organization with customizable tag colors:
- Named Colors: “red”, “blue”, “green”, “yellow”, “purple”, “orange”
- Hex Colors: “#FF0000”, “#00FF00”, “#0000FF”
- Visual Impact: Colors appear in task listings and reports
Task Association
Section titled “Task Association”Link tags to tasks for categorization:
# Create task with tagskasl task add --name "Fix bug" --tags "urgent,backend"
# Add tags to existing taskkasl task edit 1Filtering
Section titled “Filtering”Find tasks by tag assignments:
# Show tasks with specific tagkasl task list --tag "urgent"Use Cases
Section titled “Use Cases”Project Organization
Section titled “Project Organization”# Create project tagskasl tag add "frontend" --color "blue"kasl tag add "backend" --color "green"kasl tag add "mobile" --color "purple"
# Assign to taskskasl task add --name "Update UI" --tags "frontend"kasl task add --name "Fix API bug" --tags "backend"Priority Management
Section titled “Priority Management”# Create priority tagskasl tag add "urgent" --color "red"kasl tag add "high" --color "orange"kasl tag add "low" --color "gray"
# Filter by prioritykasl task list --tag "urgent"Task Type Categorization
Section titled “Task Type Categorization”# Create type tagskasl tag add "bug" --color "red"kasl tag add "feature" --color "green"kasl tag add "documentation" --color "blue"kasl tag add "meeting" --color "yellow"
# Organize tasks by typekasl task add --name "Fix login bug" --tags "bug,urgent"kasl task add --name "Add user profile" --tags "feature,frontend"Status Tracking
Section titled “Status Tracking”# Create status tagskasl tag add "in-progress" --color "blue"kasl tag add "blocked" --color "red"kasl tag add "waiting-review" --color "yellow"kasl tag add "completed" --color "green"
# Track task statuskasl task add --name "Code review" --tags "waiting-review,backend"Examples
Section titled “Examples”Complete Workflow
Section titled “Complete Workflow”# 1. Create tags for your projectkasl tag add "frontend" --color "blue"kasl tag add "backend" --color "green"kasl tag add "urgent" --color "red"kasl tag add "bug" --color "orange"
# 2. List all tagskasl tag list
# 3. Create tasks with tagskasl task add --name "Fix login bug" --tags "urgent,bug,frontend"kasl task add --name "Add API endpoint" --tags "backend,feature"
# 4. Filter tasks by tagskasl task list --tag "urgent"kasl task list --tag "frontend"Tag Management
Section titled “Tag Management”# Create a comprehensive tag systemkasl tag add "project-a" --color "blue"kasl tag add "project-b" --color "green"kasl tag add "urgent" --color "red"kasl tag add "low-priority" --color "gray"kasl tag add "meeting" --color "yellow"kasl tag add "documentation" --color "purple"
# Edit tag propertieskasl tag edit "project-a"
# Remove unused tagskasl tag remove "old-tag"Interactive Usage
Section titled “Interactive Usage”# Interactive tag editingkasl tag edit "existing-tag"# Prompts for new name and color
# Interactive tag removalkasl tag remove "unused-tag"# Prompts for confirmationScripting
Section titled “Scripting”add and remove take their required data as arguments and flags, so they can run unattended:
kasl tag add "urgent" --color "red"kasl tag remove "old-tag" -ySample Output
Section titled “Sample Output”Tag List
Section titled “Tag List”+----+----------+-------+| ID | NAME | COLOR |+----+----------+-------+| 1 | urgent | red || 2 | backend | blue || 3 | frontend | green || 4 | bug | orange|| 5 | meeting | yellow|+----+----------+-------+Tag Creation
Section titled “Tag Creation”✅ Tag 'urgent' created successfully!Color: redID: 1Tag Editing
Section titled “Tag Editing”Editing tag 'urgent' (ID: 1)
Current properties:├── Name: urgent└── Color: red
New name (press Enter to keep current): criticalNew color (press Enter to keep current): darkred
✅ Tag updated successfully!Auto-Creation
Section titled “Auto-Creation”Tags are automatically created when assigned to tasks:
# This will create the "new-tag" tag if it doesn't existkasl task add --name "New task" --tags "new-tag,urgent"Best Practices
Section titled “Best Practices”Tag Naming
Section titled “Tag Naming”- Use descriptive names: “frontend” instead of “fe”
- Be consistent: Use the same naming convention
- Keep it simple: Avoid overly complex tag names
- Use lowercase: For consistency and easier typing
Color Organization
Section titled “Color Organization”- Use meaningful colors: Red for urgent, green for completed
- Limit color palette: Don’t use too many different colors
- Consider accessibility: Ensure colors are distinguishable
- Be consistent: Use the same colors for similar concepts
Tag Management
Section titled “Tag Management”- Regular cleanup: Remove unused tags
- Consolidate similar tags: Merge duplicate concepts
- Document tag meanings: Keep a reference of what each tag means
- Review usage: Check which tags are most/least used
Task Organization
Section titled “Task Organization”- Use multiple tags: Combine project, priority, and type tags
- Don’t over-tag: Avoid using too many tags per task
- Be consistent: Use the same tags for similar tasks
- Review regularly: Update tags as projects evolve
Integration with Other Commands
Section titled “Integration with Other Commands”The tag command works with other kasl commands:
task: Create and manage tasks with tagsreport: View tasks organized by tags in reportsexport: Export task data with tag informationsum: Include tag-based analysis in summaries
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Tag already exists
# Check existing tagskasl tag list
# Use different name or edit existing tagkasl tag edit "existing-tag"Tag not found
# List all tags to see available optionskasl tag list
# Check spelling and case sensitivitykasl tag list | grep -i "tag-name"Color not supported
# Use standard color nameskasl tag add "mytag" --color "red"
# Or use hex color codeskasl tag add "mytag" --color "#FF0000"Data Recovery
Section titled “Data Recovery”# Export tasks with tags before deletionkasl export tasks --format json
# Review tag usage before deletionkasl tag show "tag-to-delete"