{"id":52006332,"url":"https://github.com/greysquirr3l/redshank","last_synced_at":"2026-07-31T15:30:37.718Z","repository":{"id":350781421,"uuid":"1181005121","full_name":"greysquirr3l/redshank","owner":"greysquirr3l","description":"Autonomous recursive language-model investigation agent.","archived":false,"fork":false,"pushed_at":"2026-07-27T08:15:56.000Z","size":2548,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-28T05:20:34.249Z","etag":null,"topics":["agent","agpl","campaign-finance","cli","corporate-registry","cqrs","entity-resolution","investigation","knowledge-graph","llm","osint","petgraph","ratatui","rust","sanctions"],"latest_commit_sha":null,"homepage":"https://greysquirr3l.github.io/redshank/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greysquirr3l.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-13T16:40:03.000Z","updated_at":"2026-06-24T04:53:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/greysquirr3l/redshank","commit_stats":null,"previous_names":["greysquirr3l/redshank"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/greysquirr3l/redshank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fredshank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fredshank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fredshank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fredshank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greysquirr3l","download_url":"https://codeload.github.com/greysquirr3l/redshank/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greysquirr3l%2Fredshank/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36123529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-31T02:00:06.731Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agpl","campaign-finance","cli","corporate-registry","cqrs","entity-resolution","investigation","knowledge-graph","llm","osint","petgraph","ratatui","rust","sanctions"],"created_at":"2026-07-31T15:30:35.325Z","updated_at":"2026-07-31T15:30:37.702Z","avatar_url":"https://github.com/greysquirr3l.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redshank\n\n![RedShank Logo](./docs/assets/img/redshank-logo.png)\n\nAn autonomous recursive language-model investigation agent written in Rust. Redshank ingests heterogeneous public datasets — campaign finance, lobbying disclosures, federal contracts, corporate registries, sanctions lists, court records, individual-person OSINT, and media intelligence — resolves entities across all of them, and surfaces non-obvious connections through evidence-backed analysis written into a live knowledge-graph wiki.\n\nRedshank is a Rust rewrite of [OpenPlanter](https://github.com/ShinMegamiBoson/OpenPlanter), replacing the Python runtime with a compiled binary that has zero Python or Node.js dependency.\n\n## Installation\n\n```bash\ncargo install redshank-cli --locked\n```\n\nOr build from source:\n\n```bash\ngit clone https://github.com/greysquirr3l/redshank.git\ncd redshank\ncargo build --release\n```\n\nThe binary lands at `target/release/redshank`.\n\n## Quickstart\n\n```bash\n# 1. Run the interactive credential wizard\nredshank setup\n\n# 2. Launch the TUI\nredshank tui\n\n# 3. Or run a one-shot investigation from the command line\nredshank run \"Who are the top donors to PACs linked to defense contractors with active SAM.gov registrations?\"\n```\n\n`redshank setup` is the preferred entrypoint; `redshank configure` and\n`redshank configure credentials` are compatibility aliases for the same wizard.\nSecret fields are entered with hidden input, and unchanged values are detected so\nthe command prints \"No changes - nothing saved.\" instead of rewriting credentials.\n\n## Features\n\n- **Recursive tool-calling engine** — The agent loop calls tools, reads results,\n  and can delegate subtasks to child agent invocations with independent context\n  windows. Context condensation keeps long investigations under the token limit.\n- **90+ fetcher modules** — Pull records from government databases, corporate\n  registries, sanctions lists, court systems, and OSINT sources (see\n  [Data Sources](#data-sources) below).\n- **Knowledge-graph wiki** — Findings are written to interconnected Markdown\n  documents with cross-references. A petgraph DAG tracks entities and\n  relationships with fuzzy name matching.\n- **Interactive TUI** — Three-pane ratatui interface: session sidebar, scrolling\n  chat log, and a character-cell wiki-graph canvas. Slash commands for model\n  switching, reasoning effort, and session management.\n- **Multi-provider LLM support** — Anthropic (native Messages API with thinking\n  budgets), OpenAI, OpenRouter, Cerebras, and Ollama (local).\n- **Security-first architecture** — Fail-secure design with typed `AuthContext`,\n  role-based `SecurityPolicy`, and `chmod 600` credential storage. Every data\n  access path checks permissions before touching storage.\n- **Stygian integration** — Optional `stygian` feature flag enables\n  stygian-graph pipelines and stygian-browser anti-detection automation for\n  JS-rendered pages.\n- **Coraline MCP tools** — Optional `coraline` feature flag adds code-aware\n  file reading, semantic search, repo mapping, and file editing via the\n  Coraline MCP server.\n- **CQRS + domain events** — Every mutating operation flows through idempotent\n  Command handlers; every read through Query handlers. State transitions emit\n  typed domain events persisted to SQLite.\n\n## Data Sources\n\n| Category | Fetchers |\n| --- | --- |\n| **Campaign Finance** | FEC filings, Senate lobbying disclosures, House lobbying disclosures |\n| **Government Contracts** | USASpending, SAM.gov registrations, FPDS contract awards, federal audit clearinghouse |\n| **Corporate Registries** | GLEIF (LEI lookups), OpenCorporates, FinCEN BOI, state Secretary of State portals, SEC EDGAR |\n| **Financial** | FDIC institution search, ProPublica nonprofit 990 filings |\n| **Sanctions** | OFAC SDN, UN consolidated sanctions, EU sanctions, World Bank debarred firms |\n| **Environmental \u0026 Safety** | EPA ECHO compliance, OSHA inspection data |\n| **Courts** | CourtListener (RECAP archive) |\n| **Leaks \u0026 Offshore** | ICIJ offshore leaks database |\n| **Individual OSINT** | HIBP breach exposure (including `haveibeenpwnd` alias; paid API key required), GitHub/GitLab/Stack Exchange/LinkedIn profiles, Wayback Machine snapshots, WHOIS/RDAP history, voter registration, USPTO patent/trademark inventors, username enumeration (37 platforms), social media profiles, reverse phone (basic, Twilio, Truecaller), reverse address normalization |\n| **Reference \u0026 Media** | Wikidata entity lookups, GDELT media monitoring, Census ACS demographics |\n| **Property** | County property/assessor records |\n\n## Configuration\n\nCredentials are resolved in this priority order (first match wins):\n\n1. `REDSHANK_\u003cKEY\u003e` — app-namespaced, useful when running multiple agents on one host\n2. `OPENPLANTER_\u003cKEY\u003e` — legacy backward compatibility\n3. `\u003cKEY\u003e` — bare env var (sufficient for most users)\n\nSet keys as environment variables or in a `.env` file:\n\n```bash\ncp .env.example .env\n# edit .env with your keys\nchmod 600 .env\n```\n\nFor persistent storage, copy the example credentials file:\n\n```bash\nmkdir -p .redshank\ncp credentials.example.json .redshank/credentials.json\nchmod 600 .redshank/credentials.json\n```\n\nRedshank merges from all sources in order: env vars → `.env` → `\u003cworkspace\u003e/.redshank/credentials.json` → `~/.redshank/credentials.json`.\n\nModel defaults live in `\u003cworkspace\u003e/.redshank/settings.json`:\n\n```json\n{\n  \"default_model\": \"claude-sonnet-4-20250514\",\n  \"default_reasoning_effort\": \"medium\",\n  \"providers\": {\n    \"OpenAiCompatible\": {\n      \"enabled\": true,\n      \"protocol\": \"openai_compatible\",\n      \"deployment\": \"local\",\n      \"base_url\": \"http://localhost:11434/v1\",\n      \"default_model\": \"llama3.2\"\n    },\n    \"OpenAI\": {\n      \"enabled\": true,\n      \"protocol\": \"openai_compatible\",\n      \"deployment\": \"local\",\n      \"base_url\": \"http://localhost:1234/v1\",\n      \"default_model\": \"qwen2.5-coder:latest\"\n    }\n  }\n}\n```\n\nProvider routing stays in `settings.json`, while actual secrets remain in\n`.redshank/credentials.json`. That lets you point `OpenAI` at a local\nOpenAI-compatible server, or route `Ollama` to a non-default host, without\ncopying API keys into general settings.\n\nOverride at runtime with CLI flags:\n\n```bash\nredshank run --model gpt-4o --reasoning high \"Investigate ...\"\n```\n\n## TUI Guide\n\nLaunch with `redshank tui` (or `redshank tui --session \u003cid\u003e` to resume).\n\n| Area | Description |\n| --- | --- |\n| **Sidebar** (left 20%) | Session list. Select with arrow keys. |\n| **Chat pane** (center 55%) | Scrolling conversation log. Type objectives at the bottom input line. |\n| **Graph pane** (right 25%) | Character-cell wiki-graph canvas. Nodes are color-coded by category. |\n\n### Slash Commands\n\n| Command | Effect |\n| --- | --- |\n| `/model \u003cname\u003e` | Switch model (add `--save` to persist) |\n| `/model` or `/model list` | List available models |\n| `/reasoning \u003coff\\|low\\|medium\\|high\u003e` | Set reasoning effort |\n| `/status` | Show current model, effort, and session info |\n| `/clear` | Clear the chat log |\n| `/help` | Show available commands |\n| `/quit` or `Ctrl+C` | Exit |\n\n### Headless Mode\n\nRun without the TUI for scripting or CI:\n\n```bash\nredshank run --no-tui \"Investigate ...\"\n```\n\n## CLI Reference\n\n```bash\nredshank [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  run        Run an investigation with a given objective\n  tui        Launch the interactive TUI\n  fetch      Run a supported data fetcher directly\n  session    List, resume, or delete sessions\n  configure  Interactive credential setup\n  setup      Alias for configure\n  version    Print version and build info\n\nGlobal Options:\n  -w, --workspace \u003cPATH\u003e    Workspace directory [default: .]\n  -m, --model \u003cMODEL\u003e       Override the default model\n  -r, --reasoning \u003cLEVEL\u003e   Reasoning effort (off|low|medium|high)\n      --no-tui              Run headless (no interactive UI)\n      --max-depth \u003cN\u003e       Maximum recursion depth for subtasks\n      --demo                Demo mode (use mock model)\n```\n\n`redshank fetch` currently supports `uk_corporate_intelligence` and its kebab-case alias `uk-corporate-intelligence`.\n\n## Development\n\n### Prerequisites\n\n- Rust 1.96.0+ (stable)\n- SQLite (bundled via rusqlite)\n\n### Build \u0026 Test\n\n```bash\ncargo build --workspace\ncargo test --workspace\ncargo clippy --workspace -- -D warnings\n```\n\n### Optional Features\n\n```bash\n# Build with stygian web automation\ncargo build --workspace --features redshank-fetchers/stygian\n\n# Build with Coraline MCP code navigation tools\ncargo build -p redshank-core --features coraline\n```\n\n### Stygian Setup (JS-heavy sources)\n\nSeveral fetchers — state Secretary of State portals, county property systems,\nand social media profiles — require a real browser to extract content. These\nroute through [stygian-mcp](https://github.com/stygian-labs/stygian) when it is\nrunning, and **fail-soft** (return empty results with a warning) when it is not.\n\n1. Install stygian-mcp:\n\n   ```bash\n   cargo install stygian-mcp --locked\n   ```\n\n2. Start it on the default port:\n\n   ```bash\n   stygian-mcp --port 8787\n   ```\n\n3. Build redshank with the feature enabled and confirm the TUI footer shows\n   `stygian: ▲`.\n\nThe health probe hits `http://127.0.0.1:8787/health` by default. Run stygian-mcp\non that host and port. Configuration of the probe endpoint via `settings.json`\nis planned for a future release.\n\nSee the [Stygian Fallback architecture doc](docs/src/architecture/stygian-fallback.md)\nfor full setup, troubleshooting, and licensing-boundary rationale.\n\n## Security\n\nTo report vulnerabilities, please follow the private disclosure process in\n[SECURITY.md](SECURITY.md).\n\n### Workspace Layout\n\n```text\nredshank/\n├── redshank-core/       Core library: domain model, ports, engine, tools, persistence\n│   └── src/\n│       ├── domain/      Pure types, zero I/O deps\n│       ├── ports/       Trait interfaces (inbound + outbound)\n│       ├── application/ CQRS command/query handlers, engine service\n│       └── adapters/    LLM providers, tools, SQLite, wiki filesystem\n├── redshank-tui/        ratatui terminal interface\n├── redshank-fetchers/   90+ data-source fetcher modules\n├── redshank-cli/        clap CLI entry point\n└── plan.toml            Build plan (45 tasks)\n```\n\n## Comparison with OpenPlanter\n\n| | OpenPlanter | Redshank |\n| --- | --- | --- |\n| **Language** | Python 3.12 | Rust 1.96.0 (edition 2024) |\n| **TUI framework** | Textual | ratatui + crossterm |\n| **Graph library** | NetworkX | petgraph |\n| **HTTP client** | urllib / httpx | reqwest + stygian-browser |\n| **LLM providers** | Anthropic, OpenAI, OpenRouter, Cerebras, Ollama | Same set, native Rust clients |\n| **Data fetchers** | 12 Python scripts | 90+ library modules |\n| **Architecture** | Flat modules | Hexagonal DDD + CQRS |\n| **Security model** | File permissions | Typed AuthContext + SecurityPolicy + fail-secure |\n| **Session storage** | JSON files | SQLite with domain events |\n| **Distribution** | pip install + Python runtime | Single compiled binary |\n| **Desktop app** | Tauri 2 + Svelte | — (TUI only, desktop planned) |\n\n## License\n\nSee [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreysquirr3l%2Fredshank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreysquirr3l%2Fredshank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreysquirr3l%2Fredshank/lists"}