@@ -152,6 +152,7 @@ def notify_envrc() -> None:
152152
153153def notify_dockerhub_secrets () -> None :
154154 """Notify user about required Docker Hub secrets for releases."""
155+ # We no longer need this once https://github.com/docker/roadmap/issues/314 is available
155156 print ("\n " + "=" * 70 )
156157 print ("IMPORTANT: Docker Hub Publishing Enabled" )
157158 print ("=" * 70 )
@@ -168,6 +169,46 @@ def notify_dockerhub_secrets() -> None:
168169 print ("=" * 70 + "\n " )
169170
170171
172+ def opportunistically_install_zenable_tools () -> None :
173+ """Opportunistically install zenable-mcp if uvx is available."""
174+ # Check if uvx is not available
175+ if not shutil .which ("uvx" ):
176+ # uvx is not available, notify the user
177+ print ("\n " + "=" * 70 )
178+ print ("NOTE: Skipped configuring the Zenable AI coding guardrails" )
179+ print ("=" * 70 )
180+ print ("\n Configuring the Zenable AI coding guardrails requires the uv package manager." )
181+ print ("To set this up later:" )
182+ print ("\n 1. Install uv via https://docs.astral.sh/uv/getting-started/installation/" )
183+ print ("2. Run: uvx zenable-mcp@latest install" )
184+ print ("=" * 70 + "\n " )
185+
186+ LOG .warning ("uvx was not found in PATH, so the Zenable integrations were not installed." )
187+ return
188+
189+ # uvx is available, attempt to install zenable-mcp
190+ LOG .debug ("uvx is available in PATH, attempting to install the Zenable tools..." )
191+ try :
192+ subprocess .run (["uvx" , "zenable-mcp@latest" , "install" ], check = True , timeout = 60 )
193+ print ("\n " + "=" * 70 )
194+ print ("Successfully configured the Zenable AI coding guardrails 🚀" )
195+ print ("To start using it, just open the IDE of your choice, login to the MCP server, and you're all set 🤖" )
196+ print ("Learn more at https://docs.zenable.io" )
197+ print ("=" * 70 + "\n " )
198+ except Exception :
199+ # Log the error but don't fail - this is opportunistic
200+ LOG .warning ("Failed to configure the Zenable AI coding guardrails" )
201+ print ("\n " + "=" * 70 )
202+ print ("WARNING: Failed to configure the Zenable AI coding guardrails" )
203+ print ("=" * 70 )
204+ print ("You can retry it later by running:" )
205+ print ("\n uvx zenable-mcp@latest install" )
206+ print ("\n To report issues, please contact:" )
207+ print (" • https://zenable.io/feedback" )
208+ print (" • support@zenable.io" )
209+ print ("=" * 70 + "\n " )
210+
211+
171212def run_post_gen_hook ():
172213 """Run post generation hook"""
173214 try :
@@ -185,6 +226,8 @@ def run_post_gen_hook():
185226
186227 subprocess .run (["git" , "init" , "--initial-branch=main" ], capture_output = True , check = True )
187228
229+ opportunistically_install_zenable_tools ()
230+
188231 # This is important for testing project generation for CI
189232 if (
190233 os .environ .get ("GITHUB_ACTIONS" ) == "true"
0 commit comments