Acme-Claude-Shell
view release on metacpan or search on metacpan
bin/acme_claude_shell view on Meta::CPAN
working_dir => $opts{'dir'},
colorful => $opts{'color'},
($opts{'model'} ? (model => $opts{'model'}) : ()),
);
}
sub show_help {
my $c = $opts{'color'};
if ($c) {
print colored(['bold', 'cyan'], "\n Acme::Claude::Shell"), " - AI-powered interactive shell\n\n";
} else {
print "\n Acme::Claude::Shell - AI-powered interactive shell\n\n";
}
print_section("Usage", $c);
print " acme_claude_shell [options]\n";
print " acme_claude_shell -c \"find all large log files\"\n\n";
print_section("Options", $c);
print_opt("-n, --dry-run", "Preview mode - show commands without executing", $c);
bin/acme_claude_shell view on Meta::CPAN
print " - MCP tools Custom shell execution tools\n";
print " - Hooks Safety confirmation before running\n";
print " - Dry-run Preview without executing\n";
print " - IO::Async Non-blocking spinners\n";
print " - CLI utils Colored output, menus, spinners\n\n";
}
sub show_version {
my $c = $opts{'color'};
if ($c) {
print colored(['bold', 'cyan'], "Acme::Claude::Shell"), " version $VERSION\n";
} else {
print "Acme::Claude::Shell version $VERSION\n";
}
}
sub print_section {
my ($title, $color) = @_;
if ($color) {
print colored(['bold', 'yellow'], "$title:\n");
} else {
print "$title:\n";
}
}
sub print_opt {
my ($opt, $desc, $color) = @_;
if ($color) {
printf " %-25s %s\n", colored(['green'], $opt), $desc;
} else {
lib/Acme/Claude/Shell/Session.pm view on Meta::CPAN
# Create persistent session client
$self->_client(session(
options => $options,
loop => $self->loop,
));
# REPL loop
while (1) {
my $prompt_str = $self->colorful
? colored(['bold', 'green'], 'acme_claude_shell> ')
: 'acme_claude_shell> ';
my $input = $term->readline($prompt_str);
last unless defined $input;
$input =~ s/^\s+|\s+$//g;
next unless length $input;
# Built-in commands
last if $input =~ /^(exit|quit)$/i;
lib/Acme/Claude/Shell/Tools.pm view on Meta::CPAN
$new_cmd = prompt("Edit command:", $command);
} else {
print "Edit command [$command]: ";
$new_cmd = <STDIN>;
chomp $new_cmd if defined $new_cmd;
$new_cmd = $command unless length($new_cmd // '');
}
if ($colorful) {
status('info', "Modified command:");
print colored(['bold', 'white'], " $new_cmd\n\n");
} else {
print "Modified: $new_cmd\n";
}
# For dangerous commands after editing, still require confirmation
if (_check_dangerous($new_cmd) && $session->safe_mode) {
my $confirmed;
if ($colorful) {
$confirmed = ask_yn("Are you SURE you want to run this command?", 'n');
} else {
( run in 1.563 second using v1.01-cache-2.11-cpan-f56aa216473 )