lucerna graph
Traverse the knowledge graph starting from a chunk ID. Get the chunk ID from search output first.
# Get a chunk IDlucerna search /path/to/project "verifyToken" --format json | jq '.[0].id'
# Then traverse the graphlucerna graph /path/to/project <chunk-id> --relation callerslucerna graph /path/to/project <chunk-id> --relation implementorslucerna graph /path/to/project <chunk-id> --relation neighborhood --depth 2Options
Section titled “Options”| Option | Description |
|---|---|
--relation <type> | callers, callees, implementors, super-types, usages, neighborhood (default) |
--depth <n> | BFS depth for neighborhood (default: 1) |
--format raw|json|pretty-json | Output format (default: raw) |
Example: callers
Section titled “Example: callers”src/auth/AuthMiddleware.ts:20-35 [method] run (CALLS (incoming)) run(req: Request, res: Response, next: NextFunction) { const payload = verifyToken(token);
src/auth/guards.ts:8-22 [function] requireAuth (CALLS (incoming)) export function requireAuth(roles: Role[] = []): RequestHandler {
2 result(s)Example: neighborhood
Section titled “Example: neighborhood”Center: src/auth/middleware.ts:12 [function] verifyToken
src/auth/AuthMiddleware.ts:20-35 [method] run (CALLS (incoming)) run(req: Request, res: Response, next: NextFunction) {
src/auth/types.ts:1-8 [interface] JWTPayload (USES (outgoing)) export interface JWTPayload { userId: string; roles: Role[]; iat: number; }
2 result(s)