Skip to main content
Any Framework

Run C# code gists directly using: dnx gist owner/gist[:path]

Published
Nov 16, 2025
11mo ago
Total Downloads
1.6K
1,610

Install

dotnet add package gist.linux-x64 --version 1.0.0-alpha

No framework information available.

README

EULA OSS GitHub

Run C# code programs from GitHub gists.

Usage: [dnx] gist [--aot] [--alias ALIAS] <gistRef> [<appArgs>...]

Arguments:
    <GIST_REF>  Reference to gist file to run, with format owner/gist[@commit][:path]
                @commit optional gist commit (default: latest)
                :path optional path to file in gist (default: program.cs or first .cs file)

                Examples:
                * kzu/0ac826dc7de666546aaedd38e5965381                 (tip commit and program.cs or first .cs file)
                * kzu/0ac826dc7de666546aaedd38e5965381@d8079cf:run.cs  (explicit commit and file path)

                Can be an alias previously set with --alias.

    <appArgs>   Arguments passed to the C# program that is being run.

Options:
    --aot         (optional) Enable dotnet AOT defaults for run file.cs. Defaults to false.
    --alias ALIAS (optional) Assign an alias on first usage which can be used instead of the full ref.

The gist does not need to be public. In that case, the same authentication used by your local git will be used to access the gist, via the Git Credential Manager.

Example:

dnx gist kzu/52b115ce24c7978ddc33245d4ff840f5 dotnet rocks

View source gist:

#:package Spectre.Console@*

using Spectre.Console;

AnsiConsole.MarkupLine($"Hello world from [green]dnx[/] [yellow]gist[/] :rocket: [bold italic]{string.Join(' ', args)}[/]");

When running different files from the same repo+ref, the download will be performed only once. The last download etag is used to avoid downloading on each run.

Sponsors

Clarius Org MFB Technologies, Inc. DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Uno Platform Reuben Swartz Jacob Foshee Eric Johnson David JENNI Jonathan Charley Wu Ken Bonny Simon Cropp agileworks-eu Zheyu Shen Vezel ChilliCream 4OTC Vincent Limo domischell Justin Wendlandt Adrian Alonso Michael Hagedorn torutek mccaffers

Sponsor this project

Learn more about GitHub Sponsors

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.