Skip to content

Commit e17682a

Browse files
committed
feat: show extension summary in banner
Display installed extensions in single-line banner summary when CLI banner is shown. Changes: - Modify show_banner() to check if we're in a spec-kit project - Get pre-installed extensions if available - Display max 4 extension names in centered single line - Show "+N more" for additional extensions beyond first 4 - Use dim styling for "Extensions:" label - Gracefully handle errors (silent fail if extension detection fails) This makes extensions more visible to users without adding noise when no extensions are installed.
1 parent 5639188 commit e17682a

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,6 +1846,33 @@ def show_banner():
18461846
console.print(Align.center(Text(TAGLINE, style=f"italic {ACCENT_COLOR}")))
18471847
console.print()
18481848

1849+
# Display extension summary if we're in a spec-kit project
1850+
project_path = Path.cwd()
1851+
specify_dir = project_path / ".specify"
1852+
1853+
if specify_dir.exists():
1854+
try:
1855+
preinstalled = get_preinstalled_extensions(project_path)
1856+
if preinstalled:
1857+
ext_names = [
1858+
f"[{ACCENT_COLOR}]{ext['name']}[/{ACCENT_COLOR}]"
1859+
for ext in preinstalled
1860+
]
1861+
if ext_names:
1862+
ext_list = ", ".join(ext_names[:4]) # Show max 4 extensions
1863+
if len(ext_names) > 4:
1864+
ext_list += f" [+{len(ext_names) - 4} more]"
1865+
1866+
ext_summary = Text.assemble(
1867+
("Extensions: ", "dim"),
1868+
(ext_list, ""),
1869+
)
1870+
console.print(Align.center(ext_summary))
1871+
console.print()
1872+
except Exception:
1873+
# Silently ignore any errors getting extension info
1874+
pass
1875+
18491876

18501877
def show_skills_banner():
18511878
"""Display the Skills Package Manager banner with key features."""

0 commit comments

Comments
 (0)