{"id":34743968,"url":"https://github.com/btraceio/jbang-catalog","last_synced_at":"2026-05-26T10:31:48.517Z","repository":{"id":329129976,"uuid":"1114545064","full_name":"btraceio/jbang-catalog","owner":"btraceio","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-17T17:13:58.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-21T02:02:01.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/btraceio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-11T14:25:23.000Z","updated_at":"2025-12-17T17:14:01.000Z","dependencies_parsed_at":"2025-12-21T02:02:03.799Z","dependency_job_id":null,"html_url":"https://github.com/btraceio/jbang-catalog","commit_stats":null,"previous_names":["btraceio/jbang-catalog"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/btraceio/jbang-catalog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btraceio%2Fjbang-catalog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btraceio%2Fjbang-catalog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btraceio%2Fjbang-catalog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btraceio%2Fjbang-catalog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btraceio","download_url":"https://codeload.github.com/btraceio/jbang-catalog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btraceio%2Fjbang-catalog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28019503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-25T04:28:58.017Z","updated_at":"2026-05-26T10:31:48.503Z","avatar_url":"https://github.com/btraceio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BTraceIO JBang Catalog\n\nJBang distribution for BTraceIO tools, including [Jafar](https://github.com/btraceio/jafar) and BTrace.\n\n## Quick Start\n\n### Option 1: Install from Catalog (Recommended)\n\n```bash\n# Add the catalog (one-time setup)\njbang catalog add --name btraceio https://raw.githubusercontent.com/btraceio/jbang-catalog/main/jbang-catalog.json\n\n# Or use implicit resolution (no setup needed)\njbang jfr-shell@btraceio recording.jfr\n```\n\n### BTrace (from this catalog)\n\n```bash\n# Run BTrace via the catalog alias\njbang btrace@btraceio \u003cPID\u003e \u003cscript.java\u003e\n```\n\n\n### Option 2: Direct Script Execution\n\n```bash\n# No setup required - just run the script URL\njbang https://raw.githubusercontent.com/btraceio/jbang-catalog/main/jfr-shell.java recording.jfr\n```\n\n### Option 3: JitPack Coordinates\n\n```bash\n# Pin to specific version\njbang io.github.btraceio:jfr-shell:0.1.0 recording.jfr\n\n# Latest development snapshot\njbang io.github.btraceio:jfr-shell:main-SNAPSHOT recording.jfr\n```\n\n## Usage Examples\n\n### Interactive Mode\n\n```bash\n# Open JFR file in interactive shell\njbang jfr-shell@btraceio -f recording.jfr\n\n# The shell provides tab completion and a REPL for JfrPath queries\njfr\u003e show events/jdk.ExecutionSample | count()\njfr\u003e show events/jdk.FileRead[bytes\u003e1048576] | top(10, by=bytes)\njfr\u003e help\n```\n\n### Non-Interactive Mode\n\n```bash\n# Execute a single query\njbang jfr-shell@btraceio show recording.jfr \"events/jdk.ExecutionSample | count()\"\n\n# Get JSON output for scripting\njbang jfr-shell@btraceio show recording.jfr \\\n  \"events/jdk.FileRead | top(10, by=bytes)\" \\\n  --format json\n\n# Analyze thread activity\njbang jfr-shell@btraceio show recording.jfr \\\n  \"events/jdk.ExecutionSample | groupBy(thread/name)\"\n\n# GC analysis\njbang jfr-shell@btraceio show recording.jfr \\\n  \"events/jdk.GCHeapSummary[when/when='After GC']/heapSpace\"\n\n# List metadata\njbang jfr-shell@btraceio metadata recording.jfr --events-only\n\n# Show chunks\njbang jfr-shell@btraceio chunks recording.jfr --summary\n```\n\n### Install as Command\n\nFor repeated use, install jfr-shell as a permanent command:\n\n```bash\n# Install\njbang app install jfr-shell@btraceio\n\n# Now use it like a native command\njfr-shell recording.jfr\njfr-shell show recording.jfr \"events/jdk.ExecutionSample | count()\"\njfr-shell --help\n```\n\n## Available Aliases\n\n- **`jfr-shell`** - Default, uses wrapper script (recommended)\n- **`jfr-shell-jitpack`** - Version-pinned via JitPack (0.1.0)\n- **`jfr-shell-latest`** - Latest main branch snapshot\n\n## JfrPath Query Language\n\nJfrPath provides a concise, powerful way to query JFR data:\n\n```bash\n# Basic projection\nevents/jdk.FileRead/path\n\n# Filtering\nevents/jdk.FileRead[bytes\u003e1048576]\n\n# Aggregations\nevents/jdk.ExecutionSample | count()\nevents/jdk.FileRead/bytes | sum()\nevents/jdk.FileRead/bytes | stats()\n\n# Grouping\nevents/jdk.ExecutionSample | groupBy(thread/name)\n\n# Top N\nevents/jdk.FileRead | top(10, by=bytes)\n\n# Complex filters with functions\nevents/jdk.FileRead[contains(path, \"/tmp/\")]\nevents/jdk.ExecutionSample[len(stackTrace/frames)\u003e20]\n\n# Metadata exploration\nmetadata/jdk.types.StackTrace --tree\ncp/jdk.types.Symbol\nchunks --summary\n```\n\nSee the [JfrPath Reference](https://github.com/btraceio/jafar/blob/main/doc/jfrpath.md) for complete syntax.\n\n## Installation\n\n### JBang\n\nIf you don't have JBang installed:\n\n```bash\n# macOS/Linux\ncurl -Ls https://sh.jbang.dev | bash -s - app setup\n\n# Windows (PowerShell)\niex \"\u0026 { $(iwr https://ps.jbang.dev) } app setup\"\n\n# Or via package managers\nbrew install jbangdev/tap/jbang          # macOS (Homebrew)\nsdk install jbang                        # SDKMAN\nscoop install jbang                      # Windows (Scoop)\nchoco install jbang                      # Windows (Chocolatey)\n```\n\nJBang automatically downloads Java if needed, so you don't need a pre-installed JDK.\n\n## Documentation\n\n- **[Main Repository](https://github.com/btraceio/jafar)** - Full source code and build instructions\n- **[JFR Shell Usage Guide](https://github.com/btraceio/jafar/blob/main/JFR-SHELL-USAGE.md)** - Complete feature overview\n- **[JfrPath Reference](https://github.com/btraceio/jafar/blob/main/doc/jfrpath.md)** - Query language grammar and operators\n- **[JBang Documentation](https://www.jbang.dev/)** - JBang official docs\n\n## Requirements\n\n- Java 21+ (JBang will download automatically if needed)\n- JBang 0.100.0+\n\n## Features\n\n- **Interactive REPL** with intelligent tab completion\n- **JfrPath query language** for filtering, projection, and aggregation\n- **Multiple output formats**: table (default) and JSON\n- **Multi-session support**: work with multiple recordings simultaneously\n- **Non-interactive mode**: execute queries from command line for scripting/CI\n- **Fast streaming parser**: efficient memory usage, handles large recordings\n\n## Examples\n\n### Count Events by Type\n\n```bash\njbang jfr-shell@btraceio show recording.jfr \"events/jdk.ExecutionSample | count()\"\n```\n\n### Find Hot Methods\n\n```bash\njbang jfr-shell@btraceio show recording.jfr \\\n  \"events/jdk.ExecutionSample | groupBy(stackTrace/frames[0]/method/name/string) | top(10, by=count)\"\n```\n\n### Analyze File I/O\n\n```bash\njbang jfr-shell@btraceio show recording.jfr \\\n  \"events/jdk.FileRead | groupBy(path, agg=sum, value=bytes) | top(10, by=sum)\"\n```\n\n### Memory Statistics\n\n```bash\njbang jfr-shell@btraceio show recording.jfr \\\n  \"events/jdk.GCHeapSummary[when/when='After GC']/heapUsed | stats()\"\n```\n\n## Updating\n\n```bash\n# Update to latest version\njbang app install --force jfr-shell@btraceio\n\n# Clear cache and reinstall\njbang cache clear\njbang app install jfr-shell@btraceio\n```\n\n## Troubleshooting\n\n### JBang Not Found\n\nInstall JBang first (see Installation section above).\n\n### Java Version Mismatch\n\nJBang automatically downloads Java 21+ if needed. Force a fresh install:\n\n```bash\njbang --fresh jfr-shell@btraceio recording.jfr\n```\n\n### Catalog Not Found\n\nAdd the catalog explicitly:\n\n```bash\njbang catalog add --name btraceio https://raw.githubusercontent.com/btraceio/jbang-catalog/main/jbang-catalog.json\njbang catalog list  # Verify it's added\n```\n\n### JitPack Build Issues\n\nIf using JitPack coordinates fails, check the build status at:\nhttps://jitpack.io/com/github/btraceio/jfr-shell/\n\nYou can trigger a fresh build by visiting that URL.\n\n## License\n\nApache License 2.0 - See the [main repository](https://github.com/btraceio/jafar) for details.\n\n## Contributing\n\nIssues and pull requests should be submitted to the [main Jafar repository](https://github.com/btraceio/jafar).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtraceio%2Fjbang-catalog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtraceio%2Fjbang-catalog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtraceio%2Fjbang-catalog/lists"}