dotnet repl
Go get .NET 5 for Windows, Mac, or Linux, over at https://dotnet.microsoft.com/
Then install Jon Sequeria's "dotnet repl" with this one line global tool install:
dotnet tool install --global dotnet-repl
Then just type dotnet repl at the command line. Use the Windows Terminal ideally. That will drop you here!
With .NET Interactive/.NET Notebooks at the heart, consider this command-line experimental REPL (Read Evaluate Print Loop) to be a text-based notebook!
Start typing! If you make a mistake and press enter, type Ctrl-UpArrow to bring that line down to try again.
You can even add NuGet packages with #r "nuget:YourPackage"
Go learn more and give feedback at https://github.com/jonsequitur/dotnet-repl. You can even run .NET Notebooks with this, as a script! This REPL supports #F and C#. Love it.
Sponsor: Extend your runway and expand your reach. Oracle for Startups delivers enterprise cloud at a startup price tag with free cloud credits to help you reel in the big fish—confidently. Learn more.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
I feel like C# repl is so much easier. What does this have over https://github.com/waf/CSharpRepl?
Probably nothing much. 🙂 CSharpRepl is great, and much more polished.
dotnet-repl is an experiment in building a multi-language REPL, so it supports F# and PowerShell, and other languages can be imported using NuGet, just like in .NET Interactive notebooks. It's also an experiment in ways to use notebooks from the command line, including with no user interaction.
dotnet tool install --global dotnet-repl --version 0.1.11
Thanks for sharing
Comments are closed.