template
The template command provides comprehensive template management functionality for kasl, enabling users to create, edit, remove, and search reusable task templates. Templates streamline the creation of frequently used tasks by providing predefined values for name, comment, and completion status.
kasl template [COMMAND]Commands
Section titled “Commands”add - Add a new task template
Section titled “add - Add a new task template”kasl template add [OPTIONS]Options:
-n, --name <NAME>: Unique name identifier for the template- Must be unique across all templates
- Should be descriptive enough to easily identify the template’s purpose
- Used for referencing the template in task creation commands
Examples:
# Add template interactivelykasl template add
# Add template with namekasl template add --name "daily-standup"list - List all available templates
Section titled “list - List all available templates”kasl template listDisplays a formatted table of all existing templates with their names, task names, comments, and default completion values.
Example:
kasl template listshow - Show a single template’s contents
Section titled “show - Show a single template’s contents”kasl template show [NAME]Arguments:
NAME: Name of the template to show (optional)
Displays the task name, comment, and default completeness stored in the template, so its effect on task creation is visible before use.
Example:
kasl template show "daily-standup"edit - Edit an existing template
Section titled “edit - Edit an existing template”kasl template edit [NAME]Arguments:
NAME: Name of the template to edit (optional)- If not provided, an interactive selection interface will be presented
Examples:
# Edit template interactivelykasl template edit
# Edit specific templatekasl template edit "daily-standup"remove - Remove a template
Section titled “remove - Remove a template”kasl template remove [OPTIONS] [NAME]Arguments:
NAME: Name of the template to remove (optional)- If not provided, an interactive selection interface will be presented
Options:
-y, --yes: Remove without asking for confirmation
Examples:
# Remove template with confirmationkasl template remove "old-template"
# Remove without confirmationkasl template remove "old-template" -ysearch - Search templates
Section titled “search - Search templates”kasl template search <QUERY>Arguments:
QUERY: Search query string- Searches both template names and task names for matches
- Case-insensitive partial matching is supported
Examples:
# Search for templates containing "meeting"kasl template search "meeting"
# Search for templates containing "daily"kasl template search "daily"Template Features
Section titled “Template Features”Template CRUD Operations
Section titled “Template CRUD Operations”- Add: Define new templates with predefined task values
- Read: List and view existing templates
- Update: Modify template properties
- Remove: Remove templates from the system
Search Functionality
Section titled “Search Functionality”Find templates by name or content:
- Name Search: Find templates by template name
- Content Search: Find templates by task name or comment
- Partial Matching: Case-insensitive search with partial matches
Interactive Management
Section titled “Interactive Management”User-friendly interfaces for all operations:
- Interactive Creation: Guided template creation process
- Interactive Selection: Choose from available templates
- Confirmation Prompts: Prevent accidental removal
Integration
Section titled “Integration”Seamless integration with task creation workflows:
# Use template when creating taskkasl task add --from-template
# Use specific templatekasl task add --template "daily-standup"Use Cases
Section titled “Use Cases”Daily Routines
Section titled “Daily Routines”# Create daily standup templatekasl template add --name "daily-standup"# Template: Task name: "Daily standup", Comment: "Team sync meeting", Completeness: 0
# Create daily planning templatekasl template add --name "daily-planning"# Template: Task name: "Plan day", Comment: "Review and plan daily tasks", Completeness: 0Meeting Templates
Section titled “Meeting Templates”# Create client meeting templatekasl template add --name "client-meeting"# Template: Task name: "Client meeting", Comment: "Discuss project requirements", Completeness: 0
# Create team meeting templatekasl template add --name "team-meeting"# Template: Task name: "Team meeting", Comment: "Weekly team sync", Completeness: 0Development Tasks
Section titled “Development Tasks”# Create code review templatekasl template add --name "code-review"# Template: Task name: "Code review", Comment: "Review pull request", Completeness: 0
# Create bug fix templatekasl template add --name "bug-fix"# Template: Task name: "Fix bug", Comment: "Investigate and fix reported issue", Completeness: 0Administrative Tasks
Section titled “Administrative Tasks”# Create documentation templatekasl template add --name "documentation"# Template: Task name: "Update documentation", Comment: "Update project documentation", Completeness: 0
# Create email templatekasl template add --name "email"# Template: Task name: "Email correspondence", Comment: "Respond to emails", Completeness: 0Examples
Section titled “Examples”Complete Workflow
Section titled “Complete Workflow”# 1. Create templates for common taskskasl template add --name "daily-standup"kasl template add --name "code-review"kasl template add --name "client-meeting"
# 2. List all templateskasl template list
# 3. Use templates to create taskskasl task add --from-template# Select from available templates
# 4. Use specific templatekasl task add --template "daily-standup"Template Management
Section titled “Template Management”# Create comprehensive template librarykasl template add --name "morning-routine"kasl template add --name "afternoon-review"kasl template add --name "end-of-day"kasl template add --name "weekly-planning"
# Edit template propertieskasl template edit "morning-routine"
# Search for specific templateskasl template search "meeting"
# Remove unused templateskasl template remove "old-template"Interactive Usage
Section titled “Interactive Usage”# Interactive template creationkasl template add# Prompts for template name, task name, comment, and completeness
# Interactive template selectionkasl template edit# Shows list of available templates to choose from
# Interactive template removalkasl template remove# Shows list and prompts for confirmationSample Output
Section titled “Sample Output”Template List
Section titled “Template List”+---------------+---------------+---------------------+-------------+| TEMPLATE NAME | TASK NAME | COMMENT | COMPLETENESS|+---------------+---------------+---------------------+-------------+| daily-standup | Daily standup | Team sync meeting | 0% || code-review | Code review | Review PR | 0% || client-meeting| Client meeting| Discuss requirements| 0% || bug-fix | Fix bug | Investigate and fix | 0% || documentation | Update docs | Update documentation| 0% |+---------------+---------------+---------------------+-------------+Template Creation
Section titled “Template Creation”Creating new template...
Template name: daily-standupTask name: Daily standupComment: Team sync meetingDefault completeness (0-100): 0
✅ Template 'daily-standup' created successfully!Template Search
Section titled “Template Search”Searching for templates containing "meeting"...
Results:├── client-meeting: Client meeting - Discuss requirements├── team-meeting: Team meeting - Weekly team sync└── daily-standup: Daily standup - Team sync meeting
Found 3 matching templates.Template Editing
Section titled “Template Editing”Editing template 'daily-standup'
Current properties:├── Task name: Daily standup├── Comment: Team sync meeting└── Completeness: 0%
New task name (press Enter to keep current): Daily standup meetingNew comment (press Enter to keep current): Daily team standup meetingNew completeness (press Enter to keep current): 0
✅ Template updated successfully!Using Templates with Tasks
Section titled “Using Templates with Tasks”Interactive Template Selection
Section titled “Interactive Template Selection”# Create task using template selectionkasl task add --from-template
# The command will show available templates:# 1. daily-standup# 2. code-review# 3. client-meeting# Select template: 1Direct Template Usage
Section titled “Direct Template Usage”# Use specific templatekasl task add --template "daily-standup"
# Use template with additional optionskasl task add --template "code-review" --tags "urgent,backend"Template with Customization
Section titled “Template with Customization”# Use template but override task namekasl task add --template "bug-fix" --name "Fix login bug"
# Use template but add custom commentkasl task add --template "client-meeting" --comment "Discuss new feature requirements"Best Practices
Section titled “Best Practices”Template Naming
Section titled “Template Naming”- Use descriptive names: “daily-standup” instead of “ds”
- Be consistent: Use the same naming convention
- Keep it simple: Avoid overly complex template names
- Use lowercase: For consistency and easier typing
Template Content
Section titled “Template Content”- Generic task names: Allow for customization when used
- Clear comments: Provide helpful default descriptions
- Appropriate completeness: Usually 0% for new tasks
- Reusable structure: Make templates flexible for different contexts
Template Organization
Section titled “Template Organization”- Group related templates: Use consistent naming patterns
- Regular cleanup: Remove unused templates
- Document template purposes: Keep track of when to use each template
- Review and update: Keep templates current with your workflow
Template Usage
Section titled “Template Usage”- Use templates frequently: For any recurring task type
- Customize when needed: Override template values when appropriate
- Combine with tags: Use templates with tags for better organization
- Review effectiveness: Update templates based on usage patterns
Integration with Other Commands
Section titled “Integration with Other Commands”The template command works with other kasl commands:
task: Use templates to create tasks quicklytag: Combine templates with tags for better organizationreport: View tasks created from templates in reportsexport: Export template data for backup or sharing
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Template name already exists
# Check existing templateskasl template list
# Use different name or edit existing templatekasl template edit "existing-template"Template not found
# List all templates to see available optionskasl template list
# Search for similar templateskasl template search "partial-name"Template not working with task creation
# Verify template existskasl template list
# Check template name spellingkasl template search "template-name"Data Recovery
Section titled “Data Recovery”# Export templates before deletionkasl export --format json
# Review template usage before deletionkasl template list