Metadata-Version: 2.4
Name: azurerm-cli
Version: 0.1.0
Summary: CLI tool to fetch Terraform AzureRM provider documentation from the official Terraform Registry
Author-email: Utkarsh Jaiswal <utkarshjaiswal2580@gmail.com>
License: MIT
Keywords: terraform,azure,cli,documentation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: rich>=13.7.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Dynamic: license-file

# azurerm-cli

CLI tool to fetch Terraform AzureRM provider documentation from the official Terraform Registry.

## Installation

```bash
pip install -e .
```

## Usage

### Fetch documentation

```bash
# Fetch resource documentation (latest version)
azurerm-cli doc azurerm_virtual_machine

# Fetch data source documentation
azurerm-cli doc azurerm_virtual_network --category data-sources

# Fetch specific version
azurerm-cli doc azurerm_virtual_machine --version 3.50.0

# Save to file
azurerm-cli doc azurerm_virtual_machine --output docs/vm.md
```

### List resources

```bash
# List all resources
azurerm-cli list resources

# List data sources
azurerm-cli list data-sources

# List for specific version
azurerm-cli list resources --version 4.64.0

# Limit results
azurerm-cli list resources --limit 10
```

### Search

```bash
# Search resources
azurerm-cli search redis

# Search data sources
azurerm-cli search storage --category data-sources

# Search with version
azurerm-cli search virtual_network --version 3.50.0
```

## Configuration

### Default Version

You can set a default provider version so you don't need to specify `--version` each time:

```bash
# Set default version using --set-default flag
azurerm-cli doc azurerm_virtual_machine --version 4.60.0 --set-default

# Or use environment variable
export AZurerm_CLI_VERSION=4.60.0
```

After setting a default, commands will use that version automatically:

```bash
azurerm-cli doc azurerm_virtual_machine  # Uses default version 4.60.0
```

The config file is stored at `~/.azurerm-cli/config`. To clear the default, delete this file.

## Options

- `--verbose, -V`: Enable verbose output
- `--version`: Show version information

## Development

```bash
# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with verbose
python -m azurerm_cli doc azurerm_virtual_machine -V
```

## License

MIT
