Skip to content

Commit f4faa4e

Browse files
feat: Add ASCII logo & landing page to lazycommit
1 parent 2bab8ee commit f4faa4e

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

src/commands/lazycommit.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ import { getConfig } from '../utils/config.js';
1919
import { generateCommitMessageFromChunks, generateCommitMessageFromSummary } from '../utils/groq.js';
2020
import { KnownError, handleCliError } from '../utils/error.js';
2121

22+
const ASCII_LOGO = `╔──────────────────────────────────────────────────────────────────────────────────────╗
23+
│ │
24+
│ ██╗ █████╗ ███████╗██╗ ██╗ ██████╗ ██████╗ ███╗ ███╗███╗ ███╗██╗████████╗ │
25+
│ ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██╔════╝██╔═══██╗████╗ ████║████╗ ████║██║╚══██╔══╝ │
26+
│ ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║ ██║██╔████╔██║██╔████╔██║██║ ██║ │
27+
│ ██║ ██╔══██║ ███╔╝ ╚██╔╝ ██║ ██║ ██║██║╚██╔╝██║██║╚██╔╝██║██║ ██║ │
28+
│ ███████╗██║ ██║███████╗ ██║ ╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚═╝ ██║██║ ██║ │
29+
│ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ │
30+
│ │
31+
╚──────────────────────────────────────────────────────────────────────────────────────╝`;
32+
2233
export default async (
2334
generate: number | undefined,
2435
excludeFiles: string[],
@@ -27,6 +38,8 @@ export default async (
2738
rawArgv: string[]
2839
) =>
2940
(async () => {
41+
console.log(ASCII_LOGO);
42+
console.log();
3043
intro(bgCyan(black(' lazycommit ')));
3144
await assertGitRepo();
3245

website/index.html

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>lazycommit</title>
7+
<link rel="preconnect" href="https://fonts.googleapis.com">
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
10+
<meta name="description" content="lazycommit — AI-powered git commit messages using Groq. Never write a commit message again.">
11+
<meta name="theme-color" content="#24292f">
12+
<style>
13+
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; margin: 0; padding: 24px; color: #222; }
14+
.wrap { max-width: 720px; margin: 0 auto; }
15+
h1 { margin: 12px 0 8px; font-size: 28px; }
16+
p { margin: 8px 0; }
17+
.hero { text-align: center; }
18+
.hero img { width: 100%; max-width: 720px; border-radius: 8px; }
19+
.star { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0; padding: 10px 14px; border-radius: 6px; background: #24292f; color: #fff; text-decoration: none; font-weight: 600; }
20+
.count { background: rgba(255,255,255,.15); padding: 2px 8px; border-radius: 999px; font-size: 14px; }
21+
pre { background: #f6f8fa; padding: 12px; border-radius: 8px; overflow: auto; position: relative; }
22+
code { font-family: Inter, SFMono-Regular, Menlo, Consolas, monospace; }
23+
.section { margin-top: 24px; }
24+
.muted { color: #6a737d; font-size: 14px; }
25+
.version { display: inline-block; margin-left: 8px; font-size: 14px; color: #6a737d; }
26+
.copy { position: absolute; top: 8px; right: 8px; appearance: none; border: 1px solid #d0d7de; background: #fff; color: #24292f; border-radius: 4px; padding: 4px 8px; font-weight: 600; font-size: 12px; cursor: pointer; opacity: 0.8; }
27+
.copy:hover { opacity: 1; background: #f6f8fa; }
28+
</style>
29+
</head>
30+
<body>
31+
<div class="wrap">
32+
<div class="hero">
33+
<img alt="lazycommit" src="https://github.com/user-attachments/assets/ee0419ef-2461-4b45-8509-973f3bb0f55c">
34+
<h1>lazycommit <span id="version" class="version"></span></h1>
35+
<p>AI-powered git commit messages using Groq.</p>
36+
<a class="star" href="https://github.com/KartikLabhshetwar/lazycommit" target="_blank" rel="noreferrer noopener">
37+
⭐ Star this repo <span id="stars" class="count"></span>
38+
</a>
39+
</div>
40+
41+
<div class="section">
42+
<h2>Install</h2>
43+
<pre><code id="npm-cmd">npm install -g lazycommitt</code><button class="copy" data-target="npm-cmd" aria-label="Copy npm install command">Copy</button></pre>
44+
<p>Homebrew (tap):</p>
45+
<pre><code id="brew-cmd">brew install lazycommit</code><button class="copy" data-target="brew-cmd" aria-label="Copy brew install command">Copy</button></pre>
46+
<p class="muted">If this fails on your machine, use tap first: <code>brew tap kartiklabhshetwar/lazycommit</code> then <code>brew install lazycommit</code>.</p>
47+
</div>
48+
49+
<div class="section">
50+
<h2>Quick start</h2>
51+
<pre><code># set api key
52+
lazycommit config set GROQ_API_KEY=your_api_key
53+
54+
# stage files
55+
git add .
56+
57+
# generate and commit
58+
lazycommit</code></pre>
59+
</div>
60+
</div>
61+
62+
<script>
63+
(async function loadStars(){
64+
try{
65+
const r = await fetch('https://api.github.com/repos/KartikLabhshetwar/lazycommit');
66+
const j = await r.json();
67+
document.getElementById('stars').textContent = j.stargazers_count ?? '0';
68+
}catch{ /* noop */ }
69+
})();
70+
71+
(async function loadVersion(){
72+
try{
73+
const r = await fetch('https://registry.npmjs.org/lazycommitt');
74+
const j = await r.json();
75+
const v = (j['dist-tags'] && j['dist-tags'].latest) || j.version;
76+
if (v) document.getElementById('version').textContent = 'v' + v;
77+
}catch{ /* noop */ }
78+
})();
79+
80+
document.addEventListener('click', function(e){
81+
const btn = e.target.closest('.copy');
82+
if (!btn) return;
83+
const id = btn.getAttribute('data-target');
84+
const el = document.getElementById(id);
85+
if (!el) return;
86+
const text = el.textContent.trim();
87+
navigator.clipboard.writeText(text).then(() => {
88+
const old = btn.textContent;
89+
btn.textContent = 'Copied';
90+
setTimeout(() => { btn.textContent = old; }, 1200);
91+
});
92+
});
93+
</script>
94+
</body>
95+
</html>

0 commit comments

Comments
 (0)