Getting Started with Codevyr
Welcome to Codevyr! This guide will teach you the basics of the Askl (Ask Language) query syntax to analyze and visualize your code dependencies.
What is Codevyr?
Codevyr is a source code analysis platform that uses the Askl query language to help you:
- Find Functions - Locate specific functions across your codebase
- Trace Dependencies - See what calls what and build dependency graphs
- Filter Results - Focus on relevant parts of your code
- Visualize Architecture - Understand code relationships through interactive graphs
Getting Started
Access the Platform
Visit ui.codevyr.com to start using Codevyr.
Note: Currently adding new projects is not supported. You can test out Codevyr with pre-existing index of Kubernetes 1.32.3.
- Start writing Askl queries in the query editor
- Explore the generated dependency graphs
Askl Query Language Basics
Askl (Ask Language) is Codevyr’s query language for finding and filtering functions in your codebase.
Basic Queries
1. Simple Function Matching
Find all functions named “main”:
"main"
This matches any function with “main” in its name across your entire codebase.
2. Qualified Function Names
Find functions with specific package and function names:
"cli.Run"
This matches functions where:
- The full package path contains “cli”
- The function name contains “Run”
Note: Matching is context-sensitive and exact - “cli” will not match “click”.
Dependency Queries
3. Show Function Dependencies (Callees)
Find what functions cli.Run
calls:
"cli.Run" {
}
This shows cli.Run
and all functions called by cli.Run
.
4. Show Function Callers
Find what functions call cli.Run
:
{"cli.Run"}
This shows all functions that call cli.Run
.
Filtering with @ignore
Remove uninteresting functions from results:
@ignore("builtin")
main
This finds all “main” functions but ignores any with “builtin” in their name.
Global Ignore (Preamble)
Make ignore rules apply to all queries in your session:
@preamble
@ignore("builtin")
@ignore("test");
main
cli.Run
Place @ignore
statements at the beginning to filter globally.
Practical Examples
Example 1: Explore Main Functions
"main" {
}
Shows all main
functions and what they call.
Tips for Success
🎯 Start Simple
- Begin with basic function searches:
main
,init
,New
- Add scopes gradually to explore dependencies
- Use
@ignore
to reduce noise
🔍 Effective Filtering
- Package-level:
package.Function
- Multiple terms:
user.Create
(must contain both “user” and “Create”) - Ignore patterns:
@ignore("builtin")
to skip built package
📊 Reading Results
- Nodes: Represent matched functions
- Edges: Show function calls (who calls whom)
Next Steps
Once you’re comfortable with basic queries:
- Experiment with complex nested scopes
- Combine multiple filters and ignore patterns
- Explore the interactive graph features
- Share interesting queries with your team
Need Help?
🆘 Common Issues
Q: My query returns too many results
A: Add more specific filters or use @ignore
to reduce noise
Q: My query returns nothing A: Check if parent functions actually call child functions in scopes
Q: Function names don’t match A: Remember matching is exact - check spelling and case
📚 Learn More
- Experiment with the interactive platform at ui.codevyr.com
- Try different query patterns on sample projects
- Use the graph controls to navigate complex results