<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TuviDev</title>
    <description>The latest articles on DEV Community by TuviDev (@tuvidev).</description>
    <link>https://dev.to/tuvidev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4083843%2Fbf0aeb49-fdd4-441d-ac86-b468846716cf.jpg</url>
      <title>DEV Community: TuviDev</title>
      <link>https://dev.to/tuvidev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tuvidev"/>
    <language>en</language>
    <item>
      <title>Say Goodbye to YAML Hell: Introducing Infra Lang v0.5.1</title>
      <dc:creator>TuviDev</dc:creator>
      <pubDate>Tue, 25 Aug 2026 19:56:11 +0000</pubDate>
      <link>https://dev.to/tuvidev/say-goodbye-to-yaml-hell-introducing-infra-lang-v051-1ge2</link>
      <guid>https://dev.to/tuvidev/say-goodbye-to-yaml-hell-introducing-infra-lang-v051-1ge2</guid>
      <description>&lt;p&gt;If you've ever spent 3 hours debugging a missing 2-space indentation in a 1,000-line Kubernetes YAML file or copy-pasting the same service definition between docker-compose.yml, Helm templates, and Terraform HCL — you're not alone.&lt;/p&gt;

&lt;p&gt;Today, I’m excited to share Infra Lang v0.5.1, an open-source, human-friendly Infrastructure-as-Code (IaC) compiler that lets you define your architecture once in a clean, typed DSL and compile it to Kubernetes, Docker Compose, Helm Charts, and Terraform HCL.&lt;/p&gt;

&lt;p&gt;🌟 &lt;strong&gt;Why Infra Lang?&lt;/strong&gt;&lt;br&gt;
Instead of choosing between raw YAML files or full imperative programming languages (JS/Python SDKs), Infra Lang provides a declarative, type-safe DSL with built-in FinOps cost calculation, live drift detection, and security linting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Define Once, Deploy Anywhere&lt;/strong&gt;&lt;br&gt;
Write a single .infra file for local development (docker compose) and production (Kubernetes / Helm / Terraform):&lt;/p&gt;

&lt;p&gt;environment "prod" {&lt;br&gt;
    service api {&lt;br&gt;
        replicas: 5&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;service api {&lt;br&gt;
    image: "myorg/api:v1.5.0"&lt;br&gt;
    port: 8080&lt;br&gt;
    cpu: "500m"&lt;br&gt;
    memory: "512Mi"&lt;br&gt;
    depends_on: [postgres_db]&lt;br&gt;
    env {&lt;br&gt;
        NODE_ENV: "production"&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;database postgres_db {&lt;br&gt;
    type: "postgres"&lt;br&gt;
    storage: "20Gi"&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;network_policy "api_sec" {&lt;br&gt;
    target: "api"&lt;br&gt;
    allow_ingress: ["frontend"]&lt;br&gt;
    block_all_ingress: true&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔥 What's New in v0.5.1?&lt;/strong&gt;&lt;br&gt;
Here are the flagship features packed into the v0.5.1 release:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚡ 1. Service DAG Dependencies (depends_on)&lt;/strong&gt;&lt;br&gt;
Declare architectural dependencies (depends_on: [postgres_db]). Infra Lang automatically cross-compiles them into:&lt;/p&gt;

&lt;p&gt;Kubernetes: initContainers (busybox waiting for TCP port availability before starting).&lt;br&gt;
Docker Compose: Native depends_on with service_healthy conditions.&lt;br&gt;
Terraform / Helm: Explicit DAG resource dependency edges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔒 2. Cloud Secret Stores (secret_store)&lt;/strong&gt;&lt;br&gt;
Native integration for HashiCorp Vault, AWS Secrets Manager, GCP Secret Manager, and Kubernetes ExternalSecret CRDs (external-secrets.io/v1beta1).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🛡️ 3. Network Policy Security DSL (network_policy)&lt;/strong&gt;&lt;br&gt;
Declaratively define traffic isolation rules and default-deny policies. Compiles to Kubernetes NetworkPolicy, isolated Compose networks:, or Terraform aws_security_group.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💰 4. FinOps Cost Estimation &amp;amp; CI/CD Guardrails (infra cost)&lt;/strong&gt;&lt;br&gt;
Know your cloud bill before deploying!&lt;/p&gt;

&lt;p&gt;infra cost app.infra --format markdown&lt;/p&gt;

&lt;p&gt;Generates clean Markdown tables for GitHub Pull Request comments and fails CI pipelines if monthly costs exceed budget (infra validate --max-cost 200).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔎 5. Live Drift Detection &amp;amp; Terraform-Style Preview&lt;/strong&gt;&lt;br&gt;
infra doctor --check-drift --live — Compare running K8s/Compose state against .infra source files.&lt;br&gt;
infra diff app.infra --live — Visual color-coded preview of planned changes before running infra up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 Getting Started in 30 Seconds&lt;/strong&gt;&lt;br&gt;
Install via PyPI:&lt;/p&gt;

&lt;p&gt;pip install --upgrade infra-lang&lt;/p&gt;

&lt;p&gt;Compile to your favorite target:&lt;/p&gt;

&lt;p&gt;infra compile app.infra -t kubernetes&lt;br&gt;
infra compile app.infra -t compose&lt;br&gt;
infra cost app.infra&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VS Code Extension:&lt;/strong&gt;&lt;br&gt;
Search for Infra Lang in the VS Code Marketplace for live syntax highlighting, diagnostics, and autocompletion!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🤝 Open Source &amp;amp; Community&lt;/strong&gt;&lt;br&gt;
Infra Lang is 100% open-source under the MIT License, backed by 2,660+ unit tests, 96.7% test coverage, and 100% strict Mypy type safety.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; github.com/TuviDev/infra-lang&lt;br&gt;
&lt;strong&gt;Documentation:&lt;/strong&gt; TuviDev.github.io/infra-lang&lt;br&gt;
&lt;strong&gt;If you find the project useful, drop a ⭐ on GitHub and let me know your thoughts in the comments below!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>How I built a DSL for infrastructure in 10 days with AI</title>
      <dc:creator>TuviDev</dc:creator>
      <pubDate>Wed, 19 Aug 2026 20:34:36 +0000</pubDate>
      <link>https://dev.to/tuvidev/how-i-built-a-dsl-for-infrastructure-in-10-days-with-ai-120n</link>
      <guid>https://dev.to/tuvidev/how-i-built-a-dsl-for-infrastructure-in-10-days-with-ai-120n</guid>
      <description>&lt;p&gt;Lessons from building infra-lang — an IaC DSL with 5 compilation targets, an LSP, and live K8s E2E tests. What worked, what surprised me, and what I'd do differently.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;Every team I've worked with maintains the same application in at least three formats: Kubernetes manifests for production, a &lt;code&gt;docker-compose.yml&lt;/code&gt; for local dev, and a GitHub Actions workflow for CI. Every change touches all of them. They drift. And bugs in the K8s YAML only surface when &lt;code&gt;kubectl apply&lt;/code&gt; rejects them — not when you write them.&lt;/p&gt;

&lt;p&gt;I wanted one file that compiles to all of them. So I built &lt;a href="https://github.com/TuviDev/infra-lang" rel="noopener noreferrer"&gt;Infra Lang&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service api {
    image: "myapp/api:v1.0.0"
    replicas: 3
    port 8080
    health http("/health")
    resources {
        requests { cpu: 200m, memory: 256Mi }
        limits   { cpu: 1000m, memory: 512Mi }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That block compiles to a Kubernetes Deployment + Service, a Docker Compose service, a Helm chart, Terraform HCL, or a GitHub Actions workflow. One source of truth, five targets.&lt;/p&gt;

&lt;p&gt;Why a DSL, not YAML templates&lt;br&gt;
Helm, Kustomize, and string interpolation in CI all push the same problem down the road: you still write YAML, just with placeholders. Validation still happens late.&lt;/p&gt;

&lt;p&gt;A real DSL gives you three things:&lt;/p&gt;

&lt;p&gt;A parser that catches errors immediately. Infra Lang uses a hand-written LALR(1) grammar with {} blocks. A typo is caught at parse time with a location and a helpful message — not after you deploy.&lt;/p&gt;

&lt;p&gt;Compile-time linting. 10 security rules catch hardcoded secrets, mutable image tags, and privileged containers. 13 reliability rules catch thundering-herd replica counts, databases without backups, and single-replica Kafka. Error-severity findings block compilation entirely.&lt;/p&gt;

&lt;p&gt;One mental model. You think in services, databases, queues, and pipelines — not in individual YAML documents for each platform.&lt;/p&gt;

&lt;p&gt;The AI-assisted process&lt;br&gt;
I want to be transparent: this project was built with extensive AI assistance — about 40 sessions over 10 days using Claude as a coding partner.&lt;/p&gt;

&lt;p&gt;Here's how the process actually worked:&lt;/p&gt;

&lt;p&gt;I owned every architecture decision. The DSL syntax, which backends to support, what the LSP should do, how to structure tests. AI doesn't make those calls.&lt;/p&gt;

&lt;p&gt;AI wrote implementation and tests. I reviewed, ran, and iterated. Every session had a specific scope: "add semantic tokens to LSP", "fix Compose secret mounting", not "build me a DSL".&lt;/p&gt;

&lt;p&gt;I ran everything locally. Docker Desktop, kind for Kubernetes E2E, real helm lint, real docker compose up. AI can't do that.&lt;/p&gt;

&lt;p&gt;27 real bugs were found through the process. Secret base64 encoding that passed unit tests but failed kubectl apply. Service port naming that Kubernetes rejected. Windows URI path conversion that crashed the LSP. These are things you only find by actually running the code against real targets.&lt;/p&gt;

&lt;p&gt;Is there risk in AI-assisted development? Yes — I don't know 100% of the codebase intimately. But the code runs, tests pass on 3 operating systems and 3 Python versions, and the output is validated against real Kubernetes clusters.&lt;/p&gt;

&lt;p&gt;What surprised me&lt;br&gt;
Coverage lies&lt;br&gt;
93% line coverage sounded impressive. Then I ran mutation testing — automatically introducing bugs into the code and checking whether tests catch them.&lt;/p&gt;

&lt;p&gt;Results: some modules had 34% mutation score despite high line coverage. The tests executed the code but didn't verify the output. A test that says assert result is not None gives you coverage but catches nothing.&lt;/p&gt;

&lt;p&gt;After two sessions of targeted fixes, critical modules reached 82-100% mutation score. The lesson: line coverage tells you what code ran, not whether your tests actually work.&lt;/p&gt;

&lt;p&gt;Cross-platform is harder than you think&lt;br&gt;
My first CI run on Windows failed because .read_text() without encoding="utf-8" uses the system default (cp1252 on Windows). Every file read in the entire codebase needed explicit UTF-8.&lt;/p&gt;

&lt;p&gt;Docker daemon detection needed special handling too — Windows CI runners have the Docker CLI installed but no running daemon. docker version succeeds but docker compose up fails. The fix: check docker info exit code, not just whether the binary exists.&lt;/p&gt;

&lt;p&gt;The LSP was the most rewarding part&lt;br&gt;
Building a language server taught me more about developer experience than anything else in this project. Each feature had its own challenge:&lt;/p&gt;

&lt;p&gt;Cross-file rename needed word-boundary-aware regex — renaming db shouldn't touch main-db&lt;br&gt;
Semantic tokens required a line-based tokenizer that doesn't crash on malformed input&lt;br&gt;
Signature help needed brace-balance counting to detect which block the cursor is inside&lt;br&gt;
Workspace indexing needed to scan files on disk without blocking the main LSP thread&lt;br&gt;
The result: completion, hover, diagnostics, go-to-definition, find-references, rename, semantic tokens, signature help, document highlight, and folding — all working across every .infra file in the project.&lt;/p&gt;

&lt;p&gt;Live E2E tests catch what unit tests miss&lt;br&gt;
Three of the most serious bugs were invisible to unit tests:&lt;/p&gt;

&lt;p&gt;Kubernetes Secrets with invalid base64 — unit tests checked structure, kubectl apply rejected the values&lt;br&gt;
Multi-port Services without port names — valid YAML, invalid Kubernetes API&lt;br&gt;
Compose secrets declared but never mounted to services — file existed, container couldn't access it&lt;br&gt;
Now there's an opt-in test suite that actually spins up a kind cluster, runs kubectl apply, starts docker compose up, and runs helm lint --strict. These tests found real bugs that 1800+ unit tests missed.&lt;/p&gt;

&lt;p&gt;What I'd do differently&lt;br&gt;
Start with PyPI from day 1. I spent the first week telling people to pip install git+&lt;a href="https://github.com/" rel="noopener noreferrer"&gt;https://github.com/&lt;/a&gt;.... The friction was enormous. Once I published to PyPI, installation became pip install infra-lang — 5 seconds instead of a paragraph of instructions.&lt;/p&gt;

&lt;p&gt;Write blog posts before launching. SEO takes weeks to build. Dev.to articles, technical deep dives, comparison posts — all of these should exist before you post on HN, not after.&lt;/p&gt;

&lt;p&gt;Build community before features. I built 5 backends, a full LSP, Helm chart generation, and live E2E tests. Then I posted on Hacker News and got 13 upvotes. Features don't create adoption. Reach does.&lt;/p&gt;

&lt;p&gt;The numbers&lt;br&gt;
1877 tests, 93% line coverage, mutation testing on all critical modules&lt;br&gt;
5 backends: Kubernetes, Helm, Docker Compose, Terraform, GitHub Actions&lt;br&gt;
LSP with 10+ features including completion, hover, rename, semantic tokens, and signature help&lt;br&gt;
CI on Linux, macOS, Windows across Python 3.11, 3.12, 3.13&lt;br&gt;
Live E2E: real kubectl apply on kind, real docker compose up, real helm lint&lt;br&gt;
Try it&lt;br&gt;
Bash&lt;/p&gt;

&lt;p&gt;pip install infra-lang&lt;br&gt;
infra --help&lt;br&gt;
Or with the VS Code language server:&lt;/p&gt;

&lt;p&gt;Bash&lt;/p&gt;

&lt;p&gt;pip install 'infra-lang[lsp]'&lt;br&gt;
Links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/TuviDev/infra-lang" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tuvidev.github.io/infra-lang/" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=TuviDev.infra-lang" rel="noopener noreferrer"&gt;VS Code Extension&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pypi.org/project/infra-lang/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you maintain infrastructure in multiple formats, I'd love your feedback — especially on language design and which compilation targets matter most.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ai</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>One infrastructure definition, many targets</title>
      <dc:creator>TuviDev</dc:creator>
      <pubDate>Tue, 18 Aug 2026 19:39:51 +0000</pubDate>
      <link>https://dev.to/tuvidev/one-infrastructure-definition-many-targets-3lom</link>
      <guid>https://dev.to/tuvidev/one-infrastructure-definition-many-targets-3lom</guid>
      <description>&lt;p&gt;I built an open-source DSL that compiles a single .infra file to Kubernetes, Helm, Docker Compose, Terraform, or GitHub Actions.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>opensource</category>
      <category>iac</category>
    </item>
  </channel>
</rss>
