{"id":30699781,"url":"https://github.com/firevel/artisan","last_synced_at":"2026-01-20T17:58:18.999Z","repository":{"id":62505055,"uuid":"421045301","full_name":"firevel/artisan","owner":"firevel","description":"Serverless Laravel Artisan for AppEngine and Cloud Run","archived":false,"fork":false,"pushed_at":"2025-08-27T21:45:37.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-28T05:55:33.582Z","etag":null,"topics":["appengine","cloudrun","gcp","google-cloud"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firevel.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}},"created_at":"2021-10-25T13:54:18.000Z","updated_at":"2025-08-27T21:40:00.000Z","dependencies_parsed_at":"2025-08-27T23:19:16.203Z","dependency_job_id":"f96624ab-5456-4bdb-bdbe-9466706be9db","html_url":"https://github.com/firevel/artisan","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/firevel/artisan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firevel%2Fartisan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firevel%2Fartisan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firevel%2Fartisan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firevel%2Fartisan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firevel","download_url":"https://codeload.github.com/firevel/artisan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firevel%2Fartisan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273273572,"owners_count":25076194,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"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":["appengine","cloudrun","gcp","google-cloud"],"created_at":"2025-09-02T11:15:01.195Z","updated_at":"2025-10-11T19:42:29.919Z","avatar_url":"https://github.com/firevel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Artisan\n\nArtisan support for Laravel / Firevel running on App Engine or Google Cloud Run. It can be used for remote command execution or Cloud Scheduler.\n\n## Installation\n\nInstall package:\n\n```bash\ncomposer require firevel/artisan\n```\n\nPublish config:\n\n```bash\nphp artisan vendor:publish --provider=\"Firevel\\Artisan\\ArtisanServiceProvider\" --tag=\"config\"\n```\n\n## Usage\n\nWith [Google Cloud SDK](https://cloud.google.com/sdk/docs/install) you can execute artisan commands directly from your command line. Make sure your user got `cloudscheduler.jobs.run` or `appengine.runtimes.actAsAdmin` permission.\n\nAfter replacing `{command}` with artisan command (ex.: `route:list`) and {project} with your project name you can run:\n\n```bash\ncurl -X POST -d \"{command}\" -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -H \"Accept: application/json\" https://{project}.appspot.com/_artisan/call\n```\n\nIf you are running multiple services, replace {service} with your service name and run:\n```bash\ncurl -X POST -d \"{command}\" -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -H \"Accept: application/json\" https://{service}-dot-{project}.appspot.com/_artisan/call\n```\n\n## Using queues\n\nIf you would like to use queues to run your commands, you would need to set `ARTISAN_CONNECTION` and `ARTISAN_QUEUE` env variables first.\n\nDefault connection is set to `cloudtasks` and default queue is set to `artisan`. If you would like to use default configuration make sure:\n- [Cloud Tasks queue driver](https://packagist.org/packages/firevel/cloud-tasks-queue-driver) is installed.\n- `artisan` queue is created in [Cloud Tasks console](https://console.cloud.google.com/cloudtasks). You can create queue by running `gcloud tasks queues create artisan --max-attempts=1`.\n\nTo dispatch command run:\n```bash\ncurl -X POST -d \"{command}\" -H \"Authorization: Bearer $(gcloud auth print-access-token)\" https://{project}.appspot.com/_artisan/queue\n```\nor\n```bash\ncurl -X POST -d \"{command}\" -H \"Authorization: Bearer $(gcloud auth print-access-token)\" https://{service}-dot-{project}.appspot.com/_artisan/queue\n```\n\n## Google Cloud Scheduler\n\nYou can use this package to run commands using Cloud Scheduler.\n\n### Cloud Run\nAdd a job via the [Cloud Scheduler](https://console.cloud.google.com/cloudscheduler) page in the Google Cloud console. To begin, select the Target Type as `HTTP`, followed by specifying the URL field as `https://{APP_URL}/_artisan/call`, method `POST`, and the appropriate artisan command in the Body field (e.g., `route:cache`). For the Auth header, select \"Add OICD token\", and for the service account, select the default App Engine account. If you prefer to use a different service account, you will need to add the service account email to the configuration file under `artisan.authorized_service_accounts`. \n\nDefault `artisan.authorized_service_accounts` is:\n```\n    'authorized_service_accounts' =\u003e [\n        env('GOOGLE_CLOUD_PROJECT') . '@appspot.gserviceaccount.com',\n    ],\n```\n\nMake sure your `GOOGLE_CLOUD_PROJECT` is set if you are using default configutation.\n\n### App Engine\nIf you are using App Engine you can use standard [cron.yaml](https://cloud.google.com/appengine/docs/standard/scheduling-jobs-with-cron-yaml) file.\n\n## Security\n\n[Request validation](https://github.com/firevel/artisan/blob/master/src/Http/Requests/ArtisanRequest.php) is based on:\n- `GAE_SERVICE` env variable with `x-appengine-cron`, `x-google-internal-skipadmincheck`, `x-cloudscheduler` and `x-appengine-cron` header\n- or [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token validation if bearer token is JWT.\n- otherwise it will validate bearer token using [testIamPermissions](https://cloud.google.com/resource-manager/reference/rest/v3/folders/testIamPermissions)\n\nA possible weakness is sending a bearer token instead of a signature. In the event of a user entering a typo in the URL, the sensitive token may be sent to the incorrect service.\n\n### Warning\nIf you are using this package outside App Engine make sure `GAE_SERVICE` env is NOT set.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirevel%2Fartisan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirevel%2Fartisan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirevel%2Fartisan/lists"}