dart_acp 0.1.1 copy "dart_acp: ^0.1.1" to clipboard
dart_acp: ^0.1.1 copied to clipboard

A Dart implementation of the Agent Client Protocol (ACP).

example/main.dart

// ignore_for_file: avoid_print

import 'dart:io';

import 'package:dart_acp/dart_acp.dart';

void main() async {
  final client = await AcpClient.start(
    config: AcpConfig(
      agentCommand: 'npx',
      agentArgs: ['@zed-industries/claude-code-acp'],
    ),
  );

  final workspaceRoot = Directory.current.path;
  final sessionId = await client.newSession(workspaceRoot);
  final stream = client.prompt(
    sessionId: sessionId,
    content: 'examine @main.dart and explain what it does.',
  );

  await for (final update in stream) {
    print(update.text);
  }

  await client.dispose();
  exit(0);
}
0
likes
160
points
157
downloads

Publisher

verified publishersellsbrothers.com

Weekly Downloads

A Dart implementation of the Agent Client Protocol (ACP).

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args, json_rpc_2, logging, mcp_dart, meta, mime, path, stream_channel

More

Packages that depend on dart_acp