NAME
Langertha::Raider::CLI - Autonomous CLI agent that can browse directories, edit files, and run bash commands
VERSION
version 0.504
SYNOPSIS
use Langertha::Raider::CLI;
my $app = Langertha::Raider::CLI->new(
# engine/model/api_key auto-detected from *_API_KEY env vars
root => '/path/to/project',
claude => 1, # read the Claude Code layout
skill_sources => [ { type => 'dir', path => 'my-skills' } ],
engine_options => { temperature => 0.2 },
);
my $result = $app->run('Explore the repo and summarize it.');
print $result;
DESCRIPTION
Langertha::Raider::CLI wraps Langertha::Raider with a standard toolbox for a working coding/system agent:
Local filesystem access, confined to "root" in Langertha::Raider::Application (Langertha::Raider::FileTools).
Full shell via Langertha::Raider::BashTools (the
bashtool, withbash_outputandkill_shellfor background commands, andmonitorto stream the output of one as notifications), started in the root but not confined to it. In the REPL the model can also schedule prompts for later turns (cron_create, Langertha::Raider::CronTools).Web search + fetch via Net::Async::WebSearch and Net::Async::HTTP (Langertha::Raider::WebTools).
Optional Perl-native tools via Langertha::Raider::PerlTools, and the Hall tools (Langertha::Raider::HallTools) when a Hall started the raider. The tool list in the prompt is generated from the tools the engine is offered ("mission" in Langertha::Raider::Application).
Persona and power packs via Langertha::Raider::Packs.
Per-engine cheap-model defaults and automatic engine selection from the first
*_API_KEYenv var found (Langertha::Raider::EngineResolver).The Claude Code layout (ADR 0019):
CLAUDE.mdmemory with imports and nested files,.claude/settings*.json, plugin skills -- automatic in a project set up only for Claude Code, by--claudeorclaude: trueelsewhere;AGENTS.mdby--openai.Skills from
.raider/skills,~/.raider/skills, the Claude skill directories and--skills DIR, listed in the prompt and loaded on demand with theskilltool.Engine-attribute config via
.raider.ymlin the root plusengine_optionsmerge.Live trace plugin (Langertha::Raider::Plugin::Trace) and situation-injection plugin (Langertha::Raider::Plugin::Situation).
On-the-fly how-to-use-raider documentation generator (Langertha::Raider::Skill).
It is the command line's Langertha::Raider::Application: all the attributes and methods documented there (root, engine_name, model, mission, packs, raid_f, run, explain_config, ...) apply here, and this class adds what belongs to the terminal -- the live "trace", the agent files of --claude / --openai it reports as ignored ("ignored_agent_files") and "token_stats". The command line itself is raider.
Of the names the Application gained after the inventory of ADR 0017, only the constructor arguments that mirror an option or config key apply here as public: claude, permission_mode, skip_permissions, max_agent_depth, max_concurrent_agents and agent_models. The others (context, permissions, hooks, tool_gate, todos, ...) are internal and may change without notice (ADR 0017, Addendum 1).
default_model_for_engine
my $model = Langertha::Raider::CLI::default_model_for_engine('openai'); # 'gpt-4o-mini'
A plain function, not a method: the model an engine uses when no model is set ("model" in Langertha::Raider::Application) -- raider's cheap default for the engine, else the engine class's own default, undef for an engine that needs an explicit model (openrouter) or an unknown one.
trace
Emit live ANSI-colored progress output (iteration markers, tool calls, tool results) via Langertha::Raider::Plugin::Trace. Defaults to on when STDOUT is a terminal.
trace_out
Filehandle the "trace" is printed to. Defaults to STDOUT.
source_labels
The command-line flags that set what "explain_config" in Langertha::Raider::Application and the other reports name ("source_label" in Langertha::Raider::Application): -e, -m, -k, -o, --pack, --perl, --bare, -M, ...
persona_intro
The default persona's opening names the CLI.
persona_turn_end
The CLI loops back to the user.
ignored_agent_files
for my $ign ($app->ignored_agent_files) {
say 'seeing '.$ign->{path}.', ignoring (use --'.$ign->{profile}.' to load)';
}
The agent files (CLAUDE.md, AGENTS.md) in the working root that the prompt does not hold ("instruction_items" in Langertha::Raider::Context), each with path and the profile flag that would load it. In the Claude layout CLAUDE.md is loaded, so never listed. Nothing with "bare" in Langertha::Raider::Application. Powers the banner's "seeing AGENTS.md, ignoring" notice.
trace_plugin
Returns the loaded Langertha::Raider::Plugin::Trace instance, or undef if trace is disabled.
token_stats
Cumulative token counts for this session (hashref with prompt, completion, total, calls) — available when trace is enabled, nothing otherwise.
SEE ALSO
raider — the CLI entry point
SUPPORT
Issues
Please report bugs and feature requests at https://github.com/Getty/langertha-raider/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.