Every mallcop command. All output is JSON by default; use --human for readable text. Use --dir to specify a deployment repo.
Discover environment, write config, estimate costs.
mallcop init [--pro]
Scans for available connectors (Azure, AWS, GitHub, M365, Vercel, container-logs, Supabase, OpenClaw),
authenticates each, pulls a sample of events, writes mallcop.yaml with discovered connectors
and budget defaults, and outputs a cost estimate with required secrets.
With --pro, creates a Pro account using the email from git config user.email,
gets a plan recommendation based on discovered connectors, and adds the pro section to config
with managed inference credentials.
| Flag | Description |
|---|---|
--pro | Set up Pro managed inference (creates account, recommends plan, adds checkout URL) |
Poll all connectors, store events.
mallcop scan
Authenticates each connector configured in mallcop.yaml, polls from the last checkpoint,
applies parser transforms for container-logs apps with parser.yaml, and appends new events
to the JSONL store. Outputs per-connector event counts and checkpoint values.
Run detectors against new events.
mallcop detect
Loads all events and the baseline, determines which connectors are still in learning mode (14-day window), runs all built-in and custom detectors, persists findings, then updates the baseline with new events. Learning-mode findings are informational only.
Invoke actor chain on open findings.
mallcop escalate [--human] [--no-actors] [--backend anthropic|claude-code]
Runs the configured actor chain (triage, investigate, notify) on all open findings. Validates escalation paths before running — if notification channels are broken, the command fails immediately rather than silently dropping alerts.
| Flag | Description |
|---|---|
--human | Human-readable output |
--no-actors | Skip actor invocation (log findings only) |
--backend | LLM backend: anthropic (API, default) or claude-code (CLI, uses subscription) |
Scan + detect + escalate in one command. Designed for cron.
mallcop watch [--dry-run] [--human] [--backend anthropic|claude-code]
Runs the full pipeline: scan, detect, escalate. Validates escalation paths before starting.
Skips escalation during learning mode or with --dry-run. This is the command you
schedule every 6 hours via cron.
| Flag | Description |
|---|---|
--dry-run | Run scan and detect without invoking actors (no token spend) |
--human | Human-readable output |
--backend | LLM backend: anthropic (API, default) or claude-code (CLI, uses subscription) |
Orient: load the POST.md playbook and all open findings.
mallcop review [--human]
Displays the current investigation playbook (POST.md) and all open findings grouped by severity, with annotations from previous actor runs. Suggests commands for the next investigation step. Use this as the starting point for interactive investigation.
| Flag | Description |
|---|---|
--human | Human-readable output with severity headers and suggested commands |
Drill down: POST.md + deep context for one finding.
mallcop investigate FINDING_ID [--human]
Loads a single finding with full context: triggering events, actor history, baseline profile
for involved actors, and all annotations. Includes the investigation playbook (POST.md) for
reference. Use after mallcop review to deep-dive into a specific finding.
| Flag | Description |
|---|---|
--human | Human-readable output with event timeline and baseline status |
Full finding detail + annotation trail.
mallcop finding FINDING_ID [--human]
Shows the complete state of a single finding: title, severity, status, detector, timestamp, event IDs, metadata, and the full annotation trail with timestamps and actor names.
| Flag | Description |
|---|---|
--human | Human-readable output |
Query events from the store.
mallcop events [--finding ID] [--actor NAME] [--source NAME] [--hours N] [--type TYPE] [--human]
Queries the event store with optional filters. Defaults to the last 24 hours. When filtering by finding, the time window is ignored and only the finding's triggering events are returned. Results are sorted newest first.
| Flag | Description |
|---|---|
--finding | Filter to events associated with this finding ID |
--actor | Filter by actor name |
--source | Filter by source connector (e.g. azure, github) |
--hours | Time window in hours (default: 24) |
--type | Filter by event type |
--human | Human-readable output |
Query baseline data.
mallcop baseline [--actor NAME] [--entity NAME]
Without flags, shows general baseline stats: event count, known actor count, frequency table entries,
and known sources. With --actor, shows the full baseline profile for that actor including
frequency entries and relationship data. With --entity, checks whether a specific entity
is known in the baseline.
| Flag | Description |
|---|---|
--actor | Show baseline profile for a specific actor (frequency, relationships) |
--entity | Check if a specific entity is known in the baseline |
Show findings report with optional filters.
mallcop report [--status STATUS] [--severity LEVELS] [--since WINDOW] [--human]
Queries findings with optional status, severity, and time filters. Severity accepts
comma-separated values (e.g. critical,warn). Time window uses the format
24h, 7d, or 30m.
| Flag | Description |
|---|---|
--status | Filter by finding status |
--severity | Filter by severity (comma-separated: critical,warn,info) |
--since | Time window (e.g. 24h, 7d, 30m) |
--human | Human-readable output |
Add an investigation note to a finding.
mallcop annotate FINDING_ID TEXT [--author NAME] [--human]
Appends a timestamped annotation to a finding's trail. Use this to document investigation
reasoning before resolving. Annotations are visible in mallcop finding and
mallcop review output.
| Flag | Description |
|---|---|
--author | Author of the annotation (default: interactive) |
--human | Human-readable output |
Resolve a finding and update the baseline.
mallcop ack FINDING_ID [--author NAME] [--reason TEXT] [--human]
Marks a finding as acknowledged, adds an annotation to the trail, and updates the baseline with the finding's triggering events so the same pattern is recognized as known in future scans. Boundary-violation findings cannot be acked — the underlying violation must be fixed. Double-acking is rejected.
| Flag | Description |
|---|---|
--author | Author of the acknowledgement (default: interactive) |
--reason | Reason for acknowledging this finding |
--human | Human-readable output |
Record human feedback on an agent finding.
mallcop feedback FINDING_ID agree|override [--reason TEXT]
Records whether the agent's decision was correct (agree) or wrong (override).
Captures a snapshot of the finding's events, baseline state, and annotations at the time of feedback.
This data feeds the self-improvement loop. Includes a cadence check that warns if feedback is being
rubber-stamped too quickly.
| Flag | Description |
|---|---|
--reason | Explanation for this feedback (free text, sanitized before storage) |
Event/finding counts and operational status.
mallcop status [--costs] [--human]
Shows total events, total findings, events by source, findings by status, and escalation health.
With --costs, adds cost trends: average donuts per run, total donuts, estimated USD,
and circuit breaker trigger count. Always checks whether escalation paths are working.
| Flag | Description |
|---|---|
--costs | Include cost trend data (donuts/run, total spend, circuit breaker stats) |
--human | Human-readable output |
Switch tiers or add managed inference.
mallcop upgrade
Handles plan tier changes: upgrade from free to Pro, switch between Pro tiers (Starter, Growth, Scale), or add managed inference to an existing BYOK setup. Prorated billing for mid-cycle upgrades.
Review and apply parser patches proposed by the heal actor.
mallcop heal [--auto] [--dry-run] [--human]
Scans for log-format-drift findings with heal actor annotations containing parser patch proposals.
If no heal annotation exists, runs inline drift analysis to generate proposals. Patches update
parser.yaml templates to match new log formats.
| Flag | Description |
|---|---|
--auto | Apply all proposed patches automatically |
--dry-run | Show what patches would be applied without changing files |
--human | Human-readable output with patch details |
Manage scheduled patrols (cron-based watch/research runs).
mallcop patrol create NAME --every PERIOD [--budget N] [--chain ACTORS] [--notify CHANNELS] [--research] [--no-git]
mallcop patrol list
mallcop patrol update NAME --every PERIOD
mallcop patrol disable NAME
mallcop patrol enable NAME
mallcop patrol remove NAME
mallcop patrol run NAME
Patrols are named scheduled runs managed via crontab. Each patrol has a period (15m, 1h, 6h, 1d, 1w, 1mo),
an optional donut budget, actor chain override, and notification channel list. Patrol config is stored in
mallcop.yaml and crontab entries are managed automatically.
| Subcommand | Description |
|---|---|
create | Create a new patrol with schedule, budget, chain, and notify options |
list | List all configured patrols with schedules and enabled status |
update | Change the schedule for an existing patrol |
disable | Remove crontab entry but keep config (can re-enable later) |
enable | Re-create crontab entry from config |
remove | Delete both crontab entry and config |
run | Run a patrol immediately without waiting for cron |
Research OSINT advisories and generate detector rules (Pro only).
mallcop research [--human]
Queries OSINT advisory sources, checks each against the intel manifest to skip duplicates,
and uses the LLM to generate declarative detector rules for relevant advisories matching your
configured connectors. Requires a Pro subscription with pro.service_token in
mallcop.yaml.
| Flag | Description |
|---|---|
--human | Human-readable output |
Sample container logs for an app, output structured context.
mallcop discover-app APP_NAME [--lines N] [--refresh]
Samples recent log lines from a container app via Log Analytics, analyzes log format patterns,
and outputs structured context for building parser.yaml templates. Use when onboarding
a new container app or after a log format change.
| Flag | Description |
|---|---|
--lines | Number of recent log lines to sample (default: 100) |
--refresh | Re-discover (signals refresh intent) |
Run Academy Exam scenarios and output grades.
mallcop exam run [--tag TAG] [--scenario ID] [--model MODEL] [--human] [--backend BACKEND]
Loads adversarial scenarios from the shakedown suite and runs them through the actor chain.
Each scenario tests whether the AI correctly resolves or escalates a finding. Filter by failure
mode tag (KA, AE, CS) or run a single scenario by ID. Requires LLM credentials or
--backend claude-code.
| Flag | Description |
|---|---|
--tag | Filter scenarios by failure mode tag (e.g. KA, AE, CS) |
--scenario | Run a single scenario by ID |
--model | LLM model to use (e.g. haiku, sonnet) |
--backend | LLM backend: anthropic, claude-code, bedrock, openai-compat, managed |
--human | Human-readable progress output |
Benchmark models for pricing and performance.
mallcop exam bakeoff --pricing PRICING_PATH [--models ALIASES] [--profile AWS_PROFILE] [--region REGION] [--judge-backend BACKEND] [--output PATH] [--human]
Runs all Academy Exam scenarios against multiple Bedrock commodity models, grades each with an
LLM-as-judge, and produces a diffable summary JSON with routing recommendations per sovereignty tier.
Requires AWS SSO credentials and boto3.
| Flag | Description |
|---|---|
--pricing | Path to pricing.yaml model catalog (required) |
--models | Comma-separated model aliases to test (default: all auto-routable) |
--profile | AWS SSO profile name |
--region | AWS region for Bedrock (default: us-east-1) |
--judge-backend | Backend for the judge LLM |
--output | Write summary JSON to this path (default: stdout) |
--human | Human-readable progress output with routing recommendation |
Analyze exam results and propose detector/prompt improvements.
mallcop improve [--from-exam RESULTS_FILE] [--human]
Loads graded exam results and identifies failure patterns. Groups scenarios by failure mode,
suggests fix targets (actor chain, detector rules, playbook prompts), and provides improvement
directions. Run mallcop exam run first to generate the input file.
| Flag | Description |
|---|---|
--from-exam | Path to exam results JSON file (from mallcop exam run) |
--human | Human-readable output |
Generate a plugin directory with manifest and stubs.
mallcop scaffold connector|detector|actor|tool NAME
Creates a plugin directory under plugins/ with a manifest.yaml and
stub Python files matching the plugin contract. Four plugin types are supported: connector
(polls APIs), detector (flags anomalies), actor (investigates findings), and tool (gives actors
capabilities).
# Examples mallcop scaffold connector cloudflare mallcop scaffold detector unusual-geo mallcop scaffold actor deep-investigate mallcop scaffold tool query-dns
Validate a plugin against its contract.
mallcop verify PLUGIN_PATH
mallcop verify --all
Checks that a plugin directory has a valid manifest.yaml, implements the required
interface methods, and passes contract tests. Supports connectors, detectors, actors, tool files
(.py), and app artifact directories (containing parser.yaml or
detectors.yaml). With --all, discovers and verifies all plugins in
the current directory.
| Flag | Description |
|---|---|
--all | Verify all discovered plugins, tools, and app artifacts |
List all installed skills with their metadata.
mallcop skill list
Shows all skills available in the skills directory: name, description, version, author, parent, and signature status. Includes both built-in skills (signed with the mallcop root key) and custom skills from your deployment repo.
Sign a skill directory with an SSH private key.
mallcop skill sign DIR --key ~/.ssh/id_ed25519
Produces SKILL.md.sig in the skill directory. The signature covers all files
in the directory (excluding SKILL.md.sig itself). Any change to any file —
including adding or removing files — invalidates the signature.
| Flag | Description |
|---|---|
--key | Path to SSH private key for signing (required) |
Verify a skill directory's signature against a public key.
mallcop skill verify DIR --pubkey ~/.ssh/id_ed25519.pub [--identity author@example.com]
Exits 0 if the signature is valid, non-zero otherwise. The --identity flag overrides
the identity taken from the pubkey comment field.
| Flag | Description |
|---|---|
--pubkey | Path to SSH public key file for verification (required) |
--identity | Identity (email) to verify against (defaults to pubkey comment field) |
Regenerate skills.lock from installed skills.
mallcop skill lock [--skills-dir DIR] [--output PATH]
Scans the skills directory for all skill subdirectories, computes SHA-256 hashes of each skill's
content, and writes skills.lock. The lockfile is checked at startup in fail-closed mode —
skills not in the lockfile or with changed content are not loaded. Run this after adding, updating,
or removing skills, then commit skills.lock to your deployment repo.
| Flag | Description |
|---|---|
--skills-dir | Directory containing skill subdirectories (default: ~/.mallcop/skills) |
--output | Output path for skills.lock (default: skills-dir/skills.lock) |
Add an identity as a trust anchor.
mallcop trust add-anchor IDENTITY PUBKEY_FILE
Adds IDENTITY as a trust anchor using the SSH public key in PUBKEY_FILE. Anchors are the only keys
that don't need endorsement — adding one is an explicit trust decision. Stored in
.mallcop/trust/anchors. No-ops if the identity is already present.
Add an identity's public key to the keyring.
mallcop trust add-key IDENTITY PUBKEY_FILE
Adds IDENTITY to the keyring without making them an anchor. They still need to be endorsed by an
anchor or an intermediary with full trust level before their skills are accepted.
Endorse an identity for a scope at a trust level.
mallcop trust endorse IDENTITY --scope GLOB --level full|author --expires YYYY-MM-DD --key PRIVATE_KEY [--reason TEXT] [--identity ENDORSER]
Creates a signed .endorse + .endorse.sig pair in
.mallcop/trust/endorsements/. The endorsement says: "I vouch for this identity,
for skills matching this scope, at this trust level, until this date." Scope narrows at each hop —
an intermediary with aws-* scope cannot endorse for skills outside that scope.
| Flag | Description |
|---|---|
--scope | Glob pattern for skill names (e.g. *, aws-*) (required) |
--level | full (can re-delegate) or author (terminal node) (required) |
--expires | Expiry date in YYYY-MM-DD format (required) |
--key | SSH private key used to sign the endorsement (required) |
--reason | Reason for this endorsement |
--identity | Endorser identity (defaults to key comment in .pub file) |
Show the trust path from an anchor to an identity.
mallcop trust chain IDENTITY [--skill SKILL_NAME]
Performs BFS from all trust anchors through the endorsement graph to find a valid path to IDENTITY
for the given skill name (default: *). Exits non-zero if no trust path exists.
Use this to debug trust chain issues.
| Flag | Description |
|---|---|
--skill | Skill name to check the trust chain for (default: *) |
Show the full trust web.
mallcop trust list
Prints the full trust state: all anchors, keyring entries, and endorsements with their scope,
level, and expiry. Useful for auditing the current trust configuration. All mallcop trust
subcommands accept --trust-dir to override the default trust directory
(.mallcop/trust).