Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/cli/Neuphonic.CLI/Commands/AgentsApiGroupCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@

namespace Neuphonic.CLI.Commands;

internal static class AgentsApiGroupCommand
internal static partial class AgentsApiGroupCommand
{
static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"agents", @"Agents endpoint commands.");
command.Subcommands.Add(AgentsCreateAgentCommandApiCommand.Create());
command.Subcommands.Add(AgentsDeleteAgentCommandApiCommand.Create());
command.Subcommands.Add(AgentsGetAgentCommandApiCommand.Create());
command.Subcommands.Add(AgentsListAgentsCommandApiCommand.Create());
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"create-agent", @"Create agent
Expand Down Expand Up @@ -113,6 +115,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"delete-agent", @"Delete agent
Expand All @@ -59,6 +61,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"get-agent", @"Get agent
Expand All @@ -59,6 +61,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"list-agents", @"List agents
Expand All @@ -55,6 +57,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
5 changes: 4 additions & 1 deletion src/cli/Neuphonic.CLI/Commands/ApiCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@

namespace Neuphonic.CLI.Commands;

internal static class ApiCommand
internal static partial class ApiCommand
{
static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command("api", "Generated endpoint commands.");

command.Subcommands.Add(AgentsApiGroupCommand.Create());
command.Subcommands.Add(TtsApiGroupCommand.Create());
command.Subcommands.Add(VoicesApiGroupCommand.Create());
CustomizeCommand(ref command);
return command;
}
}
5 changes: 4 additions & 1 deletion src/cli/Neuphonic.CLI/Commands/TtsApiGroupCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

namespace Neuphonic.CLI.Commands;

internal static class TtsApiGroupCommand
internal static partial class TtsApiGroupCommand
{
static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"tts", @"Tts endpoint commands.");
command.Subcommands.Add(TtsCreateSseJwtTokenCommandApiCommand.Create());
command.Subcommands.Add(TtsPingCommandApiCommand.Create());
command.Subcommands.Add(TtsSpeakWithSseCommandApiCommand.Create());
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"create-sse-jwt-token", @"Create SSE JWT token
Expand All @@ -59,6 +61,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
3 changes: 3 additions & 0 deletions src/cli/Neuphonic.CLI/Commands/TtsPingCommandApiCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ private static string FormatResponse(ParseResult parseResult, string value, glob
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"ping", @"Ping");
Expand All @@ -54,6 +56,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ internal static partial class TtsSpeakWithSseCommandApiCommand
Hidden = true,
};

static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"speak-with-sse", @"Text to speech over SSE
Expand Down Expand Up @@ -169,6 +171,7 @@ await CliRuntime.WriteResponseLineAsync(
cancellationToken: cancellationToken).ConfigureAwait(false);
}
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
5 changes: 4 additions & 1 deletion src/cli/Neuphonic.CLI/Commands/VoicesApiGroupCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@

namespace Neuphonic.CLI.Commands;

internal static class VoicesApiGroupCommand
internal static partial class VoicesApiGroupCommand
{
static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"voices", @"Voices endpoint commands.");
command.Subcommands.Add(VoicesCloneVoiceCommandApiCommand.Create());
command.Subcommands.Add(VoicesDeleteVoiceCommandApiCommand.Create());
command.Subcommands.Add(VoicesListVoicesCommandApiCommand.Create());
command.Subcommands.Add(VoicesUpdateVoiceCommandApiCommand.Create());
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"clone-voice", @"Clone voice
Expand Down Expand Up @@ -98,6 +100,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"delete-voice", @"Delete cloned voice
Expand All @@ -59,6 +61,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"list-voices", @"List voices
Expand All @@ -55,6 +57,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ private static string FormatResponse(ParseResult parseResult, global::Neuphonic.
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"update-voice", @"Update cloned voice
Expand Down Expand Up @@ -131,6 +133,7 @@ await CliRuntime.WriteResponseAsync(
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
CustomizeCommand(ref command);
return command;
}
}
4 changes: 2 additions & 2 deletions src/cli/Neuphonic.CLI/Neuphonic.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="8.0.0">
<PackageReference Include="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.CommandLine" Version="2.0.12" />
<PackageReference Include="System.CommandLine" Version="2.0.7" />
<ProjectReference Include="../../libs/Neuphonic/Neuphonic.csproj" />
</ItemGroup>
</Project>
11 changes: 9 additions & 2 deletions src/cli/Neuphonic.CLI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ dotnet tool install --global Neuphonic.CLI --prerelease

```bash
neuphonic --help
neuphonic api --help
```
neuphonic agents --help
```

## Customization

Generated operation, tag, and API group command classes are partial. Implement
`static partial void CustomizeCommand(ref Command command)` in a separate source
file to add aliases or validators, change the action, or replace a command. The
hook runs after the generated command has been configured.
Loading