How bezouwenr/craft-anything works
Craft Anything studies websites, apps, games, and files, then uses a coding agent to build a clean-room recreation, compare it with the original, and refine it. The desktop UI and CLI drive a shared engine; its tool system supports inspection, evidence, and project workflows, while AI rebuild and checking are distinct stages. The README also documents an advanced workbench, MCP/agent access, and a browser-based file viewer. Some subsystem links are documented capabilities rather than inspected calls; source-level edges are limited to relationships listed in the index.
Main entry points: session.rs Engine session · lib.rs Workbench UI · main.rs CLI · tool.rs Tool runtime
Components 28
User interfaces
- Desktop app
apps/craft-anything/src/main.rs - Workbench UI
crates/ui-egui/src/lib.rs - UI components
crates/ui-egui/src/widgets.rs - CLI
apps/craft-anything-cli/src/main.rs - CLI output
apps/craft-anything-cli/src/output.rs - Browser viewer
apps/craft-anything-web/src/viewer.rs - File triage
apps/craft-anything-web/src/triage.rs
Engine workflows
- Engine session
crates/engine/src/session.rs - Target model
crates/engine/src/target.rs - Project state
crates/engine/src/project.rs - Workspace
crates/engine/src/workspace.rs - Settings
crates/engine/src/settings.rs - Tool runtime
crates/engine/src/tool.rs - Build checks
crates/engine/src/testing.rs - Check results
crates/engine/src/outputs.rs
Inspection and evidence
- Artifact tools
crates/engine/src/tools/artifact_tools.rs - Deep inspection
crates/engine/src/tools/deep.rs - Binary analysis
crates/analysis/src/native.rs - Disassembly
crates/disasm/src/program.rs - File formats
crates/formats/src/verify.rs - Evidence ledger
crates/evidence/src/lib.rs
AI and rebuild
- AI rebuild
crates/ai/src/rebuild/mod.rs - AI providers
crates/ai/src/agent.rs - Coding agent
Agent integrations
- MCP tools
crates/mcp/src/lib.rs - CLI agent adapters
crates/ai/src/cli_agents/mod.rs - Inspection engines
crates/engines/src/lib.rs
Other components
- User
Connections 32
- User → Desktop app: starts project
README.md - User → CLI: runs commands
README.md - User → Browser viewer: opens file
- Desktop app → Workbench UI: opens UI
apps/craft-anything/src/main.rs - Workbench UI → UI components: renders controls
- Workbench UI → Engine session: drives
README.md - CLI → Engine session: calls tools
apps/craft-anything-cli/src/main.rs - CLI → CLI output: formats results
apps/craft-anything-cli/src/main.rs - Browser viewer → File triage: triages files
apps/craft-anything-web/src/main.rs - Engine session → Target model: manages targets
crates/engine/src/session.rs - Engine session → Project state: loads project
crates/engine/src/session.rs - Engine session → Workspace: uses workspace
crates/engine/src/session.rs - Engine session → Settings: uses settings
crates/engine/src/session.rs - Engine session → Check results: uses outputs
crates/engine/src/session.rs - Engine session → Build checks: runs checks
README.md - Build checks → Check results: records results
crates/engine/src/testing.rs - Engine session → Tool runtime: dispatches tools
crates/engine/src/tool.rs - Tool runtime → Artifact tools: routes inspection
- Tool runtime → Deep inspection: routes deep mode
- Artifact tools → Binary analysis: analyzes targets
- Binary analysis → Disassembly: uses analysis
- Artifact tools → File formats: parses files
- Engine session → Evidence ledger: tracks evidence
crates/engine/src/session.rs - User → AI rebuild: requests build
README.md - AI rebuild → AI providers: uses AI
- AI providers → Coding agent: invokes agent
README.md - Coding agent → Workspace: builds project
README.md - User → MCP tools: connects agent
README.md - MCP tools → Engine session: drives same engine
README.md - AI providers → CLI agent adapters: supports adapters
- Engine session → Inspection engines: uses integrations
- Check results → AI rebuild: guides refinement
README.md