{"id":15355096,"url":"https://github.com/suomato/luna","last_synced_at":"2026-02-28T08:07:08.694Z","repository":{"id":24705368,"uuid":"102251656","full_name":"suomato/luna","owner":"suomato","description":"Command-line interface for Base Camp theme.","archived":false,"fork":false,"pushed_at":"2023-04-12T08:11:48.000Z","size":28,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-10T00:11:19.046Z","etag":null,"topics":["basecamp","cli","wordpress"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/suomato/luna","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/suomato.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}},"created_at":"2017-09-03T08:42:29.000Z","updated_at":"2023-08-20T20:44:35.000Z","dependencies_parsed_at":"2025-02-27T02:40:19.952Z","dependency_job_id":"82176047-3327-4bb6-86f3-ac9cfe1c1bd6","html_url":"https://github.com/suomato/luna","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/suomato/luna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suomato%2Fluna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suomato%2Fluna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suomato%2Fluna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suomato%2Fluna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suomato","download_url":"https://codeload.github.com/suomato/luna/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suomato%2Fluna/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29928018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"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":["basecamp","cli","wordpress"],"created_at":"2024-10-01T12:22:28.384Z","updated_at":"2026-02-28T08:07:08.668Z","avatar_url":"https://github.com/suomato.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LUNA CLI\n\u003e Command-line interface for Base Camp theme.\n\n## Commands\n\n* [Make Custom Post Type](#make-custom-post-type)\n* [Make Custom Taxonomy](#make-custom-taxonomy)\n* [Make Route](#make-route)\n* [Make Shortcode](#make-shortcode)\n* [Make Menu Page](#make-menu-page)\n\n#### Make Custom Post Type\n\n\u003e This Command helps you to create a new Custom Post Type very fast.\n\n```\nphp luna make:custom-post-type {name}\n```\n\n\u003e The argument is singular form. if noun have irregular plural which do not behave in standard way(singular+s),\nexception can be defined by plural option e.g.\n\n```\nphp luna make:custom-post-type person --plural=people\n```\n\n\u003e The new file is created to `/app/config/wp/custom-post-types/{name}.php`\n\n#### Make Custom Taxonomy\n\n\u003e This Command helps you to create a new Custom Taxonomy very fast.\n\n```\nphp luna make:custom-taxonomy {name}\n```\n\n\u003e The argument is singular form. if noun have irregular plural which do not behave in standard way(singular+s),\nexception can be defined by plural option e.g.\n\n```\nphp luna make:custom-taxonomy country --plural=countries\n```\n\n\u003e The new file is created to `/app/config/wp/custom-taxonomies/{name}.php`\n\n#### Make Route\n\n\u003e This Command helps you to create a new route for WordPress API clearer and faster way.\n\n```\nphp luna make:route {name}\n```\n\n\u003e The new file is created to `/app/config/wp/routes/{name}.php`. The created file comes with the well documented boilerplate.\n\n#### Make Shortcode\n\n\u003e This Command helps you to create a new shortcode with very clean boilerplate.\n\n```\nphp luna make:shortcode {name}\n```\n\n\u003e The new file is created to `/app/config/wp/shortcodes/{name}.php`.\n\n##### Example\n\nRun command:\n\n```\nphp luna make:shortcode LuckyNumber\n```\n\nThen define some data\n```\n    /**\n     * @var string Shortcode name\n     */\n    protected $shortcode = 'lucky_number';\n\n    /**\n     * @var array|string An associative array of attributes\n     */\n    protected $attributes = [\n        'number' =\u003e 7,\n    ];\n\n    /**\n     * Return template of shortcode\n     *\n     * @param $attr An associative array of attributes\n     * @param $content Enclosed content\n     *\n     * @return mixed\n     */\n    protected function template($attr, $content)\n    {\n        return 'This is my lucky number: ' . $attr['number'];\n    }\n```\n\n\u003e Now shortcode `[lucky_number]` generates `This is my lucky number: 7` and `[lucky_number number=\"13\"]` generates `This is my lucky number: 13`\n\n\u003e It is also possible to use power of Timber. In template function you can return Timber view instead of string like this:\n\n```\n// resources/views/shortcodes/lucky-number.twig\n\n\u003cp\u003eThis is my lucky number: {{ number }}\u003c/p\u003e\n\n******************************************************************\n\n// app/config/wp/shortcodes/LuckyNumber.php\n\nprotected function template($attr, $content)\n{\n    return \\Timber::compile('shortcodes/lucky-number.twig', $attr);\n}\n```\n\n#### Make Menu Page\n\n\u003e This Command helps you to create a new Menu Page or Submenu Page to wp-admin navigation.\n\n```\nphp luna make:menu-page {name}\n```\n\n\u003e This command will create a new MenuPage class in `/app/config/wp/menu-pages/{name}.php`. The generated file will include the Menu Page properties. Submenu Page could be created by:\n\n```\nphp luna make:menu-page {name} --submenu\n```\n\n\u003e A new SubMenuPage class will be generated in `/app/config/wp/submenu-pages/{name}.php`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuomato%2Fluna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuomato%2Fluna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuomato%2Fluna/lists"}