Metadata-Version: 2.4
Name: textfsm_ai
Version: 0.5.1
Summary: AI-powered TextFSM template generator with multi-provider routing
Author-email: Tuyen Mathew Duong <tuyen@geekstrident.com>
Maintainer-email: Tuyen Mathew Duong <tuyen@geekstrident.com>
License: MIT
Project-URL: Homepage, https://github.com/Geeks-Trident-LLC/textfsm-ai
Project-URL: Repository, https://github.com/Geeks-Trident-LLC/textfsm-ai
Project-URL: Issues, https://github.com/Geeks-Trident-LLC/textfsm-ai/issues
Project-URL: Documentation, https://geeks-trident-llc.github.io/textfsm-ai/latest/
Keywords: textfsm,network automation,cli parsing,template generator,ai,llm,openai,claude,anthropic,gemini,azure-ai-inference,deepseek,groq,xai,grok,together-ai,fireworks-ai,cerebras,perplexity,openrouter,moonshot,kimi,mistral,bedrock,aws,cohere,vertex ai,gcp,oracle cloud infrastructure,oci,device output parsing,log extraction,structured data extraction,screen scraping
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
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
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyYAML>=6.0
Requires-Dist: requests>=2.32
Requires-Dist: click>=8.1
Requires-Dist: textfsm>=1.1.0
Requires-Dist: openai>=1.0.0
Requires-Dist: google-genai>=0.2.0
Requires-Dist: azure-ai-inference>=1.0.0b9
Requires-Dist: anthropic>=0.8.0
Requires-Dist: mistralai==1.10.0
Requires-Dist: boto3==1.42.97
Requires-Dist: cohere==5.21.1
Requires-Dist: oci==2.182.0
Requires-Dist: tomli; python_version < "3.11"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
Requires-Dist: ruff>=0.4.0; extra == "dev"
Requires-Dist: black>=24.0.0; extra == "dev"
Requires-Dist: mypy>=1.10.0; extra == "dev"
Requires-Dist: respx; extra == "dev"
Provides-Extra: build
Requires-Dist: build; extra == "build"
Requires-Dist: twine; extra == "build"
Provides-Extra: all
Requires-Dist: pytest>=8.0.0; extra == "all"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "all"
Requires-Dist: pytest-cov>=5.0.0; extra == "all"
Requires-Dist: ruff>=0.4.0; extra == "all"
Requires-Dist: black>=24.0.0; extra == "all"
Requires-Dist: mypy>=1.10.0; extra == "all"
Requires-Dist: respx; extra == "all"
Requires-Dist: build; extra == "all"
Requires-Dist: twine; extra == "all"
Dynamic: license-file

# textfsm-ai

**AI-powered TextFSM template generation, parsing assistance, and smart log extraction.**

`textfsm-ai` brings modern LLM intelligence to traditional TextFSM workflows.  
It helps you automatically generate templates, validate patterns, explain parsing logic, and accelerate network automation development.

---

## 🚀 Features

- **AI-Powered Template Generation** — Turn raw CLI output into production-ready TextFSM templates in seconds.
- **Smart Validation & Refinement** — Automatically verify template correctness and refine ambiguous patterns with AI assistance.
- **Flexible Multi-Provider AI Routing** — Use the best AI model for each task with automatic routing across supported cloud providers.

---

## 📦 Installation

```bash
pip install textfsm-ai
```

### Verify installation

```bash
textfsm-ai --version
# or
textfsm-ai version
```

Either command prints the installed version, e.g. `textfsm-ai v0.4.0`.

---

## 📚 Documentation

- **Latest docs:** [https://geeks-trident-llc.github.io/textfsm-ai/latest/](https://geeks-trident-llc.github.io/textfsm-ai/latest/)
- **All versions:** [https://geeks-trident-llc.github.io/textfsm-ai/](https://geeks-trident-llc.github.io/textfsm-ai/)

---

## 🤖 What is textfsm-ai, in an LLM's view?

For an LLM, TextFSM's native syntax — regex-heavy `Value`/`Rule` definitions driving a state machine — is easy to get *almost* right and hard to get *exactly* right; small regex or state-transition mistakes are common and easy to miss. `textfsm-ai` acts as an **LLM optimizer** for TextFSM: instead of asking a model to freehand raw TextFSM syntax, it gives the model a smaller, constrained, readable DSL to generate from, then deterministically compiles that DSL into a canonical TextFSM template. The model reasons about structure and intent; `textfsm-ai` guarantees the correctness and consistency of the resulting syntax.

---

## ❓ Why do you need textfsm-ai?

- **Understands Messy Input** — Feed it raw CLI output, log lines, or any plain-text or semi-structured text; no need to hand-write parsing rules for every format and edge case.
- **No TextFSM Syntax Required** — `textfsm-ai` handles TextFSM's regex-heavy `Value`/`Rule`/state-machine syntax for you, so you don't need prior TextFSM expertise to get a working, correct template.
- **Canonical, Consistent Templates** — Every generated template goes through the same deterministic normalization step, so the same kind of input reliably produces the same shape of output every time.
- **Readable DSL** — Templates can also be expressed as a human-readable DSL that non-technical teammates can read and reason about, instead of a wall of regex.
- **Recognizer Pattern Generation** — Beyond extracting values, `textfsm-ai` can generate recognizer patterns that detect which block of text a template applies to before parsing it.
- **Real-World Applications** — Log extraction, test-data extraction and normalization, and other pipelines that turn recurring plain-text or semi-structured output into reliable, structured records.

---
