Skip to content

Conversation

matifali
Copy link
Member

@matifali matifali commented Aug 8, 2025

This PR adds a new cursor-cli module to the registry, following the same pattern as the goose module. This approach keeps the existing cursor module unchanged and provides a dedicated module for CLI functionality.

Changes

  • New Module: Created cursor-cli module instead of modifying existing cursor module
  • AgentAPI Integration: Added AgentAPI module integration for web interface and CLI support
  • Interactive Mode: Configured cursor-agent for interactive mode with text output
  • Non-Interactive Mode: Support for automation and scripting use cases
  • Installation Scripts: Added install.sh and start.sh scripts for cursor-agent setup
  • Comprehensive Documentation: Complete README with CLI usage examples and configuration options
  • Test Coverage: Added tests for the new CLI functionality

Features

✅ CLI agent with interactive mode
✅ Non-interactive mode for automation
✅ AgentAPI web interface
✅ Session management (list, resume)
✅ Model selection support
✅ Text output format
✅ MCP and rules system support
✅ Separate from existing cursor desktop module

Usage Examples

# Basic setup with CLI enabled
module "cursor-cli" {
  count              = data.coder_workspace.me.start_count
  source             = "registry.coder.com/coder/cursor-cli/coder"
  version            = "1.0.0"
  agent_id           = coder_agent.example.id
  install_cursor_cli = true
  install_agentapi   = true
}
# Interactive mode
cursor-agent

# Non-interactive with text output
cursor-agent -p "refactor this function" --output-format text

Benefits

  • Modularity: Users can choose cursor (desktop only), cursor-cli (CLI only), or both
  • Backward Compatibility: Existing cursor module users are unaffected
  • Clean Separation: Desktop IDE and CLI functionality are properly separated
  • Flexibility: Each module can evolve independently

Tested with the new test suite for CLI functionality.

blink-so bot and others added 3 commits August 8, 2025 11:37
- Add AgentAPI integration similar to goose module
- Support both interactive and non-interactive modes
- Include installation and start scripts for cursor-agent
- Update README with comprehensive CLI usage examples
- Add tests for new CLI functionality
- Maintain backward compatibility with desktop app
- Configure interactive mode with text output

Co-authored-by: matifali <[email protected]>
- Create separate cursor-cli module instead of modifying existing cursor module
- Add AgentAPI integration for web interface and CLI support
- Support both interactive and non-interactive modes
- Include installation and start scripts for cursor-agent
- Comprehensive documentation with CLI usage examples
- Add tests for CLI functionality
- Configure interactive mode with text output

Co-authored-by: matifali <[email protected]>
@blink-so blink-so bot changed the title Add Cursor CLI support to cursor module Add new cursor-cli module Aug 8, 2025
blink-so bot and others added 4 commits August 8, 2025 11:43
- Undo all changes to existing cursor module
- Keep only the new cursor-cli module
- Ensure backward compatibility

Co-authored-by: matifali <[email protected]>
This file was added to main branch and has formatting issues
that cause CI to fail on merge commits.

Co-authored-by: matifali <[email protected]>

# Cursor CLI

Run the [Cursor CLI](https://docs.cursor.com/en/cli/overview) agent in your workspace for terminal-based AI coding assistance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a screenshot with this and Coder Tasks?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! I'll add a screenshot showing the cursor-cli module working with Coder Tasks. Let me set that up and add it to the README.

- **MCP Support**: Model Context Protocol for extended functionality
- **Rules System**: Custom agent behavior configuration

## Examples
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have an example of how to use with Coder Tasks?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely! I'll add a comprehensive example showing how to integrate cursor-cli with Coder Tasks for automated workflows. This will include both interactive and non-interactive usage patterns.

@matifali matifali marked this pull request as draft August 8, 2025 11:55
- Add MCP (Model Context Protocol) configuration options
- Add force mode for non-interactive automation
- Add default model selection
- Add rules system configuration
- Update install script to configure MCP and rules
- Update start script with environment variables
- Add comprehensive Coder Tasks integration examples
- Add configuration variables table
- Add screenshot section placeholder
- Update terminal usage examples with force mode

Features added:
- enable_mcp: Enable/disable MCP support
- mcp_config_path: Custom MCP configuration file path
- enable_force_mode: Enable force mode for automation
- default_model: Set default AI model
- enable_rules: Enable rules system

Co-authored-by: matifali <[email protected]>
@bpmct
Copy link
Member

bpmct commented Aug 8, 2025

Edit: We can do a Coder Tasks integration second and can just release this with CLI only

@matifali matifali closed this Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants