fluid.sh

3 min read Original article ↗

Claude Code for infrastructure. Debug, act, and audit everything Fluid does on your infrastructure.

What does that mean?

Fluid is a terminal agent that do work on production infrastructure like VMs/K8s cluster/etc. by making sandbox clones of the infrastructure for AI agents to work on, allowing the agents to run commands, test connections, edit files, and then generate Infra-as-code like an Ansible Playbook to be applied on production.

Why not just use an LLM to generate Infrastructure-as-Code (IaC)?

LLMs are great at generating Terraform, OpenTofu, Ansible, etc. but bad at guessing how production systems work. By giving access to a clone of the infrastructure, agents can explore, run commands, test things before writing the IaC, giving them better context and a place to test ideas and changes before deploying. I got the idea after seeing how much Claude Code has helped me work on code, I thought "I wish there was something like that for infrastructure", and here we are.

Why not just provide tools, skills, MCP server to Claude Code?

Safety. I didn't want CC to SSH into a prod machine from where it is running locally (real problem!). I wanted to lock down the tools it can run to be only on sandboxes while also giving it autonomy to create sandboxes and not have access to anything else. Fluid gives access to a live output of commands run (it's pretty cool) and does this by ephemeral SSH Certificates. Fluid gives tools for creating IaC and requires human approval for creating sandboxes on hosts with low memory/CPU and for accessing the internet or installing packages.

Installation

Note: this is a terminal agent (like Claude Code) meant to be installed on your local laptop/workstation

$ curl -fsSL https://fluid.sh/install.sh | bash

$ fluid

Built for where you already work

[~]

Sandbox Isolation

Clone VMs instantly. Test changes in isolation before touching production.

ls

Context-Aware

Fluid explores your host first - OS, packages, CLI tools - then adapts.

>>>

Full Audit Trail

Every command logged. Every change tracked. Review before production.

.yaml

Ansible Playbooks

Auto-generates playbooks from sandbox work. Reproducible infrastructure.

Usage

Running: cat /etc/os-release

Running: apt install -y apache2

Running: echo '...' > /var/www/html/index.html

Running: systemctl status apache2

Done! Here's what I accomplished:

Sandbox Created

- ID: SBX-demo1234

- IP: 192.168.122.50

Apache HTTP Server

- Installed and running

- Custom page at /var/www/html/index.html

- Verified working with curl

Ansible Playbook: httpd-setup

The playbook includes 4 tasks:

1. Update apt cache

2. Install Apache

3. Create custom index.html

4. Start and enable Apache service

You can run this playbook on any Ubuntu server to reproduce this setup.