{"id":13877755,"url":"https://github.com/renoki-co/laravel-steampipe","last_synced_at":"2025-04-10T20:47:01.098Z","repository":{"id":37973182,"uuid":"407113139","full_name":"renoki-co/laravel-steampipe","owner":"renoki-co","description":"Use Laravel's built-in ORM classes to query cloud resources with Steampipe.","archived":false,"fork":false,"pushed_at":"2023-10-23T10:37:40.000Z","size":57,"stargazers_count":14,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T18:21:17.116Z","etag":null,"topics":["alibaba","alibabaorm","api","aws","azure","cloud","gcp","laravel","php","query","sql","steampipe"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/renoki-co.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"rennokki"}},"created_at":"2021-09-16T10:01:45.000Z","updated_at":"2023-08-27T17:39:47.000Z","dependencies_parsed_at":"2023-02-10T02:31:20.178Z","dependency_job_id":null,"html_url":"https://github.com/renoki-co/laravel-steampipe","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"renoki-co/laravel-package-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renoki-co%2Flaravel-steampipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renoki-co%2Flaravel-steampipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renoki-co%2Flaravel-steampipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renoki-co%2Flaravel-steampipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renoki-co","download_url":"https://codeload.github.com/renoki-co/laravel-steampipe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248295339,"owners_count":21080078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["alibaba","alibabaorm","api","aws","azure","cloud","gcp","laravel","php","query","sql","steampipe"],"created_at":"2024-08-06T08:01:22.023Z","updated_at":"2025-04-10T20:47:01.077Z","avatar_url":"https://github.com/renoki-co.png","language":"PHP","funding_links":["https://github.com/sponsors/rennokki"],"categories":["PHP"],"sub_categories":[],"readme":"Laravel Steampipe\n=================\n\n![CI](https://github.com/renoki-co/laravel-steampipe/workflows/CI/badge.svg?branch=master)\n[![codecov](https://codecov.io/gh/renoki-co/laravel-steampipe/branch/master/graph/badge.svg)](https://codecov.io/gh/renoki-co/laravel-steampipe/branch/master)\n[![StyleCI](https://github.styleci.io/repos/407113139/shield?branch=master)](https://github.styleci.io/repos/407113139)\n[![Latest Stable Version](https://poser.pugx.org/renoki-co/laravel-steampipe/v/stable)](https://packagist.org/packages/renoki-co/laravel-steampipe)\n[![Total Downloads](https://poser.pugx.org/renoki-co/laravel-steampipe/downloads)](https://packagist.org/packages/renoki-co/laravel-steampipe)\n[![Monthly Downloads](https://poser.pugx.org/renoki-co/laravel-steampipe/d/monthly)](https://packagist.org/packages/renoki-co/laravel-steampipe)\n[![License](https://poser.pugx.org/renoki-co/laravel-steampipe/license)](https://packagist.org/packages/renoki-co/laravel-steampipe)\n\nUse Laravel's built-in ORM classes to query cloud resources with [Steampipe](https://hub.steampipe.io), an open source CLI to instantly query cloud APIs using SQL.\n\n## 🤝 Supporting\n\n**If you are using one or more Renoki Co. open-source packages in your production apps, in presentation demos, hobby projects, school projects or so, sponsor our work with [Github Sponsors](https://github.com/sponsors/rennokki). 📦**\n\n[\u003cimg src=\"https://github-content.s3.fr-par.scw.cloud/static/33.jpg\" height=\"210\" width=\"418\" /\u003e](https://github-content.renoki.org/github-repo/33)\n\n## 🚀 Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require renoki-co/laravel-steampipe\n```\n\nIn your `config/database.php`, add a new driver:\n\n```php\n'connections' =\u003e [\n\n    'steampipe' =\u003e [\n        'driver' =\u003e 'steampipe',\n        'binary' =\u003e env('STEAMPIPE_BINARY', 'steampipe'),\n    ],\n\n],\n```\n\nYou can define the Steampipe binary path with `STEAMPIPE_BINARY`.\n\n## 🙌 Usage\n\nSteampipe is multi-vendor, multi-plugin. This means that you can interact with any cloud APIs just like yo would do with Postgres.\n\nFor it to work locally and avoid code pollution, you would want to create a model for the \"tables\" you would want to access the cloud APIs through.\n\nFor example, let's make a `AwsRegion` model for the [`aws_region` table](https://hub.steampipe.io/plugins/turbot/aws/tables/aws_region). Make sure you have [installed the AWS plugin for Steampipe](https://steampipe.io/docs).\n\n```bash\nphp artisan steampipe:make:model aws_region\n```\n\n**Please observe that the models are created from the table in singular, `aws_region`. Usually, in Laravel you would have created the model class name directly. To break even and make the generation command easier, you should pass the table name instead of a class name.**\n\nThe command will create for you an `app/Steampipe/Aws/AwsRegion.php` file where you can access the model:\n\n```php\nuse App\\Steampipe\\Aws\\AwsRegion;\n\nforeach (AwsRegion::all() as $region) {\n    //\n}\n```\n\nAll SQL-like methods from Laravel ORM are available to be used as explained [in the Steampipe documentation](https://steampipe.io/docs/using-steampipe/writing-queries).\n\nModels also work with the built-in model features, like hidden fields or appends.\n\n## Generation\n\nYou may generate as many models as you need. The convention is that when creating a table, it will always follow this pattern:\n\n```\nApp\\Steampipe\\{Provider}\\{TableNameStudlyCase};\n```\n\nThis way, the models will know how to access the tables. For example, for a [DigitalOcean droplet](https://hub.steampipe.io/plugins/turbot/digitalocean/tables/digitalocean_droplet) it would look like this:\n\n```bash\nphp artisan steampipe:make:model digitalocean_droplet\n```\n\n```php\nuse App\\Steampipe\\Digitalocean\\DigitaloceanDroplet;\n\nDigitaloceanDroplet::find(227211874);\n```\n\n## 🐛 Testing\n\nYou will need to set up an AWS account and add `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` to your environment variables.\n\nThe user with the access tokens should have the following IAM policy:\n\n```json\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": \"ec2:DescribeRegions\",\n            \"Resource\": \"*\"\n        }\n    ]\n}\n```\n\nTo run tests:\n\n``` bash\nvendor/bin/phpunit\n```\n\n## 🤝 Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## 🔒  Security\n\nIf you discover any security related issues, please email alex@renoki.org instead of using the issue tracker.\n\n## 🎉 Credits\n\n- [Alex Renoki](https://github.com/rennokki)\n- [All Contributors](../../contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenoki-co%2Flaravel-steampipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenoki-co%2Flaravel-steampipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenoki-co%2Flaravel-steampipe/lists"}