Comprehensive developer documentation for the PentestGPT project.
Overview of project organization and file layout
Learn about:
- Directory structure and file organization
- Core modules and their responsibilities
- Dependencies and build system
- Configuration files
- Test organization
- Runtime file locations
When to read: First time exploring the codebase, understanding project layout
Comprehensive feature documentation
Covers:
- Core features (Autonomous CTF solving, Intelligent methodology, Fallback strategies)
- Agent capabilities (Tool execution, Flag detection, Claude Code integration)
- User interface (TUI, Keyboard controls, Output modes)
- Session management (Persistence, Resume functionality)
- Benchmark system (Management, Structure, Running benchmarks)
- Telemetry & Observability
- Configuration & Authentication
- Advanced features
When to read: Understanding what PentestGPT can do, learning to use features
Design patterns, architectural decisions, and system design
Explores:
- Architectural overview and high-level design
- Design patterns (Singleton, Observer, Abstract Factory, Strategy, State, Command)
- Core components (AgentController, PentestAgent, EventBus, SessionStore)
- Data flow and message routing
- Event-driven architecture
- Session lifecycle
- Backend abstraction
- Extension points
- Performance considerations
When to read: Contributing code, understanding design decisions, extending the system
Detailed code walkthroughs and implementation details
Explains:
- Entry point & CLI implementation
- Agent Controller code walkthrough
- Pentest Agent execution flow
- Event Bus system implementation
- Backend abstraction layer
- Session management code
- TUI application structure
- Activity tracking system
- Telemetry integration
- Tool framework
- Configuration management
When to read: Understanding implementation details, debugging, making code changes
- Start with PROJECT_STRUCTURE.md to understand the codebase layout
- Read ARCHITECTURE.md to learn the design patterns
- Dive into CODE_GUIDE.md for implementation details
- Check FEATURES.md for feature documentation
- Read FEATURES.md to learn what PentestGPT can do
- Reference PROJECT_STRUCTURE.md for configuration file locations
- Check the main ../README.md for installation and usage
- Review ARCHITECTURE.md for design decisions
- Check CODE_GUIDE.md for critical code paths
- Reference PROJECT_STRUCTURE.md for test organization
docs/
├── README.md # This file - documentation index
├── PROJECT_STRUCTURE.md # Project organization and layout
├── FEATURES.md # Feature documentation
├── ARCHITECTURE.md # Design patterns and architecture
└── CODE_GUIDE.md # Code walkthroughs and explanations
- ../CLAUDE.md - Instructions for Claude Code AI assistant
- ../README.md - User-facing documentation and quick start
- Code Comments - Inline documentation in source files
When updating the codebase, please also update relevant documentation:
- New Feature? → Update
FEATURES.md - Architectural Change? → Update
ARCHITECTURE.md - New Module? → Update
CODE_GUIDE.mdandPROJECT_STRUCTURE.md - Configuration Change? → Update
PROJECT_STRUCTURE.md
- All documentation in Markdown format
- Use GitHub Flavored Markdown (GFM)
- Include table of contents for long documents
- Use syntax highlighting (
python,bash) - Include comments for complex code
- Show both usage and implementation examples
- Clear headings and sections
- Cross-references between documents
- "When to read" section for each document
- Keep in sync with code changes
- Update examples when APIs change
- Add new sections as features are added
- Issues: GitHub Issues
- Discord: Join Discord
- Paper: USENIX Security 2024
This documentation is part of the PentestGPT project and is licensed under the MIT License.
See ../LICENSE.md for details.