Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 32 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,29 +73,38 @@ set DIAL_API_KEY=your-api-key-here

## Usage

### Available Commands

#### Index Command
Index a repository to extract file summaries and prepare for analysis:

```bash
dotnet run --project src/TechDebtMaster.Cli -- index <repository-path>
```

**Examples:**
```bash
# Index a local repository
dotnet run --project src/TechDebtMaster.Cli -- index "C:\my-project"

# Index a repository on Linux/macOS
dotnet run --project src/TechDebtMaster.Cli -- index "/home/user/my-project"
```

#### Analyze Command
Analyze a repository for technical debt (currently shows mock data):

```bash
dotnet run --project src/TechDebtMaster.Cli -- analyze <repository-path>
### Available Commands

#### Capabilities Command
Get a comprehensive overview of what TechDebtMaster can do:

```bash
dotnet run --project src/TechDebtMaster.Cli -- capabilities
# Or use the alias:
dotnet run --project src/TechDebtMaster.Cli -- what-can-you-do
```

#### Index Command
Index a repository to extract file summaries and prepare for analysis:

```bash
dotnet run --project src/TechDebtMaster.Cli -- repo index <repository-path>
```

**Examples:**
```bash
# Index a local repository
dotnet run --project src/TechDebtMaster.Cli -- repo index "C:\my-project"

# Index a repository on Linux/macOS
dotnet run --project src/TechDebtMaster.Cli -- repo index "/home/user/my-project"
```

#### Analyze Command
Analyze a repository for technical debt:

```bash
dotnet run --project src/TechDebtMaster.Cli -- debt analyze <repository-path>
```

## Acknowledgments
Expand Down
112 changes: 112 additions & 0 deletions src/TechDebtMaster.Cli/Commands/CapabilitiesCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
using System.Reflection;
using Spectre.Console;
using Spectre.Console.Cli;

namespace TechDebtMaster.Cli.Commands;

public class CapabilitiesCommand : Command<CapabilitiesCommand.Settings>
{
public override int Execute(CommandContext context, Settings settings)
{
// Render ASCII art title
var figlet = new FigletText("TechDebtMaster").Centered().Color(Color.Green);
AnsiConsole.Write(figlet);

// Add a divider
AnsiConsole.Write(new Rule().RuleStyle("grey30"));
AnsiConsole.WriteLine();

// Display version
var version = Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "1.0.0";
AnsiConsole.MarkupLine($"[dim]Version {version}[/]");
AnsiConsole.WriteLine();

// Main question and answer
AnsiConsole.MarkupLine("[bold yellow]What can TechDebtMaster do?[/]");
AnsiConsole.WriteLine();

AnsiConsole.MarkupLine(
"[cyan]TechDebtMaster is your AI-powered companion for managing technical debt in your codebase.[/]"
);
AnsiConsole.WriteLine();

// Core capabilities
AnsiConsole.MarkupLine("[bold underline]πŸ” Core Capabilities:[/]");
AnsiConsole.WriteLine();

var capabilities = new List<(string Icon, string Title, string Description)>
{
("πŸ“Š", "Smart Code Analysis", "Analyze your entire codebase using AI to identify technical debt, code smells, and improvement opportunities"),
("🎯", "Prioritized Insights", "Get severity-based rankings of issues, helping you focus on what matters most"),
("πŸ“±", "Interactive Reports", "Generate beautiful HTML reports you can share with your team and modify directly"),
("πŸ”„", "Change Tracking", "Monitor how your technical debt evolves over time with intelligent file change detection"),
("🏷️", "Categorized Issues", "Organize findings by tags like Performance, Security, Code Smells, and more"),
("πŸ› οΈ", "Developer Integration", "Works seamlessly with VS Code and other tools through MCP (Model Context Protocol)"),
("βš™οΈ", "Flexible Configuration", "Customize analysis patterns, AI models, and output formats to match your workflow"),
("🎨", "Template Management", "Use built-in or custom prompt templates to tailor analysis to your specific needs")
};

foreach (var (icon, title, description) in capabilities)
{
AnsiConsole.MarkupLine($"[green]{icon}[/] [bold]{title}[/]");
AnsiConsole.MarkupLine($" {description}");
AnsiConsole.WriteLine();
}

// Workflow overview
AnsiConsole.MarkupLine("[bold underline]πŸš€ How It Works:[/]");
AnsiConsole.WriteLine();

var workflow = new List<(string Step, string Command, string Description)>
{
("1️⃣", "tdm init", "Initialize TechDebtMaster in your repository"),
("2️⃣", "tdm repo index", "Scan and index your codebase for analysis"),
("3️⃣", "tdm debt analyze", "Let AI analyze your code for technical debt"),
("4️⃣", "tdm debt show", "View results in an organized tree structure"),
("5️⃣", "tdm debt report", "Generate shareable HTML reports")
};

foreach (var (step, command, description) in workflow)
{
AnsiConsole.MarkupLine($"[yellow]{step}[/] [blue]{command}[/] - {description}");
}

AnsiConsole.WriteLine();

// Integration capabilities
AnsiConsole.MarkupLine("[bold underline]πŸ”Œ Integration & Automation:[/]");
AnsiConsole.WriteLine();

AnsiConsole.MarkupLine("β€’ [green]MCP Server[/] - Start with '[blue]tdm mcp[/]' to enable external tool integration");
AnsiConsole.MarkupLine("β€’ [green]VS Code Integration[/] - Use '[blue]tdm init --profile vscode[/]' for seamless editor integration");
AnsiConsole.MarkupLine("β€’ [green]CI/CD Ready[/] - Perfect for automated code quality checks in your pipeline");
AnsiConsole.MarkupLine("β€’ [green]Team Collaboration[/] - Share and modify HTML reports with your team");
AnsiConsole.WriteLine();

// Supported technologies
AnsiConsole.MarkupLine("[bold underline]πŸ’» What Languages & Technologies?[/]");
AnsiConsole.WriteLine();

AnsiConsole.MarkupLine("TechDebtMaster works with [green]any programming language[/] because it uses:");
AnsiConsole.MarkupLine("β€’ [cyan]AI-powered analysis[/] that understands code patterns across languages");
AnsiConsole.MarkupLine("β€’ [cyan]Flexible file filtering[/] to focus on specific file types or patterns");
AnsiConsole.MarkupLine("β€’ [cyan]Customizable prompts[/] that can be tailored to your technology stack");
AnsiConsole.WriteLine();

// Getting started
AnsiConsole.MarkupLine("[bold underline]🎯 Ready to Start?[/]");
AnsiConsole.WriteLine();

AnsiConsole.MarkupLine("Try these commands to get started:");
AnsiConsole.MarkupLine("β€’ [blue]tdm help[/] - See detailed usage examples");
AnsiConsole.MarkupLine("β€’ [blue]tdm init[/] - Initialize in your current repository");
AnsiConsole.MarkupLine("β€’ [blue]tdm config show[/] - View current configuration");
AnsiConsole.WriteLine();

AnsiConsole.MarkupLine("[dim]TechDebtMaster: Making technical debt management simple, actionable, and collaborative.[/]");

return 0;
}

public class Settings : CommandSettings { }
}
7 changes: 4 additions & 3 deletions src/TechDebtMaster.Cli/Commands/DefaultCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public override int Execute(CommandContext context, Settings settings)
table.AddRow(new Markup("[green]config[/]"), new Text("Configuration management"));
table.AddRow(new Markup("[green]prompts[/]"), new Text("Prompt template management"));
table.AddRow(new Markup("[green]dial[/]"), new Text("DIAL API operations"));
table.AddRow(new Markup("[green]mcp[/]"), new Text("Start Model Context Protocol server"));
table.AddRow(new Markup("[green]clean[/]"), new Text("Clean up .tdm folder"));
table.AddRow(new Markup("[green]help[/]"), new Text("Show detailed help with examples"));
table.AddRow(new Markup("[green]mcp[/]"), new Text("Start Model Context Protocol server"));
table.AddRow(new Markup("[green]clean[/]"), new Text("Clean up .tdm folder"));
table.AddRow(new Markup("[green]help[/]"), new Text("Show detailed help with examples"));
table.AddRow(new Markup("[green]capabilities[/]"), new Text("Show what TechDebtMaster can do"));

AnsiConsole.Write(table);
AnsiConsole.WriteLine();
Expand Down
12 changes: 9 additions & 3 deletions src/TechDebtMaster.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,15 @@
.WithExample("mcp", "/path/to/repo")
.WithExample("mcp", "--port", "3001");

config
.AddCommand<HelpCommand>("help")
.WithDescription("Show detailed help with usage examples and workflows");
config
.AddCommand<HelpCommand>("help")
.WithDescription("Show detailed help with usage examples and workflows");

config
.AddCommand<CapabilitiesCommand>("capabilities")
.WithDescription("Show what TechDebtMaster can do for you")
.WithAlias("what-can-you-do")
.WithExample("capabilities");

config.AddBranch(
"config",
Expand Down