Skip to content

johnconnor-sec/taskopen-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Taskopen - Go Edition

A powerful task annotation opener for Taskwarrior, rewritten in Go for better performance and maintainability.

CI Go Report Card Coverage License: GPL v2

Features

  • πŸš€ Fast: Startup time < 100ms, action matching < 10ms for 1000+ actions
  • πŸ” Smart: Fuzzy search and interactive menus for quick action discovery
  • πŸ›‘οΈ Secure: Process execution sandboxing and input validation
  • 🎨 Beautiful: Rich terminal output with accessibility support
  • πŸ”§ Configurable: YAML configuration with schema validation and IDE support
  • πŸ§ͺ Tested: >90% test coverage with comprehensive integration tests

Quick Start

Installation

From Source (Recommended for Development)

git clone https://github.com/johnconnor-sec/taskopen-go.git
cd taskopen-go/
make dev-setup
make build
sudo make install

Using Go Install

go install github.com/johnconnor-sec/taskopen-go/cmd/taskopen@latest

Binary Releases

Download pre-built binaries from Releases.

Basic Usage

# Open annotations from selected tasks
taskopen

# Run diagnostics to verify setup
taskopen diagnostics

# Initialize configuration interactively
taskopen config init

# Show version and build info
taskopen version

Development

Prerequisites

  • Go 1.21+: Install Go

  • Taskwarrior: Required for integration tests

    # Ubuntu/Debian
    sudo apt-get install taskwarrior
    
    # macOS
    brew install task
  • Development Tools (automatically installed with make dev-setup):

    • golangci-lint
    • gosec

Development Setup

# Clone and setup
git clone https://github.com/johnconnor-sec/taskopen-go.git
cd taskopen-go

# Setup development environment
make dev-setup

# Run all quality checks
make quality

# Build and run
make run

Project Structure

taskopen-go/
β”œβ”€β”€ cmd/taskopen/           # CLI entry point
β”œβ”€β”€ internal/               # Private packages
β”‚   β”œβ”€β”€ types/             # Core types with validation
β”‚   β”œβ”€β”€ config/            # Configuration handling  
β”‚   β”œβ”€β”€ exec/              # Process execution
β”‚   β”œβ”€β”€ output/            # Terminal output
β”‚   └── core/              # Business logic
β”œβ”€β”€ pkg/                   # Public APIs (future)
β”œβ”€β”€ test/                  # Integration tests
β”œβ”€β”€ .github/workflows/     # CI/CD configuration
└── docs/                  # Documentation

Common Development Tasks

# Build binary
make build

# Run tests
make test

# Run tests with coverage
make test-coverage

# Run integration tests (requires taskwarrior)
make test-integration

# Format code
make fmt

# Run linter
make lint

# Run security checks  
make security

# Watch for changes and rebuild (requires entr)
make watch

# Prepare for release
make prepare-release

Code Quality Standards

We maintain high code quality through:

  • Testing: >90% coverage, unit + integration tests
  • Linting: golangci-lint with strict configuration
  • Security: gosec security scanning
  • Formatting: gofmt + goimports
  • Documentation: Comprehensive godoc comments

Performance Targets

  • Startup time: < 100ms (cold start)
  • Action matching: < 10ms for 1000+ actions
  • Memory usage: < 50MB for typical workflows
  • Taskwarrior query time: < 2x current Nim implementation

Migration from Nim Version

The Go version is designed for seamless migration:

  1. Configuration: Automatic INI β†’ YAML migration with taskopen config migrate
  2. Actions: 100% compatibility with existing action definitions
  3. Performance: Significant improvements in startup and execution time
  4. Features: All Nim features plus new interactive capabilities

Migration Guide

# Backup existing configuration
cp ~/.taskopenrc ~/.taskopenrc.backup

# Install Go version
make install

# Migrate configuration
taskopen config migrate

# Verify migration
taskopen diagnostics

# Test with existing workflows
taskopen

Configuration

YAML Configuration (Recommended)

# ~/.config/taskopen/config.yml
general:
  editor: "vim"
  browser: "firefox"

actions:
  - name: "edit"
    target: "annotation"
    regex: ".*"
    command: "$EDITOR"
    modes: ["batch", "interactive"]
    
  - name: "open-url"
    target: "annotation" 
    regex: "https?://.*"
    command: "$BROWSER"

INI Configuration (Legacy Support)

# ~/.taskopenrc (automatically migrated)
[general]
editor = vim
browser = firefox

[ACTION edit]
target = annotation
regex = .*
command = $EDITOR

Testing

Unit Tests

make test

Integration Tests

make test-integration

Performance Tests

go test -bench=. ./internal/...

Contributing

Contributions are welcome! Please see the Contributing Guide (TODO) for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes following our code standards
  4. Run quality checks: make quality
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to your fork: git push origin feature/amazing-feature
  7. Open a Pull Request

Code Style

  • Follow Effective Go
  • Use make fmt for consistent formatting
  • Write comprehensive tests for new features
  • Document public APIs with godoc comments

Architecture

The Go version uses a modern, modular architecture:

  • Types: Strongly typed with validation
  • Configuration: Schema-driven with helpful error messages
  • Execution: Context-aware with cancellation support
  • Output: Rich terminal UI with accessibility support
  • Testing: Comprehensive unit and integration test coverage

License

This project is licensed under the GNU General Public License v2.0 - see the LICENSE (TODO) file for details.

Acknowledgments

  • Original Nim implementation by Johannes Schlatow
  • Taskwarrior project for the excellent task management foundation
  • Go community for excellent tooling and libraries

About

The Taskwarrior plugin `taskopen` rewritten in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published