Help
← Back to Help⚙️ CodeMap CLI Scanner — Keep Your Map Always Up to Date
The CodeMap CLI Scanner is a command-line tool that scans your project and generates a fresh, AI-ready code_map.json.
You can run it manually or automate it to always keep your AI assistant in sync with your codebase.
📥 Basic usage:
php scan_cli.php --project=PATH [OPTIONS]
--project: Path to your project folder (relative or absolute)- Additional flags available for PHP, JS, HTML, CSS, SQL, and globals
➡️ See CodeMap CLI Scanner — Usage & Parameters here →
🔁 Recommended Automation (Windows Task Scheduler):
- Create a batch file (e.g.,
run_scan.bat) with the following content:
php C:\path\scan_cli.php --project=../myproject --analyze_php --extract_globals > scan_log.txt 2>&1
- Open Task Scheduler and create a new task:
- Action: Start a program
- Program:
C:\Windows\System32\cmd.exe - Arguments:
/c "C:\path\to\run_scan.bat" - Trigger: Every 5–10 minutes (depends on project frequency)
⏹ How to stop the auto-refresh:
Open Task Scheduler → Find your task → Right-click → Disable or Delete.
💡 Pro Tip: For active projects, set refresh every 5 minutes. For stable projects, 10–30 minutes is enough.
⏰ Setting up the auto-refresh trigger (Windows)
- Open Task Scheduler (use Windows search)
- Click “Create Basic Task”
- Give your task a name (e.g.,
CodeMap Refresh) - Select “Daily” and click Next
- Choose a start time (e.g., 08:00 AM)
- On the recurrence screen, check “Repeat task every:” → choose 5 minutes, for a duration of 1 day
- Select “Start a program” → click Next
-
Enter the following:
- Program:
C:\Windows\System32\cmd.exe - Arguments:
/c "C:\path\to\run_scan.bat"
- Program:
- Click Finish to schedule it
💡 Pro Tip: You can view, edit, or disable your task anytime via the Task Scheduler Library.
If you have any questions, feature requests, need help, or want to give feedback — feel free to contact us at