agentleFS
psu-efdpsu-efd/pyHMT2D/.cursor/rules/cli-usage.mdc

pyHMT2D / rules

Cursor rule132 starsChanged 8 months agoMITView on GitHub

This rule covers the command-line interface (CLI) tools available in pyHMT2D. Location: pyHMT2D/cli/ Most commands support these options: - --verbose: Enable detailed output - --output-dir: Specify output directory - --format: Choose output format - --parallel: Enable parallel processing Common error messages and solutions: 1. File not found - Check file paths in configuration - Verify file permissions

The file

We split this cli-usage.mdc into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check file paths in configuration

    line 97
  2. Distinctive:

    Check input data validity

    line 103
  3. Distinctive:

    Verify input file formats

    line 106
  4. Distinctive:

    Check terrain data compatibility

    line 107
  5. Distinctive:

    Ensure sufficient disk space

    line 108

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
cli-usage.mdc
---
description: 
globs: 
alwaysApply: false
---
# Command-Line Interface Usage

This rule covers the command-line interface (CLI) tools available in pyHMT2D.

## Available Commands

Location: [pyHMT2D/cli/](mdc:pyHMT2D/cli)

### Model Calibration
```bash
hmt-calibrate calibration.json
```
- Runs model calibration using the specified configuration file
- Supports both SRH-2D and HEC-RAS models
- Outputs calibration results and statistics

### Model Conversion
```bash
hmt-ras-to-srh Muncie2D.p01.hdf Terrain/TerrainMuncie_composite.tif srh_Muncie
```
- Converts HEC-RAS 2D case to SRH-2D format
- Requires HDF file and terrain data
- Outputs SRH-2D compatible files

### Result Processing
```bash
hmt-process-results results.hdf --output vtk
```
- Processes model results
- Converts to various formats (VTK, CSV, etc.)
- Generates analysis reports

## Configuration Files

### Calibration Configuration
```json
{
    "model_type": "SRH-2D",
    "parameters": {
        "manning_n": {
            "initial": 0.03,
            "min": 0.01,
            "max": 0.1
        }
    },
    "objective_function": {
        "type": "rmse",
        "observed_data": "observed.csv"
    }
}
```

### Parametric Study Configuration
```json
{
    "study_type": "single_parameter",
    "parameter": "manning_n",
    "values": [0.01, 0.02, 0.03, 0.04, 0.05],
    "output_format": "vtk"
}
```

## Common Options

Most commands support these options:
- `--verbose`: Enable detailed output
- `--output-dir`: Specify output directory
- `--format`: Choose output format
- `--parallel`: Enable parallel processing

## Examples

1. Basic Calibration:
```bash
hmt-calibrate config.json --output-dir results
```

2. Model Conversion with Custom Options:
```bash
hmt-ras-to-srh input.hdf terrain.tif output --format vtk --parallel
```

3. Result Processing with Multiple Formats:
```bash
hmt-process-results results.hdf --format vtk,csv,excel
```

## Error Handling

Common error messages and solutions:
1. File not found
   - Check file paths in configuration
   - Verify file permissions

2. Model execution errors
   - Check model installation
   - Verify model paths
   - Check input data validity

3. Conversion errors
   - Verify input file formats
   - Check terrain data compatibility
   - Ensure sufficient disk space

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.