@liftoffllc/cursor-ops-kit
v1.2.1
Published
A toolkit for managing Cursor AI configurations across different project roles
Downloads
9
Readme
Cursor Ops Kit
A CLI tool to enforce Cursor IDE rules, CI/CD workflows, and configuration across repositories.
Installation
# Using npm
npm install -D @liftoffllc/cursor-ops-kit
# Using yarn
yarn add -D @liftoffllc/cursor-ops-kitQuick Start
# Initialize with a specific role
npx cursor-ops init --role frontend
# Or use interactive mode
npx cursor-ops init --interactiveAvailable Roles
frontend: Frontend development configurationbackend: Backend development configurationdevops: DevOps and CI/CD configurationinfra: Infrastructure configuration
Features
1. Configuration Management
Initialize Configuration
# Basic initialization
npx cursor-ops init --role <role>
# Dry run mode (preview changes)
npx cursor-ops init --role <role> --dry-run
# Interactive mode
npx cursor-ops init --interactiveMerge Configurations
# Merge role-specific with base configuration
npx cursor-ops merge --role <role>Compare Configurations
# Show differences between configurations
npx cursor-ops diff --role <role>2. Backup Management
# List available backups
npx cursor-ops backup list
# Restore a specific backup
npx cursor-ops backup restore --file <backup-file>
# Clean up old backups
npx cursor-ops backup cleanup --days 303. Validation & Auditing
# Audit current configuration
npx cursor-ops audit
# Check version and updates
npx cursor-ops versionConfiguration Structure
Base Configuration (.cursor)
{
"version": "1.2.1",
"rules": [
{
"name": "enforceNaming",
"type": "naming",
"pattern": "^[a-z][a-zA-Z0-9]*$",
"enabled": true,
"severity": "error"
}
]
}Role-Specific Configuration (.cursor-role-{role})
Additional rules and overrides for specific roles.
Features by Module
Core Modules
Initialization (init.js)
- Environment validation
- Template copying
- Configuration setup
- Role-specific customization
Validation (validator.js)
- Role validation
- Configuration structure verification
- GitHub workflow validation
- Security checks
Logging (logger.js)
- Colored output
- Multiple log levels (debug, info, warn, error)
- Configurable log level
Backup (backup.js)
- Automatic backup creation
- Backup rotation (keeps last 5)
- Restore functionality
- Cleanup of old backups
Advanced Features
Merge (merge.js)
- Configuration merging
- Workflow file merging
- Conflict resolution
- Precedence handling
Interactive Setup (interactive.js)
- Guided configuration
- Role selection
- Custom settings
Audit (audit.js)
- Configuration validation
- Rule verification
- Issue reporting
Migration (migrate.js)
- Version upgrades
- Format updates
- Backward compatibility
Best Practices
- Always use
--dry-runfirst to preview changes - Keep backups before major changes
- Review merged configurations before applying
- Use role-specific configurations for team consistency
Troubleshooting
Common Issues
Configuration Validation Errors
- Check rule format
- Verify required fields
- Use audit command for detailed report
Merge Conflicts
- Review both configurations
- Use diff command to identify issues
- Consider manual merge for complex cases
Backup Issues
- Ensure write permissions
- Check available disk space
- Use cleanup command for space management
Contributing
For bugs, feature requests, or contributions, please create an issue or submit a pull request.
License
Developed by LiftOff LLC Engineering 🚀
