{"id":46148080,"url":"https://github.com/ops0-ai/oxid","last_synced_at":"2026-04-01T18:09:52.313Z","repository":{"id":339008699,"uuid":"1158626575","full_name":"ops0-ai/oxid","owner":"ops0-ai","description":"A standalone infrastructure-as-code engine. Open-source alternative to Terraform.","archived":false,"fork":false,"pushed_at":"2026-02-17T14:35:30.000Z","size":557,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-17T19:36:05.039Z","etag":null,"topics":["iac","iac-module","terraform"],"latest_commit_sha":null,"homepage":"https://oxid.sh","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ops0-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-15T17:18:10.000Z","updated_at":"2026-02-17T15:27:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ops0-ai/oxid","commit_stats":null,"previous_names":["ops0-ai/oxid"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ops0-ai/oxid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ops0-ai%2Foxid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ops0-ai%2Foxid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ops0-ai%2Foxid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ops0-ai%2Foxid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ops0-ai","download_url":"https://codeload.github.com/ops0-ai/oxid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ops0-ai%2Foxid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29995910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iac","iac-module","terraform"],"created_at":"2026-03-02T08:06:27.935Z","updated_at":"2026-04-01T18:09:52.300Z","avatar_url":"https://github.com/ops0-ai.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oxid\n\n\u003e **Beta** — Oxid is under active development. It works end-to-end with real AWS providers, but has not been battle-tested in production yet. Use caution for production deployments and please report any issues you find. Community testing and contributions are very welcome!\n\nA standalone infrastructure-as-code engine. Open-source alternative to Terraform.\n\nOxid parses `.tf` (HCL) and `.tf.json` files natively and communicates directly with Terraform providers via gRPC — no `terraform` or `tofu` binary required.\n\n## Why Oxid?\n\n| | Terraform/OpenTofu | Oxid |\n|---|---|---|\n| **Execution** | Wave-based (batch) | Event-driven per-resource |\n| **Parallelism** | Resources in same wave wait for slowest | Dependents start the instant their deps complete |\n| **State** | JSON file or remote backend | SQLite (local) / PostgreSQL (teams) |\n| **Config** | HCL + JSON | HCL + JSON + YAML |\n| **Provider protocol** | Wraps binary / shared lib | Direct gRPC (tfplugin5/6) |\n| **Queryable state** | `terraform show` | Full SQL: `oxid query \"SELECT * FROM resources\"` |\n| **License** | BSL / MPL | Apache-2.0 |\n\n## Features\n\n- Native HCL (.tf) and JSON (.tf.json) parsing — reads your existing Terraform configs\n- Mixed-format directories — `.tf` and `.tf.json` files in the same directory are merged automatically\n- Direct gRPC communication with all Terraform providers (AWS, GCP, Azure, etc.)\n- Event-driven DAG walker with per-resource parallelism\n- Real-time progress with elapsed time tracking\n- Resource-level plan display (Terraform-style `+`, `~`, `-`, `-/+`)\n- SQLite state backend with full SQL query support\n- .tfvars and TF_VAR_ environment variable support\n- PostgreSQL remote state backend with JSONB, TIMESTAMPTZ, GIN indexes\n- Drift detection with `oxid drift`\n- Import from existing .tfstate files (auto-detected on `oxid init`)\n- `--refresh=false` for fast plan using cached state\n\n## Quick Start\n\n### Install\n\n```bash\n# One-line install (Linux \u0026 macOS)\ncurl -fsSL https://raw.githubusercontent.com/ops0-ai/oxid/main/install.sh | bash\n```\n\nOr download a specific release manually:\n\n```bash\n# macOS (Apple Silicon)\ncurl -fsSL https://github.com/ops0-ai/oxid/releases/latest/download/oxid-darwin-arm64.tar.gz | tar xz\nsudo mv oxid /usr/local/bin/\n\n# macOS (Intel)\ncurl -fsSL https://github.com/ops0-ai/oxid/releases/latest/download/oxid-darwin-amd64.tar.gz | tar xz\nsudo mv oxid /usr/local/bin/\n\n# Linux (x86_64)\ncurl -fsSL https://github.com/ops0-ai/oxid/releases/latest/download/oxid-linux-amd64.tar.gz | tar xz\nsudo mv oxid /usr/local/bin/\n\n# Linux (ARM64)\ncurl -fsSL https://github.com/ops0-ai/oxid/releases/latest/download/oxid-linux-arm64.tar.gz | tar xz\nsudo mv oxid /usr/local/bin/\n\n# Alpine / musl (x86_64)\ncurl -fsSL https://github.com/ops0-ai/oxid/releases/latest/download/oxid-linux-musl-amd64.tar.gz | tar xz\nsudo mv oxid /usr/local/bin/\n\n# Alpine / musl (ARM64)\ncurl -fsSL https://github.com/ops0-ai/oxid/releases/latest/download/oxid-linux-musl-arm64.tar.gz | tar xz\nsudo mv oxid /usr/local/bin/\n```\n\nFrom source:\n\n```bash\ngit clone https://github.com/ops0-ai/oxid.git\ncd oxid\ncargo build --release\n# Binary at ./target/release/oxid (includes SQLite + PostgreSQL + S3 import)\n```\n\n### Usage\n\n```bash\n# Initialize providers\noxid init\n\n# Preview changes\noxid plan\n\n# Apply infrastructure\noxid apply\n\n# Destroy infrastructure\noxid destroy\n\n# List resources in state\noxid state list\n\n# Show resource details\noxid state show aws_vpc.main\n\n# Query state with SQL\noxid query \"SELECT address, resource_type, status FROM resources\"\n\n# Fast plan (skip cloud API refresh, use cached state)\noxid plan --refresh=false\n\n# Detect drift\noxid drift\n\n# Visualize dependency graph\noxid graph | dot -Tpng -o graph.png\n```\n\n### Example\n\nGiven standard Terraform files:\n\n```hcl\n# main.tf\nprovider \"aws\" {\n  region = var.aws_region\n}\n\nresource \"aws_vpc\" \"main\" {\n  cidr_block           = \"10.0.0.0/16\"\n  enable_dns_hostnames = true\n  tags = {\n    Name = \"my-vpc\"\n    iac  = \"oxid\"\n  }\n}\n\nresource \"aws_subnet\" \"public\" {\n  vpc_id     = aws_vpc.main.id\n  cidr_block = \"10.0.1.0/24\"\n}\n```\n\n```bash\n$ oxid apply\n\naws_vpc.main: Refreshing state... [1/2]\naws_subnet.public: Refreshing state... [2/2]\n\nOxid used the selected providers to generate the following execution plan.\nResource actions are indicated with the following symbols:\n  + create\n\nOxid will perform the following actions:\n\n  # aws_vpc.main will be created\n  + resource \"aws_vpc\" \"main\" {\n      + cidr_block           = \"10.0.0.0/16\"\n      + enable_dns_hostnames = true\n      + tags                 = { Name = \"my-vpc\", iac = \"oxid\" }\n    }\n\n  # aws_subnet.public will be created\n  + resource \"aws_subnet\" \"public\" {\n      + cidr_block = \"10.0.1.0/24\"\n      + vpc_id     = (known after apply)\n    }\n\nPlan: 2 to add.\n\nDo you want to perform these actions? Only 'yes' will be accepted.\n  Enter a value: yes\n\naws_vpc.main: Creating...\naws_vpc.main: Creation complete after 3s [1/2] [id=vpc-0abc123]\naws_subnet.public: Creating...\naws_subnet.public: Creation complete after 1s [2/2] [id=subnet-0def456]\n\nApply complete! Resources: 2 added, 0 changed, 0 destroyed. Total time: 4s.\n```\n\n## How It Works\n\n1. **Parse** — Reads `.tf` (HCL) and `.tf.json` (JSON) files, extracts resources, data sources, variables, outputs, and providers. Mixed-format directories are merged.\n2. **Build DAG** — Constructs a dependency graph from explicit `depends_on` and implicit expression references\n3. **Start Providers** — Downloads provider binaries from registry.terraform.io, starts them as subprocesses, connects via gRPC\n4. **Plan** — Calls `PlanResourceChange` on each provider to compute diffs\n5. **Apply** — Event-driven DAG walker executes resources as dependencies are satisfied, calling `ApplyResourceChange` via gRPC\n6. **Store State** — Persists resource attributes to SQLite (local) or PostgreSQL (remote)\n\n## Architecture\n\n```\n               .tf / .tf.json files\n                        |\n              [HCL + JSON Parser]\n                        |\n                 [WorkspaceConfig]\n                        |\n                  [DAG Builder]\n                        |\n                [Resource Graph]\n                   /    |    \\\n            [Provider] [Provider] [Provider]\n              gRPC       gRPC       gRPC\n               |          |          |\n            [AWS]      [GCP]     [Azure]\n                        |\n            [SQLite / PostgreSQL State]\n```\n\n## PostgreSQL Remote State\n\nBy default, oxid stores state in a local SQLite database. For team collaboration, you can use PostgreSQL as a remote state backend.\n\n### Setup\n\n```bash\n# Set the database URL (supports Amazon RDS, Supabase, Neon, or any PostgreSQL)\nexport OXID_DATABASE_URL=\"postgres://user:password@hostname:5432/dbname\"\n\n# Initialize — tables are created automatically\noxid init\n```\n\nWhen `OXID_DATABASE_URL` is set, oxid automatically uses PostgreSQL. When unset, it falls back to SQLite.\n\n### Schema\n\nThe PostgreSQL backend uses native Postgres types for performance and queryability:\n\n| Column | Type | Purpose |\n|---|---|---|\n| `attributes_json` | `JSONB` | Resource attributes (GIN-indexed) |\n| `sensitive_attrs` | `JSONB` | Sensitive attribute keys (GIN-indexed) |\n| `created_at`, `updated_at` | `TIMESTAMPTZ` | Timestamps with timezone |\n| `sensitive` | `BOOLEAN` | Output sensitivity flag |\n\n### Querying\n\nJSONB enables powerful queries against your infrastructure state:\n\n```sql\n-- Count resources by type\noxid query \"SELECT resource_type, COUNT(*) FROM resources GROUP BY resource_type\"\n\n-- Find all VPCs by CIDR\noxid query \"SELECT address, attributes_json-\u003e\u003e'cidr_block' AS cidr FROM resources WHERE resource_type = 'aws_vpc'\"\n\n-- Find resources with a specific tag\noxid query \"SELECT address FROM resources WHERE attributes_json-\u003e'tags'-\u003e\u003e'Environment' = 'production'\"\n\n-- Find all t3.micro instances\noxid query \"SELECT address FROM resources WHERE attributes_json @\u003e '{\\\"instance_type\\\": \\\"t3.micro\\\"}'\"\n```\n\n### Auto-Import from Terraform\n\nWhen you run `oxid init` in a directory with existing Terraform state, oxid automatically detects and imports it:\n\n```bash\n# Auto-detects local terraform.tfstate\noxid init\n\n# Also detects remote S3 backends configured in your .tf files\n# and downloads + imports the state automatically\n```\n\n### TLS / RDS\n\nConnections to Amazon RDS and other TLS-requiring hosts work out of the box (built with `rustls`).\n\n## Building\n\n```bash\n# Prerequisites: Rust 1.75+, protoc (protobuf compiler)\ncargo build --release\n```\n\n## Contributing\n\nOxid is in beta and help is appreciated! Here's how you can contribute:\n\n- **Test with your `.tf` / `.tf.json` configs** — Try `oxid plan` against your existing Terraform projects and report what works/breaks\n- **Report issues** — File bugs at [github.com/ops0-ai/oxid/issues](https://github.com/ops0-ai/oxid/issues)\n- **Provider coverage** — Test with different providers (GCP, Azure, Cloudflare, etc.) beyond AWS\n- **Code contributions** — PRs welcome. See the architecture section above for how things fit together\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE) for details.\n\n---\n\nBuilt by [ops0.com](https://ops0.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fops0-ai%2Foxid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fops0-ai%2Foxid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fops0-ai%2Foxid/lists"}