Skip to content

Commit 3c79b57

Browse files
committed
feat: enhance CLI with ASCII art logo and inspirational messages
- Add beautiful LOOM ASCII art banner to --version and help commands - Include original inspirational quotes about code transparency after commits - Improve help command with emoji sections and better organization - Update all tests to pass with new CLI improvements (133/133 passing) - Complete CHANGELOG documentation for v1.6.4 release These improvements make the CLI more engaging and professional while maintaining 72% test coverage.
1 parent 8e9ada5 commit 3c79b57

File tree

6 files changed

+328
-284
lines changed

6 files changed

+328
-284
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22

33
## [1.6.4] - 2025-10-01
44

5-
65
### ✨ Features
76
- add enhanced release script for UV-based workflow
7+
- **New ASCII art logo** - Beautiful LOOM banner for `--version` and help commands
8+
- **Inspirational commit messages** - Original quotes about code transparency after successful commits
9+
- improved CLI visual experience with better styling and colors
810

911
### 🐛 Bug Fixes
1012
- critical security and encoding vulnerabilities
1113
- disable all formatting-related linter rules
1214
- handle non-UTF-8 file encodings in git operations
15+
- clean git history - removed all Claude attributions and personal emails
1316

1417
### 📚 Documentation
18+
- enhanced help command with emoji sections and better organization
1519
- update changelog for 1.6.3
1620

1721
### ✅ Tests
1822
- fix tests to work with new encoding-safe subprocess calls
23+
- updated tests for new CLI improvements (133/133 passing)
1924

2025
### 📦 Build System
2126
- bump version to 1.6.4
@@ -26,6 +31,7 @@
2631

2732
### 🔧 Chores
2833
- update uv.lock file
34+
- complete git history cleanup using git-filter-repo
2935

3036
## [1.6.3] - 2025-09-23
3137

commitloom/__main__.py

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,30 @@ def handle_error(error: BaseException) -> None:
2525
console.print_error(f"An error occurred: {str(error)}")
2626

2727

28+
def show_version():
29+
"""Display version with ASCII art."""
30+
ascii_art = """
31+
[bold cyan]
32+
██╗ ██████╗ ██████╗ ███╗ ███╗
33+
██║ ██╔═══██╗██╔═══██╗████╗ ████║
34+
██║ ██║ ██║██║ ██║██╔████╔██║
35+
██║ ██║ ██║██║ ██║██║╚██╔╝██║
36+
███████╗╚██████╔╝╚██████╔╝██║ ╚═╝ ██║
37+
╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
38+
[/bold cyan]
39+
[italic dim] Weave perfect git commits with AI[/italic dim]
40+
[bold]Version:[/bold] {version}
41+
""".format(version=__version__)
42+
console.console.print(ascii_art)
43+
44+
2845
@click.group()
2946
@click.option("-d", "--debug", is_flag=True, help="Enable debug logging")
3047
@click.option(
3148
"-v",
3249
"--version",
3350
is_flag=True,
34-
callback=lambda ctx, param, value: value and print(f"CommitLoom, version {__version__}") or exit(0)
35-
if value
36-
else None,
51+
callback=lambda ctx, param, value: (show_version(), exit(0)) if value else None,
3752
help="Show the version and exit.",
3853
)
3954
@click.pass_context
@@ -119,10 +134,18 @@ def stats(ctx) -> None:
119134
def help() -> None:
120135
"""Display detailed help information about CommitLoom."""
121136
help_text = f"""
122-
[bold cyan]CommitLoom v{__version__}[/bold cyan]
123-
[italic]Weave perfect git commits with AI-powered intelligence[/italic]
124-
125-
[bold]Basic Usage:[/bold]
137+
[bold cyan]
138+
██╗ ██████╗ ██████╗ ███╗ ███╗
139+
██║ ██╔═══██╗██╔═══██╗████╗ ████║
140+
██║ ██║ ██║██║ ██║██╔████╔██║
141+
██║ ██║ ██║██║ ██║██║╚██╔╝██║
142+
███████╗╚██████╔╝╚██████╔╝██║ ╚═╝ ██║
143+
╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
144+
[/bold cyan]
145+
[italic dim] Weave perfect git commits with AI[/italic dim]
146+
[bold]Version:[/bold] {__version__}
147+
148+
[bold yellow]⚡ Quick Start[/bold yellow]
126149
loom Run the default commit command
127150
loom commit Generate commit message for staged changes
128151
loom commit -y Skip confirmation prompts
@@ -134,17 +157,17 @@ def help() -> None:
134157
loom --version Display version information
135158
loom help Show this help message
136159
137-
[bold]Available Models:[/bold]
160+
[bold green]🤖 Available Models[/bold green]
138161
{", ".join(config.model_costs.keys())}
139162
Default: {config.default_model}
140163
(You can use any OpenAI model name, but cost estimation is only available for the above models.)
141164
142-
[bold]Environment Setup:[/bold]
165+
[bold blue]🔧 Environment Setup[/bold blue]
143166
1. Set OPENAI_API_KEY in your environment or in a .env file
144167
2. Stage your changes with 'git add'
145168
3. Run 'loom' to generate and apply commit messages
146169
147-
[bold]Documentation:[/bold]
170+
[bold magenta]📚 Documentation[/bold magenta]
148171
Full documentation: https://github.com/Arakiss/commitloom#readme
149172
"""
150173
console.console.print(help_text)

commitloom/cli/cli_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _process_single_commit(self, files: list[GitFile]) -> None:
109109
# Create commit
110110
commit_success = self.git.create_commit(suggestion.title, suggestion.format_body())
111111
if commit_success:
112-
console.print_success("Changes committed successfully!")
112+
console.print_success("Changes committed successfully!", show_quote=True)
113113

114114
# Record metrics
115115
metrics_manager.finish_commit_tracking(
@@ -321,7 +321,7 @@ def _create_combined_commit(self, batches: list[dict]) -> None:
321321
self.git.reset_staged_changes()
322322
sys.exit(0)
323323

324-
console.print_success("Combined commit created successfully!")
324+
console.print_success("Combined commit created successfully!", show_quote=True)
325325

326326
except GitError as e:
327327
console.print_error(f"Git error: {str(e)}")

commitloom/cli/console.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Console output formatting and user interaction."""
22

33
import logging
4+
import random
45
from unittest.mock import MagicMock
56

67
from rich.console import Console
@@ -31,6 +32,17 @@
3132
logger = logging.getLogger("commitloom")
3233
_auto_confirm = False # Global flag for auto-confirmation
3334

35+
# Original inspirational messages about code transparency and truth
36+
COMMIT_QUOTES = [
37+
"Every commit reveals the truth of your changes.",
38+
"Transparency in code, clarity in commits.",
39+
"Your changes are now part of history.",
40+
"The truth is in the commit - documented and traceable.",
41+
"Clean commits illuminate the path forward.",
42+
"Honest commits, better codebases.",
43+
"What you commit today shapes tomorrow's code.",
44+
]
45+
3446

3547
def set_auto_confirm(value: bool) -> None:
3648
"""Set auto-confirm mode."""
@@ -82,9 +94,12 @@ def print_error(message: str) -> None:
8294
console.print(f"\n[bold red]❌ {message}[/bold red]")
8395

8496

85-
def print_success(message: str) -> None:
86-
"""Print success message."""
97+
def print_success(message: str, show_quote: bool = False) -> None:
98+
"""Print success message with optional inspirational quote."""
8799
console.print(f"\n[bold green]✅ {message}[/bold green]")
100+
if show_quote:
101+
quote = random.choice(COMMIT_QUOTES)
102+
console.print(f"[dim italic] {quote}[/dim italic]")
88103

89104

90105
def create_progress() -> Progress:

tests/test_commit_loom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_simple_commit(self, loom, mock_token_usage):
107107
loom.run()
108108

109109
loom.git.create_commit.assert_called_once()
110-
mock_console.print_success.assert_called_once_with("Changes committed successfully!")
110+
mock_console.print_success.assert_called_once_with("Changes committed successfully!", show_quote=True)
111111

112112

113113
class TestErrorHandling:

0 commit comments

Comments
 (0)