diff --git a/Directory.Build.props b/Directory.Build.props
index a01c875c..36cbe0e8 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -37,7 +37,7 @@
$(SolutionDir)
$(MSBuildThisFileDirectory)\
5.2.0
- 7.0.0-pr.36
+ 7.0.0-pr.40
2.0.6
1.0.0
true
diff --git a/src/client/LibplanetConsole.Clients.Executable/EntryCommandContext.cs b/src/client/LibplanetConsole.Clients.Executable/EntryCommandContext.cs
index 16559221..82b3e734 100644
--- a/src/client/LibplanetConsole.Clients.Executable/EntryCommandContext.cs
+++ b/src/client/LibplanetConsole.Clients.Executable/EntryCommandContext.cs
@@ -2,7 +2,15 @@
namespace LibplanetConsole.Clients.Executable;
+[CommandSummary("Run a client or provide related tools to connect to the node.")]
internal sealed class EntryCommandContext(params ICommand[] commands)
: CommandContextBase(commands)
{
+ protected override void OnEmptyExecute()
+ {
+ if (GetCommand(["help"]) is IExecutable executable)
+ {
+ executable.Execute();
+ }
+ }
}
diff --git a/src/client/LibplanetConsole.Clients.Executable/EntryCommands/KeyCommand.cs b/src/client/LibplanetConsole.Clients.Executable/EntryCommands/KeyCommand.cs
index 63c4dae1..15c43c8c 100644
--- a/src/client/LibplanetConsole.Clients.Executable/EntryCommands/KeyCommand.cs
+++ b/src/client/LibplanetConsole.Clients.Executable/EntryCommands/KeyCommand.cs
@@ -1,7 +1,9 @@
+using System.ComponentModel;
using LibplanetConsole.Common.Commands;
namespace LibplanetConsole.Clients.Executable.EntryCommands;
+[Category("Tools")]
internal sealed class KeyCommand : KeyCommandBase
{
}
diff --git a/src/client/LibplanetConsole.Clients.Executable/EntryCommands/SchemaCommand.cs b/src/client/LibplanetConsole.Clients.Executable/EntryCommands/SchemaCommand.cs
index f2a25eb2..330bf861 100644
--- a/src/client/LibplanetConsole.Clients.Executable/EntryCommands/SchemaCommand.cs
+++ b/src/client/LibplanetConsole.Clients.Executable/EntryCommands/SchemaCommand.cs
@@ -1,32 +1,19 @@
+using System.ComponentModel;
using JSSoft.Commands;
+using LibplanetConsole.Common;
using LibplanetConsole.Frameworks;
namespace LibplanetConsole.Clients.Executable.EntryCommands;
+[CommandSummary("Creates a schema of the application settings.")]
+[Category("Tools")]
internal sealed class SchemaCommand : CommandBase
{
- [CommandProperty("output")]
- public string OutputPath { get; set; } = string.Empty;
-
protected override void OnExecute()
{
var schemaBuilder = new ApplicationSettingsSchemaBuilder();
var json = schemaBuilder.Build();
- var outputPath = OutputPath;
- if (outputPath == string.Empty)
- {
- Out.WriteLine(json);
- }
- else
- {
- var directory = Path.GetDirectoryName(outputPath)
- ?? throw new InvalidOperationException("The directory is not found.");
- if (Directory.Exists(directory) is false)
- {
- Directory.CreateDirectory(directory);
- }
-
- File.WriteAllText(outputPath, json);
- }
+ var colorizedString = JsonUtility.ToColorizedString(json);
+ Out.WriteLine(colorizedString);
}
}
diff --git a/src/client/LibplanetConsole.Clients.Executable/Program.cs b/src/client/LibplanetConsole.Clients.Executable/Program.cs
index cc55dd7a..5eec8436 100644
--- a/src/client/LibplanetConsole.Clients.Executable/Program.cs
+++ b/src/client/LibplanetConsole.Clients.Executable/Program.cs
@@ -5,11 +5,11 @@
var commands = new ICommand[]
{
+ new InitializeCommand(),
+ new StartCommand(),
new RunCommand(),
new KeyCommand(),
new SchemaCommand(),
- new StartCommand(),
- new InitializeCommand(),
};
var commandContext = new EntryCommandContext(commands);
await commandContext.ExecuteAsync(args);
diff --git a/src/common/LibplanetConsole.Common/Commands/KeyCommandBase.cs b/src/common/LibplanetConsole.Common/Commands/KeyCommandBase.cs
index f32241ec..67a389cd 100644
--- a/src/common/LibplanetConsole.Common/Commands/KeyCommandBase.cs
+++ b/src/common/LibplanetConsole.Common/Commands/KeyCommandBase.cs
@@ -33,9 +33,9 @@ public void New(
}
[CommandMethod]
- [CommandSummary("Displays the public key of the private key.")]
+ [CommandSummary("Displays the public key from the given private key.")]
public void Public(
- [CommandSummary("The private key.")]
+ [CommandSummary("Indicates the private key that corresponds to the public key.")]
string privateKey)
{
var key = AppPrivateKey.Parse(privateKey);
@@ -48,9 +48,9 @@ public void Public(
}
[CommandMethod]
- [CommandSummary("Displays the address of the private key or public key.")]
+ [CommandSummary("Displays the public key from the given private or public key")]
public void Address(
- [CommandSummary("The private key or public key.")]
+ [CommandSummary("Indicates the private or public key that corresponds to the address.")]
string key)
{
var info = new
diff --git a/src/console/LibplanetConsole.Consoles.Executable/ApplicationSettings.cs b/src/console/LibplanetConsole.Consoles.Executable/ApplicationSettings.cs
index 1dc25c04..c75828f2 100644
--- a/src/console/LibplanetConsole.Consoles.Executable/ApplicationSettings.cs
+++ b/src/console/LibplanetConsole.Consoles.Executable/ApplicationSettings.cs
@@ -10,8 +10,8 @@ namespace LibplanetConsole.Consoles.Executable;
internal sealed record class ApplicationSettings
{
[CommandProperty]
- [CommandSummary("The endpoint of the console to run." +
- "If omitted, one of the random ports will be used.")]
+ [CommandSummary("The endpoint of the libplanet-console. " +
+ "If omitted, a random endpoint is used.")]
[AppEndPoint]
public string EndPoint { get; init; } = string.Empty;
@@ -20,16 +20,15 @@ internal sealed record class ApplicationSettings
#else
[CommandProperty(InitValue = 4)]
#endif
- [CommandSummary("The number of nodes to run.\n" +
- "If omitted, the default value is 4.\n" +
- "If --nodes option is set, this option is ignored.")]
+ [CommandSummary("The number of nodes to run. If omitted, 4 nodes are run.\n" +
+ "Mutually exclusive with '--nodes' option.")]
[CommandPropertyExclusion(nameof(Nodes))]
[JsonIgnore]
public int NodeCount { get; init; }
[CommandProperty]
- [CommandSummary("The private keys of the nodes to run.\n" +
- "Example: --nodes \"key1,key2,...\"")]
+ [CommandSummary("The private keys of the nodes to run. ex) --nodes \"key1,key2,...\"\n" +
+ "Mutually exclusive with '--node-count' option.")]
[CommandPropertyExclusion(nameof(NodeCount))]
[JsonIgnore]
public string[] Nodes { get; init; } = [];
@@ -39,26 +38,19 @@ internal sealed record class ApplicationSettings
#else
[CommandProperty(InitValue = 2)]
#endif
- [CommandSummary("The number of clients to run.\n" +
- "If omitted, the default value is 2.\n" +
- "If --clients option is set, this option is ignored.")]
+ [CommandSummary("The number of clients to run. If omitted, 2 clients are run.\n" +
+ "Mutually exclusive with '--clients' option.")]
[CommandPropertyExclusion(nameof(Clients))]
[JsonIgnore]
public int ClientCount { get; init; }
[CommandProperty(InitValue = new string[] { })]
- [CommandSummary("The private keys of the clients to run.\n" +
- "Example: --clients \"key1,key2,...\"")]
+ [CommandSummary("The private keys of the clients to run. ex) --clients \"key1,key2,...\"\n" +
+ "Mutually exclusive with '--client-count' option.")]
[CommandPropertyExclusion(nameof(ClientCount))]
[JsonIgnore]
public string[] Clients { get; init; } = [];
- [CommandProperty]
- [CommandSummary("The directory path to store data of each node. " +
- "If omitted, the data is stored in memory.")]
- [JsonIgnore]
- public string RepositoryPath { get; init; } = string.Empty;
-
[CommandProperty]
[CommandSummary("The directory path to store log.")]
public string LogPath { get; set; } = string.Empty;
diff --git a/src/console/LibplanetConsole.Consoles.Executable/EntryCommandContext.cs b/src/console/LibplanetConsole.Consoles.Executable/EntryCommandContext.cs
index 2a7272b5..17e9fa43 100644
--- a/src/console/LibplanetConsole.Consoles.Executable/EntryCommandContext.cs
+++ b/src/console/LibplanetConsole.Consoles.Executable/EntryCommandContext.cs
@@ -2,7 +2,15 @@
namespace LibplanetConsole.Consoles.Executable;
+[CommandSummary("Run nodes and clients or provide related tools.")]
internal sealed class EntryCommandContext(params ICommand[] commands)
: CommandContextBase(commands)
{
+ protected override void OnEmptyExecute()
+ {
+ if (GetCommand(["help"]) is IExecutable executable)
+ {
+ executable.Execute();
+ }
+ }
}
diff --git a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/GenesisCommand.cs b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/GenesisCommand.cs
index 5643c504..3e0d3f57 100644
--- a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/GenesisCommand.cs
+++ b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/GenesisCommand.cs
@@ -1,7 +1,9 @@
+using System.ComponentModel;
using LibplanetConsole.Common.Commands;
namespace LibplanetConsole.Consoles.Executable.EntryCommands;
+[Category("Tools")]
internal sealed class GenesisCommand : GenesisCommandBase
{
}
diff --git a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/InitializeCommand.cs b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/InitializeCommand.cs
index 76932b59..833942f8 100644
--- a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/InitializeCommand.cs
+++ b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/InitializeCommand.cs
@@ -1,3 +1,4 @@
+using System.ComponentModel;
using JSSoft.Commands;
using LibplanetConsole.Common;
using LibplanetConsole.Common.DataAnnotations;
@@ -19,7 +20,7 @@ public InitializeCommand()
[CommandSummary("The directory path used to initialize a repository.")]
[Path(
Type = PathType.Directory, ExistsType = PathExistsType.NotExistOrEmpty)]
- public string OutputPath { get; set; } = string.Empty;
+ public string RepositoryPath { get; set; } = string.Empty;
[CommandProperty]
[CommandSummary("The endpoint of the libplanet-console. " +
@@ -27,16 +28,6 @@ public InitializeCommand()
[AppEndPoint]
public string EndPoint { get; set; } = string.Empty;
- [CommandProperty]
- [CommandSummary("The private key of the genesis block. " +
- "if omitted, a random private key is used.")]
- [AppPrivateKey]
- public string GenesisKey { get; set; } = string.Empty;
-
- [CommandProperty("date-time")]
- [CommandSummary("The timestamp of the genesis block. ex) \"2021-01-01T00:00:00Z\"")]
- public DateTimeOffset DateTimeOffset { get; set; }
-
[CommandProperty(InitValue = 4)]
[CommandSummary("The number of nodes to create. If omitted, 4 nodes are created.\n" +
"Mutually exclusive with '--nodes' option.")]
@@ -67,6 +58,18 @@ public InitializeCommand()
[CommandSummary("If set, the command does not output any information.")]
public bool Quiet { get; set; }
+ [CommandProperty]
+ [CommandSummary("The private key of the genesis block. " +
+ "if omitted, a random private key is used.")]
+ [AppPrivateKey]
+ [Category("Genesis")]
+ public string GenesisKey { get; set; } = string.Empty;
+
+ [CommandProperty("date-time")]
+ [CommandSummary("The timestamp of the genesis block. ex) \"2021-01-01T00:00:00Z\"")]
+ [Category("Genesis")]
+ public DateTimeOffset DateTimeOffset { get; set; }
+
protected override void OnExecute()
{
var genesisKey = AppPrivateKey.ParseOrRandom(GenesisKey);
@@ -74,8 +77,9 @@ protected override void OnExecute()
var prevEndPoint = EndPoint != string.Empty ? endPoint : null;
var nodeOptions = GetNodeOptions(ref prevEndPoint);
var clientOptions = GetClientOptions(ref prevEndPoint);
- var outputPath = Path.GetFullPath(OutputPath);
- var dateTimeOffset = DateTimeOffset.UtcNow;
+ var outputPath = Path.GetFullPath(RepositoryPath);
+ var dateTimeOffset = DateTimeOffset != DateTimeOffset.MinValue
+ ? DateTimeOffset : DateTimeOffset.UtcNow;
var repository = new Repository(endPoint, nodeOptions, clientOptions)
{
Genesis = BlockUtility.SerializeBlock(BlockUtility.CreateGenesisBlock(
diff --git a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/KeyCommand.cs b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/KeyCommand.cs
index 207bce7b..c4a953b5 100644
--- a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/KeyCommand.cs
+++ b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/KeyCommand.cs
@@ -1,7 +1,9 @@
+using System.ComponentModel;
using LibplanetConsole.Common.Commands;
namespace LibplanetConsole.Consoles.Executable.EntryCommands;
+[Category("Tools")]
internal sealed class KeyCommand : KeyCommandBase
{
}
diff --git a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/RunCommand.cs b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/RunCommand.cs
index efba0ff3..7476d4d5 100644
--- a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/RunCommand.cs
+++ b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/RunCommand.cs
@@ -4,6 +4,7 @@
namespace LibplanetConsole.Consoles.Executable.EntryCommands;
[CommandSummary("Run the Libplanet console.")]
+[CommandExample("run --end-point localhost:5000 --node-count 4 --client-count 2")]
internal sealed class RunCommand : CommandAsyncBase, ICustomCommandDescriptor
{
private readonly ApplicationSettingsCollection _settingsCollection = new();
diff --git a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/StartCommand.cs b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/StartCommand.cs
index 7ede0d27..aa0a451d 100644
--- a/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/StartCommand.cs
+++ b/src/console/LibplanetConsole.Consoles.Executable/EntryCommands/StartCommand.cs
@@ -1,12 +1,14 @@
using JSSoft.Commands;
+using LibplanetConsole.DataAnnotations;
namespace LibplanetConsole.Consoles.Executable.EntryCommands;
-[CommandSummary("Run the Libplanet console with repository path.")]
+[CommandSummary("Run the libplanet-console using the given repository path.")]
internal sealed class StartCommand : CommandAsyncBase
{
[CommandPropertyRequired]
[CommandSummary("The path of the repository.")]
+ [Path(Type = PathType.Directory, ExistsType = PathExistsType.Exist)]
public string RepositoryPath { get; set; } = string.Empty;
protected override async Task OnExecuteAsync(CancellationToken cancellationToken)
diff --git a/src/console/LibplanetConsole.Consoles.Executable/Program.cs b/src/console/LibplanetConsole.Consoles.Executable/Program.cs
index fe816f65..33c510b0 100644
--- a/src/console/LibplanetConsole.Consoles.Executable/Program.cs
+++ b/src/console/LibplanetConsole.Consoles.Executable/Program.cs
@@ -5,10 +5,10 @@
var commands = new ICommand[]
{
- new RunCommand(),
- new KeyCommand(),
new InitializeCommand(),
new StartCommand(),
+ new RunCommand(),
+ new KeyCommand(),
new GenesisCommand(),
};
var commandContext = new EntryCommandContext(commands);
diff --git a/src/console/LibplanetConsole.Consoles/Commands/TxCommand.cs b/src/console/LibplanetConsole.Consoles/Commands/TxCommand.cs
index 188652b5..b3b6ae88 100644
--- a/src/console/LibplanetConsole.Consoles/Commands/TxCommand.cs
+++ b/src/console/LibplanetConsole.Consoles/Commands/TxCommand.cs
@@ -7,7 +7,7 @@ namespace LibplanetConsole.Consoles.Commands;
[Export(typeof(ICommand))]
[method: ImportingConstructor]
-[CommandSummary("Sends a transaction to store simple string.")]
+[CommandSummary("Sends a transaction using a simple string.")]
internal sealed class TxCommand(ApplicationBase application) : CommandAsyncBase
{
[CommandPropertyRequired]
diff --git a/src/node/LibplanetConsole.Nodes.Executable/EntryCommandContext.cs b/src/node/LibplanetConsole.Nodes.Executable/EntryCommandContext.cs
index a2dedd6d..c56c6a07 100644
--- a/src/node/LibplanetConsole.Nodes.Executable/EntryCommandContext.cs
+++ b/src/node/LibplanetConsole.Nodes.Executable/EntryCommandContext.cs
@@ -2,7 +2,15 @@
namespace LibplanetConsole.Nodes.Executable;
+[CommandSummary("Run a node or provide related tools.")]
internal sealed class EntryCommandContext(params ICommand[] commands)
: CommandContextBase(commands)
{
+ protected override void OnEmptyExecute()
+ {
+ if (GetCommand(["help"]) is IExecutable executable)
+ {
+ executable.Execute();
+ }
+ }
}
diff --git a/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/GenesisCommand.cs b/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/GenesisCommand.cs
index e1a9a626..1161b579 100644
--- a/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/GenesisCommand.cs
+++ b/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/GenesisCommand.cs
@@ -1,7 +1,9 @@
+using System.ComponentModel;
using LibplanetConsole.Common.Commands;
namespace LibplanetConsole.Nodes.Executable.EntryCommands;
+[Category("Tools")]
internal sealed class GenesisCommand : GenesisCommandBase
{
}
diff --git a/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/InitializeCommand.cs b/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/InitializeCommand.cs
index 1a2b6847..67c06414 100644
--- a/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/InitializeCommand.cs
+++ b/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/InitializeCommand.cs
@@ -1,3 +1,4 @@
+using System.ComponentModel;
using JSSoft.Commands;
using LibplanetConsole.Common;
using LibplanetConsole.Common.DataAnnotations;
@@ -7,7 +8,7 @@
namespace LibplanetConsole.Nodes.Executable.EntryCommands;
-[CommandSummary("Create a repository to run a libplanet-node")]
+[CommandSummary("Create a new repository to run the libplanet-node")]
internal sealed class InitializeCommand : CommandBase
{
public InitializeCommand()
@@ -16,41 +17,75 @@ public InitializeCommand()
}
[CommandPropertyRequired]
- [CommandSummary("The directory path to create repository.")]
+ [CommandSummary("The directory path used to initialize a repository.")]
[Path(Type = PathType.Directory, ExistsType = PathExistsType.NotExistOrEmpty)]
- public string OutputPath { get; set; } = string.Empty;
+ public string RepositoryPath { get; set; } = string.Empty;
[CommandProperty]
- [CommandSummary("Indicates the private key of the node. " +
+ [CommandSummary("Indicates the private key of the libplanet-node. " +
"If omitted, a random private key is used.")]
[AppPrivateKey]
public string PrivateKey { get; init; } = string.Empty;
[CommandProperty]
+ [CommandSummary("The endpoint of the libplanet-node. " +
+ "If omitted, a random endpoint is used.")]
[AppEndPoint]
public string EndPoint { get; set; } = string.Empty;
[CommandProperty]
+ [CommandSummary("The directory path to store the block. " +
+ "If omitted, the 'store' directory is used.")]
+ [Path(
+ Type = PathType.Directory, ExistsType = PathExistsType.NotExistOrEmpty, AllowEmpty = true)]
public string StorePath { get; set; } = string.Empty;
[CommandProperty]
+ [CommandSummary("The file path to store the application logs." +
+ "If omitted, the 'app.log' file is used.")]
+ [Path(Type = PathType.File, ExistsType = PathExistsType.NotExistOrEmpty, AllowEmpty = true)]
public string LogPath { get; set; } = string.Empty;
[CommandProperty]
+ [CommandSummary("The file path to store logs other than application logs." +
+ "If omitted, the 'library.log' file is used.")]
+ [Path(Type = PathType.File, ExistsType = PathExistsType.NotExistOrEmpty, AllowEmpty = true)]
public string LibraryLogPath { get; set; } = string.Empty;
[CommandProperty]
+ [CommandSummary("The file path of the genesis." +
+ "If omitted, the 'genesis' file is used.")]
+ [Path(Type = PathType.File, ExistsType = PathExistsType.NotExistOrEmpty, AllowEmpty = true)]
public string GenesisPath { get; set; } = string.Empty;
[CommandPropertySwitch]
+ [CommandSummary("If set, the genesis is not stored at the specified genesis path.")]
+ [Category("Genesis")]
public bool NoGenesis { get; set; }
+ [CommandProperty]
+ [CommandSummary("The private key of the genesis block. " +
+ "if omitted, a random private key is used.\n" +
+ "Mutually exclusive with '--no-genesis' option.")]
+ [CommandPropertyExclusion(nameof(NoGenesis))]
+ [AppPrivateKey]
+ [Category("Genesis")]
+ public string GenesisKey { get; set; } = string.Empty;
+
+ [CommandProperty("date-time")]
+ [CommandSummary("The timestamp of the genesis block. ex) \"2021-01-01T00:00:00Z\"\n" +
+ "Mutually exclusive with '--no-genesis' option.")]
+ [Category("Genesis")]
+ [CommandPropertyExclusion(nameof(NoGenesis))]
+ public DateTimeOffset DateTimeOffset { get; set; }
+
[CommandPropertySwitch("quiet", 'q')]
+ [CommandSummary("If set, the command does not output any information.")]
public bool Quiet { get; set; }
protected override void OnExecute()
{
- var outputPath = Path.GetFullPath(OutputPath);
+ var outputPath = Path.GetFullPath(RepositoryPath);
var endPoint = AppEndPoint.ParseOrNext(EndPoint);
var privateKey = AppPrivateKey.ParseOrRandom(PrivateKey);
var storePath = Path.Combine(outputPath, StorePath.Fallback("store"));
@@ -74,9 +109,10 @@ protected override void OnExecute()
if (NoGenesis is false)
{
- var genesisKey = privateKey;
+ var genesisKey = AppPrivateKey.ParseOrRandom(GenesisKey);
var validatorKeys = new AppPublicKey[] { privateKey.PublicKey };
- var dateTimeOffset = DateTimeOffset.UtcNow;
+ var dateTimeOffset = DateTimeOffset != DateTimeOffset.MinValue
+ ? DateTimeOffset : DateTimeOffset.UtcNow;
var genesis = BlockUtility.CreateGenesisString(
genesisKey, validatorKeys, dateTimeOffset);
File.WriteAllLines(genesisPath, [genesis]);
diff --git a/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/KeyCommand.cs b/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/KeyCommand.cs
index 73b89b78..9f72d70b 100644
--- a/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/KeyCommand.cs
+++ b/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/KeyCommand.cs
@@ -1,7 +1,9 @@
+using System.ComponentModel;
using LibplanetConsole.Common.Commands;
namespace LibplanetConsole.Nodes.Executable.EntryCommands;
+[Category("Tools")]
internal sealed class KeyCommand : KeyCommandBase
{
}
diff --git a/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/SchemaCommand.cs b/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/SchemaCommand.cs
index d73ce722..ec3f53e1 100644
--- a/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/SchemaCommand.cs
+++ b/src/node/LibplanetConsole.Nodes.Executable/EntryCommands/SchemaCommand.cs
@@ -1,9 +1,12 @@
+using System.ComponentModel;
using JSSoft.Commands;
using LibplanetConsole.Common;
using LibplanetConsole.Frameworks;
namespace LibplanetConsole.Nodes.Executable.EntryCommands;
+[CommandSummary("Creates a schema of the application settings.")]
+[Category("Tools")]
internal sealed class SchemaCommand : CommandBase
{
protected override void OnExecute()
diff --git a/src/node/LibplanetConsole.Nodes.Executable/Program.cs b/src/node/LibplanetConsole.Nodes.Executable/Program.cs
index be1dcc0d..5322e66f 100644
--- a/src/node/LibplanetConsole.Nodes.Executable/Program.cs
+++ b/src/node/LibplanetConsole.Nodes.Executable/Program.cs
@@ -5,12 +5,12 @@
var commands = new ICommand[]
{
+ new InitializeCommand(),
+ new StartCommand(),
new RunCommand(),
new KeyCommand(),
new GenesisCommand(),
new SchemaCommand(),
- new StartCommand(),
- new InitializeCommand(),
};
var commandContext = new EntryCommandContext(commands);
await commandContext.ExecuteAsync(args);