Nothing runs until you say so
Setters accumulate intent; toArgv() shows the exact command line without
running it. The counterpart of ActiveRecord’s to_sql.
import { AssistantEvent, Claude, Command } from 'activecli';
const command = Command.open(Claude, { workingDir: '/path/to/project' });
command .subscribe((event) => { if (event instanceof AssistantEvent) process.stdout.write(event.text); }) .onPermission((request) => request.approve());
await command.setMessage('fix the failing test').send();
command.close();Nothing runs until you say so
Setters accumulate intent; toArgv() shows the exact command line without
running it. The counterpart of ActiveRecord’s to_sql.
One interface, many CLIs
An abstract adapter with a concrete one per backend. Swapping which CLI you drive is choosing a different subclass, not rewriting the call site.
The hard parts are the point
Finding the executable, Windows quoting, WSL paths, killing the whole process tree, surviving a host that was hard-killed.
Verified on three platforms
Linux, macOS and Windows in CI — because half of this library is code that cannot be exercised on the machine it was written on.