tfmate


Nametfmate JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummarySupporting tools for working with terraform code.
upload_time2025-07-31 21:44:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords terraform aws
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tfmate

**Documentation**: <https://tfmate.readthedocs.org>

`tfmate` is a command line interface and Python library for analyzing Terraform configurations and state files. It provides powerful tools for understanding your infrastructure as code, including configuration analysis, AWS service discovery, and state file inspection.

## Features

- **Configuration Analysis**: Analyze Terraform configuration files to understand providers, backends, and version constraints
- **AWS Service Discovery**: List and filter AWS services from botocore definitions
- **State File Inspection**: Extract Terraform version and metadata from state files
- **Multiple Output Formats**: Support for JSON, table, and text output formats
- **Flexible Configuration**: Customizable through configuration files and environment variables

## Installation

`tfmate` supports Python 3.10+.

To install from PyPI:

```shell
pip install tfmate
```

To install using `uv`:

```shell
    sh -c "$(curl -fsSL https://astral.sh/uv/install)"
    uv tool install tfmate
```

Ensure you have `./local/bin` in your `PATH`, since that's where `uv` puts the
executable.

## Quick Start

```bash
# Get help
tfmate --help

# Analyze Terraform configuration
tfmate analyze config

# List AWS services
tfmate aws services

# Get Terraform version from state
tfmate terraform version

# Use JSON output for scripting
tfmate --output json analyze config
```

## Usage Examples

### Analyze Terraform Configuration

```bash
# Analyze current directory
tfmate analyze config

# Analyze specific directory with detailed info
tfmate analyze config --directory ./infrastructure --show-providers --show-backend

# Output as JSON for scripting
tfmate --output json analyze config > config.json
```

### AWS Service Discovery

```bash
# List all AWS services
tfmate aws services

# List only service names
tfmate aws services --names-only

# Filter services by pattern
tfmate aws services --filter-name "ec2*" --sort-by name
```

### State File Operations

```bash
# Get Terraform version from state
tfmate terraform version

# Get version from specific directory
tfmate terraform version --directory ./infrastructure

# Use explicit state file (local only)
tfmate terraform version --state-file ./terraform.tfstate
```

## Documentation

For detailed documentation, visit: <https://tfmate.readthedocs.org>

- [Installation Guide](https://tfmate.readthedocs.org/en/latest/overview/installation.html)
- [Quickstart Guide](https://tfmate.readthedocs.org/en/latest/overview/quickstart.html)
- [Usage Guide](https://tfmate.readthedocs.org/en/latest/overview/usage.html)
- [Configuration Guide](https://tfmate.readthedocs.org/en/latest/overview/configuration.html)

## Development

To set up a development environment:

```bash
# Clone the repository
git clone https://github.com/caltechads/tfmate.git
cd tfmate

uv sync
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Run tests
pytest
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

## License

See LICENSE.txt in this project for the license.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tfmate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Christopher Malek <cmalek@placodermi.org>",
    "keywords": "terraform, aws",
    "author": null,
    "author_email": "Christopher Malek <cmalek@placodermi.org>",
    "download_url": "https://files.pythonhosted.org/packages/c5/3a/c62885433dcc93ff88f0922b3f92cf3a806acfb40ca0a6431e938df29903/tfmate-0.2.1.tar.gz",
    "platform": null,
    "description": "# tfmate\n\n**Documentation**: <https://tfmate.readthedocs.org>\n\n`tfmate` is a command line interface and Python library for analyzing Terraform configurations and state files. It provides powerful tools for understanding your infrastructure as code, including configuration analysis, AWS service discovery, and state file inspection.\n\n## Features\n\n- **Configuration Analysis**: Analyze Terraform configuration files to understand providers, backends, and version constraints\n- **AWS Service Discovery**: List and filter AWS services from botocore definitions\n- **State File Inspection**: Extract Terraform version and metadata from state files\n- **Multiple Output Formats**: Support for JSON, table, and text output formats\n- **Flexible Configuration**: Customizable through configuration files and environment variables\n\n## Installation\n\n`tfmate` supports Python 3.10+.\n\nTo install from PyPI:\n\n```shell\npip install tfmate\n```\n\nTo install using `uv`:\n\n```shell\n    sh -c \"$(curl -fsSL https://astral.sh/uv/install)\"\n    uv tool install tfmate\n```\n\nEnsure you have `./local/bin` in your `PATH`, since that's where `uv` puts the\nexecutable.\n\n## Quick Start\n\n```bash\n# Get help\ntfmate --help\n\n# Analyze Terraform configuration\ntfmate analyze config\n\n# List AWS services\ntfmate aws services\n\n# Get Terraform version from state\ntfmate terraform version\n\n# Use JSON output for scripting\ntfmate --output json analyze config\n```\n\n## Usage Examples\n\n### Analyze Terraform Configuration\n\n```bash\n# Analyze current directory\ntfmate analyze config\n\n# Analyze specific directory with detailed info\ntfmate analyze config --directory ./infrastructure --show-providers --show-backend\n\n# Output as JSON for scripting\ntfmate --output json analyze config > config.json\n```\n\n### AWS Service Discovery\n\n```bash\n# List all AWS services\ntfmate aws services\n\n# List only service names\ntfmate aws services --names-only\n\n# Filter services by pattern\ntfmate aws services --filter-name \"ec2*\" --sort-by name\n```\n\n### State File Operations\n\n```bash\n# Get Terraform version from state\ntfmate terraform version\n\n# Get version from specific directory\ntfmate terraform version --directory ./infrastructure\n\n# Use explicit state file (local only)\ntfmate terraform version --state-file ./terraform.tfstate\n```\n\n## Documentation\n\nFor detailed documentation, visit: <https://tfmate.readthedocs.org>\n\n- [Installation Guide](https://tfmate.readthedocs.org/en/latest/overview/installation.html)\n- [Quickstart Guide](https://tfmate.readthedocs.org/en/latest/overview/quickstart.html)\n- [Usage Guide](https://tfmate.readthedocs.org/en/latest/overview/usage.html)\n- [Configuration Guide](https://tfmate.readthedocs.org/en/latest/overview/configuration.html)\n\n## Development\n\nTo set up a development environment:\n\n```bash\n# Clone the repository\ngit clone https://github.com/caltechads/tfmate.git\ncd tfmate\n\nuv sync\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n\n# Run tests\npytest\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nSee LICENSE.txt in this project for the license.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Supporting tools for working with terraform code.",
    "version": "0.2.1",
    "project_urls": {
        "Issues": "https://github.com/cmalek/tfmate/issues",
        "Source": "https://github.com/cmalek/tfmate"
    },
    "split_keywords": [
        "terraform",
        " aws"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6eab6ab21d30fe8a38cf44dcf150a40b51ebf3238b05e1950f02462a0ed57edc",
                "md5": "2560e73993bb45fc8040f4b3be97a631",
                "sha256": "f03870eac066bd97048a0c97022308c653794fbd750a9078833e33a27cdfbe35"
            },
            "downloads": -1,
            "filename": "tfmate-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2560e73993bb45fc8040f4b3be97a631",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 49071,
            "upload_time": "2025-07-31T21:44:56",
            "upload_time_iso_8601": "2025-07-31T21:44:56.155194Z",
            "url": "https://files.pythonhosted.org/packages/6e/ab/6ab21d30fe8a38cf44dcf150a40b51ebf3238b05e1950f02462a0ed57edc/tfmate-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c53ac62885433dcc93ff88f0922b3f92cf3a806acfb40ca0a6431e938df29903",
                "md5": "e9bedd0d2479016770fbe3a60ecaeab2",
                "sha256": "297fbc1a0279a1959d82122b87d046c8e61ba44f9b4585fe228ac622ad3a8d83"
            },
            "downloads": -1,
            "filename": "tfmate-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e9bedd0d2479016770fbe3a60ecaeab2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 40347,
            "upload_time": "2025-07-31T21:44:57",
            "upload_time_iso_8601": "2025-07-31T21:44:57.046450Z",
            "url": "https://files.pythonhosted.org/packages/c5/3a/c62885433dcc93ff88f0922b3f92cf3a806acfb40ca0a6431e938df29903/tfmate-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-31 21:44:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cmalek",
    "github_project": "tfmate",
    "github_not_found": true,
    "lcname": "tfmate"
}
        
Elapsed time: 2.35695s