You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New option --gist to publish straight to a Gist via gh CLI
Add a --gist feature to both of the commands that can output a session converted to HTML. If --gist
is provided without a -o then it uses a tmp directory for the export (still with the session ID as
the name) which is still printed out but is expected to be deleted by the OS at some point. The
--gist option causes the content of that folder - the index.html and any page_*.html files as
multiple files in a single gist. There is just one catch: I intend to serve those files using
https://gistpreview.github.io/?3769c0736f45668e9595eb4eb8493f9c/index.html - but any links from that
page need to go to https://gistpreview.github.io/?3769c0736f45668e9595eb4eb8493f9c/two.html so
relative URLs will not work as they will incorrectly go to https://gistpreview.github.io/two.html.
So... if --gist is used then a little bit of javascript needs to be injected into the bottom of the
index.html and other pages which checks to see if the browser is accessing the page on
gistpreview.github.io and if it is corrects any a href links on the page
Do not forget the tests
and the README
https://gistpreview.github.io/?cbb6a57bc23ba2695bdc4e8d76997789
The preview URL uses [gistpreview.github.io](https://gistpreview.github.io/) to render your HTML gist. The tool automatically injects JavaScript to fix relative links when served through gistpreview.
60
+
61
+
When using `--gist` without `-o`, files are written to a temporary directory (shown in the output). You can combine both options to keep a local copy:
On macOS, the API credentials are automatically retrieved from your keychain (requires being logged into Claude Code). On other platforms, provide `--token` and `--org-uuid` manually.
0 commit comments