-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Problem
The current cli.py is a large monolithic file (4000+ lines) that handles all command-line functionality. This makes it difficult to:
- Maintain and update specific commands
- Add new commands without increasing complexity
- Onboard new developers to add new functionality
Proposed Changes
Refactor the CLI module into a modular structure:
src/secops/cli/
├── __init__.py
├── __main.py__ # Main CLI entry point
├── commands/ # Command handlers
│ ├── __init__.py
│ ├── config.py # Config commands
│ ├── search.py # Search commands
│ ├── rule.py # Rule management
│ ├── feed.py # Feed management
│ ├── export.py # Data export
│ ├── data_table.py # Data table operations
│ ├── reference_list.py # Reference list operations
│ └── ... # etc.
└── utils/ # Shared utility functions
├── __init__.py
├── formatters.py
├── config_utils.py
└── time_utils.py
Key Benefits:
- Improved Maintainability: Smaller, focused files are easier to understand and modify
- Better Organisation: Logical grouping of related functionality
- Faster Development: New commands can be added without navigating a large file
Migration:
- Backward compatibility will be maintained
- Existing scripts using
secops.cliwill continue to work - New code should use the modular structure
mihirvala08
Metadata
Metadata
Assignees
Labels
No labels