Questions tagged [spectre.console]
10 questions
2
votes
0 answers
How do I set the console in Rider to run in interactive-mode?
I have several console applications written in .NET 7.0. The nature of these applications are to function as a CLI that takes input from the user and executes some functionality. In all of these CLI applications, I make use of Spectre.Console to get…

Mark Arrow
- 78
- 1
- 6
2
votes
1 answer
Converting Spectre.Console's Introduction example to F#
I'd like to use Spectre.Console in an F# console app. I'm trying to convert the Introduction example from C# to F#. Below is my attempt:
open System
open Spectre.Console.Cli
type AddSettings() =
inherit CommandSettings()
…

Kurt Mueller
- 3,173
- 2
- 29
- 50
1
vote
1 answer
Is there function like Console.ReadKey in Spectre.Console.AnsiConsole?
Hi i was wondering if there is a function like Console.ReadKey() but with use of AnsiConsole from Spectre.Console package for c#, i dont know if i should use regular one from Console namespace?
I tried something like that but i dont know if Console…

Portalion
- 13
- 3
1
vote
1 answer
Spectre.Console: the application name in the usage description contains "dll"
I am configuring Spectre.Console for the first time. Let's say the project name is "Awesome Console App", this is a console template, and I use AssemblyName tag, so .csproj file looks like this:
Exe
…

Gerard Jaryczewski
- 565
- 6
- 17
1
vote
1 answer
Change Spectre.Console mask character for secure input
I'm using the Spectre.Console library's password feature. It echos asterisks (***) instead of the secret text.
Is it possible to change the mask character, or to disable it completely (sudo style)?

lonix
- 14,255
- 23
- 85
- 176
1
vote
1 answer
Difficult loading Spectre.Console .NET typed classes in Powershell
I'm trying to use the excellent Spectre.Console to create nice interactive prompts in powershell. So far I can get a simple Read-Host equivalent to work using the below:
Add-Type -AssemblyName…

loldfield
- 31
- 3
0
votes
0 answers
How to have common shared options for command within a Branch (subcommands)?
Context:
I am using spectre.console. I have the following configuration code:
app.Configure(config =>
{
// Add
config.AddBranch("add", add =>
{
add.SetDescription("Add a package or reference to a .NET project");
…

g.pickardou
- 32,346
- 36
- 123
- 268
0
votes
1 answer
How can I have runtime calculated DefaultValue for a [CommandOption]?
I am using spectre.console. I have the following CommandSettings:
public class LogCommandSettings : CommandSettings
{
[CommandOption("--logFile")]
[Description("Path and file name for logging")]
[DefaultValue("application.log")]
…

g.pickardou
- 32,346
- 36
- 123
- 268
0
votes
2 answers
In SpectreConsole, how to strip the tags to get a plain text string?
I'm using Spectre.Console and have plenty of AnsiConsole.MarkupLine commands like this:
AnsiConsole.MarkupLine($"[lime]File size:[/] [bold]\t{file.Length,-10}[/]");
I'd like to output the same text in plaintext with no color in a text file,…

Mattia Durli
- 757
- 7
- 19
0
votes
1 answer
'AnsiConsole' does not contain a definition for 'Live'
I am using Spectre.Console extension for C# Console Application. And I wanted to use Live-Display module of Spectre.Console but I encoutered following problem:
'AnsiConsole' does not contain a definition for 'Live'
Here is my code, or better say,…

UltraStudioLTD
- 300
- 2
- 14