@feardread/fear-ai-agent
v2.0.2
Published
AI-powered personal development and network security agent with API testing and CVE database integration
Maintainers
Readme
Security AI Agent - Documentation
Overview
Security AI Agent is a comprehensive command-line security testing and analysis framework built on Node.js. Version 2.3.0 provides an integrated suite of tools for security scanning, code analysis, vulnerability assessment, and AI-powered security intelligence.
Features
Core Capabilities
- File System Browser: Navigate and inspect files directly from the command line
- AI-Powered Analysis: Integrate with multiple AI providers (Anthropic Claude, OpenAI GPT, Google Gemini)
- Security Scanning: Network port scanning, dependency checking, and security audits
- Code Analysis: Automated code review and project analysis
- Traffic Monitoring: Real-time network traffic monitoring and statistics
- CVE Database: Search and analyze Common Vulnerabilities and Exposures
- API Testing: Test and validate API endpoints and collections
- Code Refactoring: Automated code refactoring with AI assistance
- Web Scraping: Extract and analyze web content and security headers
- Vulnerability Assessment: Comprehensive vulnerability scanning and reporting
- Card Validation: Credit card number format validation and BIN analysis
- Cryptocurrency Tools: Real-time crypto price checking and rate comparisons
- Code Conversion: Convert HTML and jQuery to React components
AI Integration
The agent supports three AI providers with seamless switching:
- Anthropic Claude (Default: Claude Sonnet 4.5)
- OpenAI GPT
- Google Gemini (with streaming support)
Installation
npm installRequired Dependencies
- readline (built-in)
- fs (built-in)
- path (built-in)
- Custom modules in ./modules directory
Configuration
Environment Variables
Set API keys via environment variables for automatic configuration:
export ANTHROPIC_API_KEY="your-anthropic-key"
export OPENAI_API_KEY="your-openai-key"
export GOOGLE_API_KEY="your-google-key"
export AI_PROVIDER="anthropic" # Set default provider
export NO_COLOR=1 # Disable colored output
export DEBUG=1 # Enable verbose debuggingManual Configuration
Configure AI providers at runtime:
ai-setup anthropic YOUR_API_KEY
ai-setup openai YOUR_API_KEY
ai-setup google YOUR_API_KEYCommand Reference
System Commands
help- Display all available commandsstatus- Show system and module statushistory- View command history (last 20 commands)version- Display version informationtips- Show tips, shortcuts, and example workflowsbanner- Display the application bannerclear- Clear the screenexit- Exit the application
File Browser Commands
ls- List files and directoriescd <directory>- Change directorypwd- Show current directory pathcat <file>- Display file contentsless <file>- View file with paginationfind <pattern>- Search for files matching patternfile-info <file>- Show detailed file informationtree- Display directory tree structurebookmark- Manage directory bookmarksbrowse-help- Show file browser help
AI Configuration Commands
ai-setup <provider> <api-key>- Configure AI providerai-provider <provider>- Switch between AI providersai-status- Show AI module configuration statusai-help- Display detailed AI command documentation
AI Code Analysis Commands
ai-analyze <file>- Perform AI security analysis on code fileai-batch <files...>- Batch analyze multiple filesai-compare <file1> <file2>- Compare two code versionsai-scan <target>- Quick security scan
AI Security Intelligence Commands
ai-threat <target>- Comprehensive threat assessmentai-explain <vulnerability>- Explain vulnerability or CWE details
AI Code Generation Commands
ai-generate <description>- Generate secure Node.js code
AI Project Improvement Commands
ai-improve <project>- Get security recommendations for project
AI Chat & Assistance Commands
ai-chat- Start interactive AI chat sessionai-ask <question>- Quick AI questionai-clear-history- Clear chat conversation history
Network Scanning Commands
scan-ports <host>- Scan network ports on target hostnetwork-info- Display network informationcheck-deps- Check project dependenciessecurity-audit- Run comprehensive security audit
Code Analysis Commands
analyze-code <file>- Analyze code file for issuesanalyze-project <directory>- Analyze entire project
Traffic Monitoring Commands
monitor-traffic- Start network traffic monitoringstop-monitor- Stop traffic monitoringtraffic-stats- Show traffic statisticsexport-traffic <file>- Export traffic data to file
CVE & Security Commands
search-cve <cve-id>- Search CVE databasecheck-cwe <cwe-id>- Check CWE (Common Weakness Enumeration) detailscheck-package <package>- Check package for known vulnerabilitiescheck-exploits <query>- Search for known exploitsscan-deps- Scan project dependencies for CVEsexport-cve <file>- Export CVE report
API Testing Commands
test-endpoint <url>- Test API endpointtest-collection <file>- Test API collection from fileexport-report <file>- Export test results report
Code Refactoring Commands
refactor-file <file>- Refactor JavaScript filerefactor-project <directory>- Refactor entire projectanalyze-refactor <file>- Analyze code for refactoring opportunitiescompare-refactor <file1> <file2>- Compare refactored versions
Web Scraping Commands
scrape <url>- Scrape webpage contentscrape-links <url>- Extract all links from webpagescrape-images <url>- Extract all images from webpageexport-scrape <file>- Export scraped data to fileanalyze-headers <url>- Analyze security headers
Vulnerability Assessment Commands
vuln-assess <target>- Run vulnerability assessmentexport-vuln <file>- Export vulnerability results
Credit Card Commands
validate-card <number>- Validate card number formatvalidate-batch <file>- Batch validate card numbersanalyze-bin <bin>- Analyze Bank Identification Numbershow-test-cards- Display official test card numbersexplain-algorithm- Explain validation algorithms (Luhn, etc.)card-security-report- Generate card security reportcheck-card-status <number>- Check single card payment statuscheck-card-batch <file>- Check batch card payment statusconfigure-card-checker- Configure card checker settingscard-checker-help- Show card checker help
Cryptocurrency Commands
compare-rates <crypto>- Compare rates across exchangescrypto-price <symbol>- Get cryptocurrency current pricetrack-portfolio <symbols>- Track multiple cryptocurrenciescrypto-convert <amount> <from> <to>- Convert between cryptocurrenciesmarket-summary- Show cryptocurrency market summaryexport-rates <file>- Export rates to filecrypto-help- Show cryptocurrency commands help
HTML/jQuery Conversion Commands
html-to-react <file>- Convert HTML file to React componentbatch-convert <directory>- Batch convert HTML filesanalyze-html <file>- Analyze HTML structurejquery-to-react <file>- Convert jQuery code to Reactjq-batch-convert <directory>- Batch convert jQuery filesanalyze-jquery <file>- Analyze jQuery code structure
Usage Examples
Basic File Navigation
FEAR >> ls
FEAR >> cd src
FEAR >> pwd
FEAR >> cat config.js
FEAR >> find *.jsAI-Powered Security Analysis
FEAR >> ai-setup anthropic sk-ant-xxxxx
FEAR >> ai-analyze vulnerable.js
FEAR >> ai-threat myapp
FEAR >> ai-improve .Security Audit Workflow
FEAR >> security-audit
FEAR >> scan-deps
FEAR >> search-cve CVE-2024-1234
FEAR >> ai-explain CVE-2024-1234Code Refactoring Workflow
FEAR >> analyze-code old.js
FEAR >> refactor-file old.js
FEAR >> ai-compare old.js old.refactored.jsInteractive AI Chat
FEAR >> ai-chat
AI Chat > Explain SQL injection vulnerabilities
AI Chat > /history
AI Chat > /save security-notes.txt
AI Chat > /exitVulnerability Research
FEAR >> search-cve authentication
FEAR >> check-package express
FEAR >> ai-threat authentication-bypass
FEAR >> export-cve vulnerability-report.jsonCommand Line Features
Keyboard Shortcuts
- TAB - Command autocomplete
- Up/Down Arrows - Navigate command history
- Ctrl+C - Cancel current operation
- Ctrl+D - Exit application
Command History
- Maintains last 100 commands
- View with
historycommand - Navigate with arrow keys
Auto-completion
Press TAB to autocomplete commands. If multiple matches exist, all options will be displayed.
Module Architecture
The agent uses a modular architecture with the following structure:
modules/
├── utils/
│ ├── browser.js # File system browser
│ └── colorizer.js # Terminal output formatting
├── security/
│ ├── scanner.js # Network scanning
│ ├── web.js # Web scraping
│ ├── vulnerability.js # Vulnerability assessment
│ ├── monitor.js # Traffic monitoring
│ └── cve.js # CVE database
├── ai/
│ └── ai.js # AI integration
├── code/
│ ├── analyzer.js # Code analysis
│ ├── refactor.js # Code refactoring
│ ├── react.js # HTML to React
│ └── jquery.js # jQuery to React
├── analyze/
│ └── api.js # API testing
├── ccard/
│ ├── validator.js # Card validation
│ └── checker.js # Card status checking
└── crypto/
└── exchange.js # Cryptocurrency toolsBest Practices
Security
- Store API keys in environment variables, never in code
- Use
ai-statusto verify configuration before running analyses - Export reports regularly for audit trails
- Run
security-auditbefore deploying applications
Performance
- Use batch commands for multiple file operations
- Clear AI chat history periodically with
ai-clear-history - Export large datasets to files rather than viewing in terminal
Workflow Optimization
- Bookmark frequently accessed directories
- Use command history for repeated operations
- Configure default AI provider via environment variable
- Create shell aliases for common command sequences
Troubleshooting
Module Not Loading
If a module shows [UNAVAILABLE] status:
- Check that all dependencies are installed
- Verify module file exists in correct path
- Enable DEBUG mode:
DEBUG=1 node agent.js
AI Configuration Issues
FEAR >> ai-status # Check current configuration
FEAR >> ai-setup anthropic YOUR_KEY # Reconfigure
FEAR >> ai-help # View detailed AI documentationCommand Not Found
FEAR >> help # View all available commands
FEAR >> browse-help # View file browser commands
FEAR >> ai-help # View AI commandsVersion Information
Current Version: 2.3.0
Node.js Requirements: Compatible with Node.js 12.x and higher
Platform Support: Cross-platform (Windows, macOS, Linux)
License
This is a security testing framework intended for authorized security assessments and educational purposes only. Always obtain proper authorization before testing systems you do not own.
Support
For issues, questions, or feature requests, consult the following resources:
- Run
helpfor command reference - Run
tipsfor usage examples and workflows - Run
ai-helpfor AI-specific documentation - Enable DEBUG mode for verbose error output
