Create Custom JBang Try Link
Create a shareable link to the JBang try page with your own custom code and/or link to GitHub repository or Gist.
Link Generator
Create a custom shareable link to /try/
with pre-filled repository, code, or auto-redirect:
Pre-fill the code editor with this code
GitHub repository or Gist URL for Jupyter environment
Friendly name for the repository (shown in button text)
Leave empty for default branch
Specific file or directory to open in Jupyter
Seconds to wait before redirecting to Jupyter (0 for immediate, empty for no redirect)
How it Works
All fields are optional! The link updates in real-time as you type:
- Code: Java code to pre-fill in the try page editor
- Repository: GitHub repository or Gist URL - updates the Jupyter launch link on
/try/
- Title: Friendly name shown in the "Launch" button (e.g., "My Project" → "🚀 Open My Project")
- Branch: Specific branch to use (defaults to main)
- File Path: Specific file or directory to open in Jupyter
- Redirect: Auto-redirect to Jupyter after specified seconds (empty = no redirect)
- Result: Generates a shareable
/try/
link - defaults to/try/
if no fields are filled
Generated Link Format
This tool generates links to /try/
with the following format:
/try/?repo=REPO_URL&title=TITLE&branch=BRANCH&filepath=PATH&code=CODE&redirect=SECONDS
Parameters:
code
(optional): URL-encoded Java code to pre-fill the editorrepo
(optional): GitHub repository or Gist URL- Example:
https://github.com/username/repo
- Example:
https://gist.github.com/username/gist-id
- Example:
title
(optional): Friendly name for the repository shown in button- Example:
My Awesome Project
→ button shows "🚀 Open My Awesome Project"
- Example:
branch
(optional): Branch name (defaults tomain
)filepath
(optional): Path to specific file or directoryredirect
(optional): Seconds to wait before auto-redirecting to Jupyter- Empty value or
0
= immediate redirect - Omit parameter = no redirect
- Empty value or
Example Generated Links:
Pre-fill code:
/try/?code=IO.println(%22Hello%20JBang!%22);
Repository with redirect:
/try/?repo=https://github.com/jbangdev/jbang-jupyter-examples&redirect=3
Gist with code:
/try/?repo=https://gist.github.com/user/abc123&code=IO.println(%22Demo%22);
Examples
GitHub Repository
https://github.com/username/my-java-notebooks
Opens the repository in Jupyter with JBang kernel
GitHub Gist
https://gist.github.com/username/abc123def456
Opens the Gist as a Jupyter environment
Specific File
https://github.com/username/repo + path: notebooks/demo.ipynb
Opens a specific notebook file directly