Files
Samuel Enocsson 2555afce19 Initial commit: Azure DevOps TUI client
A terminal-based user interface for browsing and managing Azure DevOps
work items. Features include:

- Browse work items with filtering by area, iteration, state, and type
- View work item details with markdown rendering
- Open work items in browser
- Create git branches from work items
- Update work item state
- Keyboard-driven navigation

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 09:56:11 +01:00

45 lines
1006 B
Go

package cmd
import (
"fmt"
"os"
tea "github.com/charmbracelet/bubbletea"
"github.com/samuelenocsson/devops-tui/internal/api"
"github.com/samuelenocsson/devops-tui/internal/config"
"github.com/samuelenocsson/devops-tui/internal/ui"
)
// Execute runs the application
func Execute() error {
// Load configuration
cfg, err := config.Load()
if err != nil {
// If config not found, try to create default
if err := config.CreateDefaultConfig(); err == nil {
fmt.Println("Created default config file at ~/.config/devops-tui/config.yaml")
fmt.Println("Please edit the config file with your Azure DevOps settings.")
os.Exit(0)
}
return fmt.Errorf("configuration error: %w", err)
}
// Create API client
client := api.NewClient(cfg)
// Create and run the TUI
app := ui.NewApp(client)
p := tea.NewProgram(
app,
tea.WithAltScreen(),
tea.WithMouseCellMotion(),
)
if _, err := p.Run(); err != nil {
return fmt.Errorf("error running application: %w", err)
}
return nil
}