Share your terminal conversations instantly as professional GitHub Gists.
Here’s a quick look at how it works in real time:
https://x.com/sauravv_x/status/2046304601515950271?s=20
CLI Share is a powerful tool designed for developers using AI CLI tools (like Claude Code, Codex, and others). It captures your terminal session, cleans up the mess of ANSI codes and animations, and publishes a beautiful, readable Markdown file to GitHub Gists.
- Instant Sharing: One command (
/share) to go from terminal to a shareable URL. - Professional Formatting: Built-in VT100 terminal emulator ensures that ASCII art, boxes, and layouts are perfectly preserved, unlike naive copy-pasting.
- AI Optimized: Specifically built to handle the rich, dynamic output of modern AI CLI tools.
- Secure: Handles GitHub authentication via environment variables or a secure local config (
~/.cli-share/config.json). - Claude Code Integration: Includes a native slash command for seamless sharing within Claude Code sessions.
npm install -g @saurav-singh/cli-share-
Authentication: Ensure you have a GitHub Personal Access Token with
gistscope.You can either:
- Export it:
export GITHUB_TOKEN=your_token - Or save it: Our tool will prompt you once and save it to
~/.cli-share/config.json.
- Export it:
CLI Share works best when integrated directly into your Claude Code session as a slash command.
The easiest way to install CLI Share is using the native plugin system:
/plugin marketplace add saurav-shakya/cli-share
/plugin install cli-share@cli-share-marketplaceAfter installation, use /cli-share:share in any Claude Code session.
If you prefer manual setup (gives you /share without namespace), copy the skill definition:
mkdir -p ~/.claude/commands/
cp packages/claude-plugin/commands/share.md ~/.claude/commands/Claude Code doesn't save your terminal output to a file by default. To share conversations, you must use our session wrapper:
- Find your
claudebinary path:which claude - Rename it:
mv $(which claude) $(dirname $(which claude))/claude-code-real - Link our wrapper:
ln -s $(pwd)/packages/claude-plugin/wrapper.sh /usr/local/bin/claude
Now, every time you run claude, it will be recorded and ready to share via /share.
cli-shareThis will launch an interactive wizard to choose:
- Full Conversation or Custom Range
- Public or Private visibility
cli-share --full --public
cli-share --range=1-50 --privateWhen you are in a Claude Code session, use /cli-share:share (plugin) or /share (manual setup):
❯ /share
● Do you want to share the (1)Full Conversation or a (2)Custom Range?
(3)Public or (4)Private?
❯ 1 and 3
● Uploading to GitHub Gist...
Gist created: https://gist.github.com/saurav-singh/af12999ea...
● Your conversation has been shared publicly!
- Example 1: Bug Debugging
You're working with Claude Code and hit a complex build error. Instead of copy-pasting lines, type
/shareand send the Gist link to a teammate. They'll see the exact terminal state, including color-coded errors. - Example 2: Documentation & Tutorials
Capturing a perfect "Getting Started" workflow? Use
cli-shareto generate a beautiful Markdown log that you can embed directly into your project's documentation or a blog post. - Example 3: GitHub Issue Reporting
When reporting a CLI bug to an open-source project, provide a
cli-sharelink. It gives maintainers a high-fidelity look at the terminal output, making it much easier for them to diagnose the issue.
packages/core: The engine handling terminal parsing, formatting, and Gist uploading.packages/cli: The main command-line interface.packages/claude-plugin: Integration layer for Claude Code including a session wrapper.
Contributions are welcome! Please feel free to submit a Pull Request.
We take your security and privacy seriously:
- Local Storage Only: Your GitHub Personal Access Token is stored exclusively on your local machine in
~/.cli-share/config.json. - Strict Permissions: The configuration file is created with
600permissions (read/write access only for the current user), preventing other users on the system from accessing it. - Direct Communication: The tool communicates directly with the GitHub API. Your token is never sent to any third-party servers, analytics platforms, or middle-men.
- Minimal Scopes: We recommend creating a token with only the
gistscope to ensure the tool has the minimum permissions necessary to function.
MIT © 2026 CLI Share
