Skip to main content

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

Total Downloads
1.6K
1,628
Published
May 4, 2026
5mo ago

Get Started

dotnet add package gist.osx-arm64 --version 1.0.6

No framework information available.

README

EULA OSS GitHub

Run C# code programs from GitHub gists.

Usage: [dnx] gist [OPTIONS] <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 --dnx-alias.

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

Options:
    --dnx-aot         Enable dotnet AOT defaults for run file.cs. Defaults to false.
    --dnx-alias ALIAS Assign an alias on first usage which can be used instead of the full ref.
    --dnx-debug       Launch the debugger before running.
    --dnx-force       Force download, skipping ETag checking.

The gist does not need to be public. Private repos will leverage the same authentication used by your local git to access the file, 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.

Open Source Maintenance Fee

To ensure the long-term sustainability of this project, users of this package who generate revenue must pay an Open Source Maintenance Fee. While the source code is freely available under the terms of the License, this package and other aspects of the project require adherence to the Maintenance Fee.

To pay the Maintenance Fee, become a Sponsor at the proper OSMF tier. A single fee covers all of Devlooped packages.

Sponsors

Clarius Org MFB Technologies, Inc. Khamza Davletov SandRock DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Reuben Swartz Jacob Foshee Eric Johnson Jonathan Ken Bonny Simon Cropp agileworks-eu Zheyu Shen Vezel ChilliCream 4OTC domischell Adrian Alonso torutek Ryan McCaffery Seika Logiciel Andrew Grant eska-gmbh

Sponsor this project

Learn more about GitHub Sponsors

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

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

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.