{"id":15771811,"url":"https://github.com/trashhalo/astro-command","last_synced_at":"2025-05-08T07:35:47.063Z","repository":{"id":46992416,"uuid":"407891442","full_name":"trashhalo/astro-command","owner":"trashhalo","description":"run commands as astro components","archived":false,"fork":false,"pushed_at":"2021-09-19T20:14:12.000Z","size":15658,"stargazers_count":32,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T09:04:47.042Z","etag":null,"topics":["astro","pin"],"latest_commit_sha":null,"homepage":"","language":"Astro","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/trashhalo.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}},"created_at":"2021-09-18T15:03:50.000Z","updated_at":"2025-03-26T03:41:57.000Z","dependencies_parsed_at":"2022-09-26T21:40:37.020Z","dependency_job_id":null,"html_url":"https://github.com/trashhalo/astro-command","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trashhalo%2Fastro-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trashhalo%2Fastro-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trashhalo%2Fastro-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trashhalo%2Fastro-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trashhalo","download_url":"https://codeload.github.com/trashhalo/astro-command/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253023713,"owners_count":21842302,"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":["astro","pin"],"created_at":"2024-10-04T15:05:16.615Z","updated_at":"2025-05-08T07:35:47.046Z","avatar_url":"https://github.com/trashhalo.png","language":"Astro","readme":"# Astro Command\n\nAstro component for static rendering of commands. This allows you build components in any language.\n\n[Demo](https://github.com/trashhalo/astro-command/blob/main/src/components/Demo.astro)\n\n## Usage\n\n```astro\n---\nimport { Command } from \"astro-command\";\n---\n\u003cCommand caller={import.meta.url} command=\"Component.py\" message=\"from python!\" /\u003e\n```\nComponent.py\n```python\n#!/usr/bin/env python \n\nimport sys, json\n\ndata = json.load(sys.stdin)\nprint(f'\u003ch1\u003e Hello {data[\"message\"]} \u003c/h1\u003e')\n```\n\n* caller: url of the caller so we can use it to look up relative paths\n* command: name of the command to execute. relative path from the caller\n* props: all props are passed to command as json via stdin\n* html: generated html sent out via stdout embedded\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrashhalo%2Fastro-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrashhalo%2Fastro-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrashhalo%2Fastro-command/lists"}