Skip to content
Open
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
21 changes: 6 additions & 15 deletions lib/src/mcp/mcp_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,37 +57,28 @@ Start the MCP (Model Context Protocol) server. WARNING: This is an experimental
try {
_logger
..info('Starting Very Good CLI MCP Server...')
..info(
'Server will listen on stdin/stdout for MCP protocol messages',
);
..info('Server will listen on stdin/stdout for MCP protocol messages');

// Create a channel from stdin/stdout using the stdio helper
final channel = _channelFactory();

// Create and start the MCP server
final server = _serverFactory(
channel: channel,
logger: _logger,
);
final server = _serverFactory(channel: channel, logger: _logger);

_logger
..info('MCP Server started successfully')
..info('Available tools:')
..info('''
- create: Create a very good Dart or Flutter project in seconds based on the provided template. Each template has a corresponding sub-command.''')
..info(' - test: Run tests in a Dart or Flutter project.')
..info(
'''
..info('''
- packages_get: Install or update Dart/Flutter package dependencies.
Use after creating a project or modifying pubspec.yaml.
Supports recursive installation and package exclusion.''',
)
..info(
'''
Supports recursive installation and package exclusion.''')
..info('''
- packages_check_licenses: Verify package licenses for compliance and validation in a Dart or Flutter project.
Identifies license types (MIT, BSD, Apache, etc.) for all
dependencies. Use to ensure license compatibility.''',
);
dependencies. Use to ensure license compatibility.''');

// Wait for the server to complete
// (this will block until the connection is closed)
Expand Down
10 changes: 2 additions & 8 deletions lib/src/mcp/mcp_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,7 @@ Only one value can be selected.
cliArgs.addAll(['--org-name', args['org_name']! as String]);
}
if (args['output_directory'] != null) {
cliArgs.addAll([
'-o',
args['output_directory']! as String,
]);
cliArgs.addAll(['-o', args['output_directory']! as String]);
}
if (args['application_id'] != null) {
cliArgs.addAll(['--application-id', args['application_id']! as String]);
Expand All @@ -308,10 +305,7 @@ Only one value can be selected.
}

List<String> _parseTest(Map<String, Object?> args) {
final cliArgs = <String>[
if (args['dart'] == true) 'dart',
'test',
];
final cliArgs = <String>[if (args['dart'] == true) 'dart', 'test'];

if (args['directory'] != null) {
cliArgs.add(args['directory']! as String);
Expand Down
29 changes: 15 additions & 14 deletions lib/src/pub_license/spdx_license.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/src/pubspec_lock/pubspec_lock.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ enum PubspecLockPackageDependencyType {
/// See also:
///
/// * [Dart's dependency override documentation](https://dart.dev/tools/pub/dependencies#dependency-overrides)
directOverridden._('direct overridden')
;
directOverridden._('direct overridden');

const PubspecLockPackageDependencyType._(this.value);

Expand Down
9 changes: 8 additions & 1 deletion tool/spdx_license/test/spdx_license.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading