Skip to content

Commit 4985a32

Browse files
committed
feat: show extensions in specify version command
Add installed extensions to version output when running from within a spec-kit project. Changes: - Add extension detection in version() function - Display up to 5 extension names in version table - Show '+N more' indicator for additional extensions - Gracefully handle errors (silent fail if extension detection fails) This makes extension visibility more discoverable without requiring separate extension commands.
1 parent e17682a commit 4985a32

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3948,6 +3948,25 @@ def version():
39483948
info_table.add_row("Template Version", template_version)
39493949
info_table.add_row("Released", release_date)
39503950
info_table.add_row("", "")
3951+
3952+
# Check for installed extensions
3953+
project_path = Path.cwd()
3954+
specify_dir = project_path / ".specify"
3955+
if specify_dir.exists():
3956+
try:
3957+
preinstalled = get_preinstalled_extensions(project_path)
3958+
if preinstalled:
3959+
ext_names = [ext["name"] for ext in preinstalled]
3960+
ext_count = len(ext_names)
3961+
if ext_count > 0:
3962+
ext_list = ", ".join(ext_names[:5])
3963+
if ext_count > 5:
3964+
ext_list = f"{ext_list} [+{ext_count - 5} more]"
3965+
info_table.add_row("Extensions", ext_list)
3966+
info_table.add_row("", "")
3967+
except Exception:
3968+
pass
3969+
39513970
info_table.add_row("Python", platform.python_version())
39523971
info_table.add_row("Platform", platform.system())
39533972
info_table.add_row("Architecture", platform.machine())

0 commit comments

Comments
 (0)