-
-
Notifications
You must be signed in to change notification settings - Fork 770
Expand file tree
/
Copy pathrepo_map_example.py
More file actions
24 lines (18 loc) · 641 Bytes
/
repo_map_example.py
File metadata and controls
24 lines (18 loc) · 641 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
Repository Map Example for PraisonAI CLI.
Intelligent codebase mapping with symbol extraction.
Docs: https://docs.praison.ai/cli/repo-map
"""
from praisonai.cli.features import RepoMapHandler
# Initialize with current directory
handler = RepoMapHandler(output="verbose")
repo_map = handler.initialize(root=".")
# Get the repository map
print("=== Repository Map ===")
map_str = handler.get_map()
print(map_str[:500] if len(map_str) > 500 else map_str)
print("..." if len(map_str) > 500 else "")
# Refresh after file changes
handler.refresh()
# Get symbols for a specific file (if exists)
# symbols = handler.get_context("MyClass")