Models API¶
The Models API in Cursor-Utils provides structured information about the available commands, their options, and usage patterns. This documentation is primarily used by AI agents to understand how to interact with Cursor-Utils.
Overview¶
The models module contains documentation files that define:
- Command Structure: The available commands and their syntax
- Command Options: The options and arguments for each command
- Usage Examples: Examples of how to use each command
- Best Practices: Recommendations for effective use of commands
Model Files¶
cursor-utils.md¶
The primary model file that defines the Cursor-Utils command-line interface for AI agents. This file is automatically loaded by Cursor AI agents to understand how to use the Cursor-Utils commands.
---
description: cursor-utils
globs: *
alwaysApply: true
---
# Cursor-Utils: Command-Line Utilities for Cursor AI Agents
Command Documentation¶
The model provides detailed documentation for each command:
Config Command¶
Used to manage persistent configuration settings, particularly API keys.
Gemini Command¶
Generates content using Google's Gemini AI models with options for model selection, formatting, and generation parameters.
GitHub Command¶
Provides tools for interacting with GitHub repositories, including repository information, issues, and pull requests.
Web Command¶
Searches the web using Perplexity AI to provide curated results for research queries.
Project Command¶
Analyzes local project code using Google's Gemini AI to provide insights about the codebase.
Repo Command¶
Analyzes and queries remote code repositories to provide insights about the codebase.
Model Structure¶
The model file follows a consistent structure:
- Command Overview: Brief description of the command's purpose
- Command Syntax: The command-line syntax with placeholders
- Options: Available options with descriptions
- Subcommands: For commands that have subcommands
- Examples: Practical examples of command usage
Usage in AI Agents¶
AI agents use this model to:
- Understand Commands: Interpret user requests and map them to appropriate commands
- Format Commands: Construct properly formatted command-line invocations
- Provide Guidance: Offer help and suggestions for command usage
- Handle Errors: Interpret and respond to command errors
Extending Models¶
When adding new commands to Cursor-Utils, the model file should be updated to include:
- Command Description: A clear description of the command's purpose
- Command Syntax: The exact syntax for using the command
- Options Documentation: All available options with descriptions
- Usage Examples: At least 2-3 examples of common use cases
Best Practices¶
- Keep Models Updated: Ensure model documentation matches the actual implementation
- Provide Clear Examples: Include practical examples that demonstrate real-world usage
- Document All Options: Include all available options, even if rarely used
- Include Error Handling: Where appropriate, include examples of error handling
- Use Consistent Formatting: Maintain consistent formatting across all command documentation