prompito 1.0.1

dotnet add package prompito --version 1.0.1
                    
NuGet\Install-Package prompito -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="prompito" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="prompito" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="prompito" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add prompito --version 1.0.1
                    
#r "nuget: prompito, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package prompito@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=prompito&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=prompito&version=1.0.1
                    
Install as a Cake Tool

<div align="center"><img width="260" height="260" alt="prompito04" src="https://github.com/user-attachments/assets/0da729ea-6242-4518-a09d-5d9abd9bff18" /></div>

Prompito v1.0.1

Version Status Github Release

Utilitario para desenvolvimento de aplicações CLI.

Notas da versão

  • Correção no nível de acesso da classe Executer.
  • Correção no nome do namespace.

Introdução

O Prompito é uma ferramenta de desenvolvimento para aplicações CLI.

Instalação

Baixe o binário no repositorio clicando aqui

  1. Baixe o binário
https://github.com/rafaelsouzars/prompito/releases

Tutorial

Mapa de argumentos:

./prompito init -r "repo"
Key Value
arg1 init
flag1 -r
arg2 repo

Para iniciar o projeto:

using prompito.Promito;

// Cria um Executer
var app = new Executer();

// Recebe o array de argumentos do app
app.ExecuteCommands(args);

Para iniciar o letreiro com as informações do app:

using prompito.Prompito;

// Cria um Executer
var app = new Executer();

// Ativa o letreito
app.ScreenAbout(true);

// Insere as informações do app
app.InsertData(new {
	AppName = "my-app",
	Version = "v1.0.0",
	Description = "My first app",
	ProfileURL = "https://github.com/<profile>"
	RepositorieURL = "https://github.com/<profile>/<my-app>"
});

// Recebe o array de argumentos do app
app.ExecuteCommands(args);

Criando um ActionCommand:

using prompito.Prompito.Classes;

class <MyActionCommand> : ActionCommand
{
	public override void Run(ArgsMapper argsMapper) 
	{
		// Implementation
	}
}

Adicionando seu ActionCommand:

using prompito.Prompito;
using <myActionCommand-namespace>;

// Inica o executor
var app = new Executer();

// Caso precise apenas utilizar o propio nome do aplicativo como comando
app.AddRootCommand(new MyRootCommand());

// Cria um comando
app.AddCommand("command", "description", new MyActionCommand());

// Recebe os argumentos do console para execução dos comandos
app.ExecuteCommands(args);

Exemplos

// MyRootAction
using prompito.Prompito.Classes;

namespace MyActionCommands
{
	class MyRootActionCommand : ActionCommand 
	{	
		public MyActionCommand()
        {            
            AddFlag(
                "-h",
                "--help",
                "Ajuda do programa"
                );
        }

		public override void Run (ArgsMapper argsMapper) 
		{
			try
            {
                MappedLineTester(argsMapper, "arg1", () => {
                
                    Console.Writeline("Informações do aplicativo");

                });                
                
                MappedLineTester(argsMapper, "arg1 flag1", "flag1=-h", () => {
                
                    Help();
                
                });
                                
               
            }
            catch (Exception exception) 
            {
                Console.WriteLine(" [ ERROR ]\n\t{0}",exception.Message);
            }
		}
	}
}

// MyAction
using prompito.Prompito.Classes;

namespace MyActionCommands
{
	class MyActionCommand : ActionCommand 
	{	
		public MyActionCommand()
        {            
            AddFlag(
                "-r",
                "--repo-hook",
                "Criar hook a partir de repositório de script"                
                );

            AddFlag(
                "-h",
                "--help",
                "Ajuda do comando"
                );
        }

		public override void Run (ArgsMapper argsMapper) 
		{
			try
            {
                MappedLineTester(argsMapper, "arg1", () => {
                
                    Console.WriteLine("Bem vindo ao comando Init"); 

                });
                
                MappedLineTester(argsMapper, "arg1 flag1 arg2", "flag1=-m", () => {
                
                    Console.WriteLine("Mensagem: {0}", argsMapper.GetArgs("arg2"));
                
                }); 
                
                MappedLineTester(argsMapper, "arg1 flag1", "flag1=-h", () => {
                
                    Help();
                
                });
                                
               
            }
            catch (Exception exception) 
            {
                Console.WriteLine(" [ ERROR ]\n\t{0}",exception.Message);
            }
		}
	}
}

// Program.cs
using prompito.Prompito;
using MyActionCommands;

var app = new Executer();

app.ScreenAbout(true);

app.InsertData(new {
	AppName = "my-app",
	Version = "v1.0.0",
	Description = "My first app",
	ProfileURL = "https://github.com/dev"
	RepositorieURL = "https://github.com/dev/my-app"
});

app.AddRootCommand(new MyRootCommand());

app.AddCommand("init", "Inicia um comando", new MyActionCommand());

app.ExecuteCommands(args);

<div align="center">

Github: rafaelsouzars

</div>

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 84 1/12/2026
1.0.0 199 9/3/2025

Correção nas permissões de classes.