npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@prolaxu/galaxy-api-tool

v1.0.2

Published

CLI tool for generating Galaxy API files (Controllers, Resources, Vue components)

Readme

@prolaxu/galaxy-api-tool

A powerful CLI tool for generating Galaxy API files and Vue.js CRUD components. This tool replaces bash scripts with a robust, cross-platform Node.js solution.

🚀 Quick Start

Use with npx (no installation required):

# Generate API files with Request validation
npx @prolaxu/galaxy-api-tool gen:api User

# Generate API files without Request (uses EmptyRequest)
npx @prolaxu/galaxy-api-tool gen:api-empty Category

# Generate Vue.js CRUD views
npx @prolaxu/galaxy-api-tool gen:views admin/User

# Generate everything (API + Views)
npx @prolaxu/galaxy-api-tool gen:all inventory/Product

📦 Installation

Global Installation

npm install -g @prolaxu/galaxy-api-tool

Local Installation

npm install @prolaxu/galaxy-api-tool
npx galaxy-api-tool --help

🛠️ Commands

gen:api <ModelName>

Generates complete Galaxy API files with Request validation.

npx @prolaxu/galaxy-api-tool gen:api User

Generated files:

  • src/GalaxyAPI/Controllers/UserController.php
  • src/GalaxyAPI/Requests/UserRequest.php
  • src/GalaxyAPI/Resources/UserResource.php

gen:api-empty <ModelName>

Generates Galaxy API files without Request validation (uses EmptyRequest).

npx @prolaxu/galaxy-api-tool gen:api-empty Category

Generated files:

  • src/GalaxyAPI/Controllers/CategoryController.php
  • src/GalaxyAPI/Resources/CategoryResource.php

gen:views <ModelInput>

Generates Vue.js CRUD components and Pinia store. Supports grouping.

# Simple model
npx @prolaxu/galaxy-api-tool gen:views User

# Grouped model
npx @prolaxu/galaxy-api-tool gen:views admin/User

# Nested grouping
npx @prolaxu/galaxy-api-tool gen:views inventory/Product

Generated files:

  • resources/assets/spa/stores/modules/[path]/use[Model]Store.js
  • resources/assets/spa/modules/[path]/[Model]Form.vue
  • resources/assets/spa/modules/[path]/[Model]ListComponent.vue
  • resources/assets/spa/modules/[path]/[Model]Select.vue

gen:all <ModelInput>

Generates both API files and Vue.js CRUD components.

# Generate everything with Request validation
npx @prolaxu/galaxy-api-tool gen:all admin/User

# Generate everything without Request validation
npx @prolaxu/galaxy-api-tool gen:all admin/User --empty

🎯 Options

Custom Output Path

All commands support a custom output path:

npx @prolaxu/galaxy-api-tool gen:api User --path /custom/project/path

Empty Request

Use --empty flag with gen:all to generate API without Request validation:

npx @prolaxu/galaxy-api-tool gen:all User --empty

📁 Output Structure

API Files

src/
└── GalaxyAPI/
    ├── Controllers/
    │   └── UserController.php
    ├── Requests/
    │   └── UserRequest.php
    └── Resources/
        └── UserResource.php

Vue.js CRUD Files

resources/
└── assets/
    └── spa/
        ├── modules/
        │   └── admin/
        │       └── user/
        │           ├── UserForm.vue
        │           ├── UserListComponent.vue
        │           └── UserSelect.vue
        └── stores/
            └── modules/
                └── admin/
                    └── user/
                        └── useUserStore.js

🔧 Model Input Formats

The tool supports various model input formats:

| Input | Output Path | API Endpoint | |-------|-------------|--------------| | User | user/ | v2/tenant/user | | admin/User | admin/user/ | v2/tenant/admin/user | | inventory/Product | inventory/product/ | v2/tenant/inventory/product |

📝 Examples

Generate User Management

# Generate complete user management system
npx @prolaxu/galaxy-api-tool gen:all User

# Output:
# ✅ Generated all files:
#   API Files:
#     - Controller: src/GalaxyAPI/Controllers/UserController.php
#     - Request:    src/GalaxyAPI/Requests/UserRequest.php
#     - Resource:   src/GalaxyAPI/Resources/UserResource.php
#   CRUD Files:
#     📁 Store: resources/assets/spa/stores/modules/user/useUserStore.js
#     📝 Form: resources/assets/spa/modules/user/UserForm.vue
#     📋 List: resources/assets/spa/modules/user/UserListComponent.vue
#     🔽 Select: resources/assets/spa/modules/user/UserSelect.vue

Generate Admin Panel Components

# Generate admin-specific components
npx @prolaxu/galaxy-api-tool gen:views admin/Dashboard

# Output:
# ✅ Generated CRUD files for Dashboard:
#   📁 Group: admin
#   📁 Store: resources/assets/spa/stores/modules/admin/dashboard/useDashboardStore.js
#   📝 Form: resources/assets/spa/modules/admin/dashboard/DashboardForm.vue
#   📋 List: resources/assets/spa/modules/admin/dashboard/DashboardListComponent.vue
#   🔽 Select: resources/assets/spa/modules/admin/dashboard/DashboardSelect.vue
#   
#   📝 Next steps:
#     1. Update the columns array in DashboardListComponent.vue
#     2. Add form fields to DashboardForm.vue
#     3. Import and use components in your routes/pages
#     4. API endpoint: v2/tenant/admin/dashboard

Generate Inventory System

# Generate inventory management with empty request
npx @prolaxu/galaxy-api-tool gen:all inventory/Product --empty

# Output includes both API and CRUD files for inventory/product

🚦 Error Handling

The tool includes comprehensive error handling:

  • Model name validation: Ensures valid model names
  • Path validation: Checks for valid file paths
  • Directory creation: Automatically creates necessary directories
  • Template validation: Validates template syntax
# Invalid model name
npx @prolaxu/galaxy-api-tool gen:api ""
# ❌ Error: Model name