git-backed references — a compact string format for pointing at a path in a remote git-hosted repository.
owner/repo@ref:path
gref is the shorthand you already type in chat and CLIs, written down as a small, portable grammar tools can share.
kzu/sandbox
kzu/sandbox@v1.2.3:src/hello.cs
github.com/kzu/sandbox@main:program.cs
gist.github.com/kzu/0ac826dc7de666546aaedd38e5965381:run.cs
gitlab.com/kzu/runcs@main:program.cs
| Piece | Meaning |
|---|---|
host/ |
Optional forge (github.com, gitlab.com, gist.github.com, …) |
owner/repo |
Repository (or gist id) |
@ref |
Optional branch, tag, or commit (may include /, e.g. feature/foo) |
:path |
Optional file or directory inside the repo |
Omitted host, ref, or path are filled in by the application (many tools
default host to github.com).
The formal grammar and rules live in
gref.md and on the
versioned site:
gref.sh — latest published spec, with prior versions available from the version menu.
gref is the remote-ref shape used by:
- go# — run file-based C# apps
locally or from a remote ref (
dnx go -- owner/repo@ref:path) - runfile — run C# programs from
GitHub, Gist, or GitLab refs (
dnx runfile owner/repo@ref:path)
Those tools may accept additional host-specific conveniences beyond the core format; the spec defines the portable string.
MIT — see license.txt.