Skip to content

Add Zensical template, fix entangled new -l - #108

Merged
jhidding merged 2 commits into
mainfrom
zensical-template
Nov 15, 2026
Merged

jhidding merged 2 commits into
mainfrom
zensical-template

Conversation

@jhidding

Copy link
Copy Markdown
Contributor

Summary

  • Zensical template: entangled new zensical <path> creates a project from the new entangled/template-zensical template. It's a copier template using uv, entangled-cli[jupyter] and Zensical. Zensical has no plugins, so the template's build.py weaves the Markdown with entangled weave before rendering it: code block titles come from the title filter, and REPL output (from Jupyter kernels) from the repl filter.
  • Fix entangled new -l: it failed with "Missing argument 'TEMPLATE'" unless you also gave two placeholder arguments. TEMPLATE and PROJECT_PATH are now optional for click, and the command checks for them itself.
  • Fix printing help on errors: errors that print the help text (an invalid -d value, missing template answers) crashed with "There is no active click context". The error is handled after the command returns, so the help text is now captured when the error is raised.

Tests

  • entangled new -l with no arguments lists every template.
  • A missing PROJECT_PATH gives a click usage error.
  • Tested by hand: entangled new, entangled new x, and an invalid -d value, which now prints the help followed by the error message.

🤖 Generated with Claude Code

jhidding and others added 2 commits November 15, 2026 22:12
`entangled new zensical <path>` uses gh:entangled/template-zensical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- TEMPLATE and PROJECT_PATH are optional for click, so `-l` works on its
  own; missing arguments give a click usage error.
- Help printed for a HelpfulUserError is captured while the click
  context is active; the error is handled after the command returns, so
  printing help crashed with 'There is no active click context'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jhidding
jhidding merged commit 37d461c into main Nov 15, 2026
9 checks passed
@jhidding
jhidding deleted the zensical-template branch November 15, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant