{"id":46573953,"url":"https://github.com/coyotito-mx/package-skeleton-cli","last_synced_at":"2026-03-15T08:55:41.163Z","repository":{"id":277631928,"uuid":"933022119","full_name":"coyotito-mx/package-skeleton-cli","owner":"coyotito-mx","description":"Companion CLI for COYOTITO's packages skeletons","archived":false,"fork":false,"pushed_at":"2025-10-27T23:19:04.000Z","size":187,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T01:10:22.258Z","etag":null,"topics":["cli","package-skeleton","package-skeleton-cli"],"latest_commit_sha":null,"homepage":"https://coyotito.com.mx","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coyotito-mx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-15T00:55:12.000Z","updated_at":"2025-10-27T05:03:55.000Z","dependencies_parsed_at":"2025-05-23T01:26:16.937Z","dependency_job_id":"ffe5da51-c832-460c-88f1-b007aa08634e","html_url":"https://github.com/coyotito-mx/package-skeleton-cli","commit_stats":null,"previous_names":["asciito/package-skeleton-cli","coyotito-mx/package-skeleton-cli"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/coyotito-mx/package-skeleton-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coyotito-mx%2Fpackage-skeleton-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coyotito-mx%2Fpackage-skeleton-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coyotito-mx%2Fpackage-skeleton-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coyotito-mx%2Fpackage-skeleton-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coyotito-mx","download_url":"https://codeload.github.com/coyotito-mx/package-skeleton-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coyotito-mx%2Fpackage-skeleton-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30210721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T09:02:10.694Z","status":"ssl_error","status_checked_at":"2026-03-07T09:02:08.429Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","package-skeleton","package-skeleton-cli"],"created_at":"2026-03-07T09:20:59.798Z","updated_at":"2026-03-15T08:55:41.139Z","avatar_url":"https://github.com/coyotito-mx.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Package Skeleton CLI\n\n![Example Workflow](https://github.com/coyotito-mx/package-skeleton-cli/actions/workflows/tests.yml/badge.svg)\n![Release Version](https://img.shields.io/github/v/release/coyotito-mx/package-skeleton-cli?label=Release%20Version\u0026color=2cbe4e\u0026labelColor=444d56)\n![macOS ARM only](https://shields.io/badge/MacOS--9cf?logo=Apple\u0026style=social)\n\nThe **Package Skeleton CLI** is a command-line interface that allows you to initialize a PHP package skeleton by replacing placeholders in files with the values you provide.\n\n## Installation\n\n\u003e ⚠️\n\u003e The CLI currently works **only** on **macOS** with ARM architecture.\n\n### Downloading the CLI\n\nUsing **cURL**:\n\n```bash\ncurl -L \"https://github.com/coyotito-mx/package-skeleton-cli/releases/latest/download/skeleton.tar.gz\" -o skeleton.tar.gz\n\ntar -xzf skeleton.tar.gz \u0026\u0026 chmod +x skeleton\n```\n\nUsing **wget**:\n\n```bash\nwget \"https://github.com/coyotito-mx/package-skeleton-cli/releases/latest/download/skeleton.tar.gz\" -O skeleton.tar.gz\n\ntar -xzf skeleton.tar.gz \u0026\u0026 chmod +x skeleton\n```\n\nThen you can move the binary to your `PATH`:\n\n```bash\nmv skeleton /usr/local/bin/\n```\n\n## Usage\n\n\u003e ✅\n\u003e The CLI initializes packages in the **current working directory** or a specified `--path`. You can initialize from existing files or bootstrap from a template using `--bootstrap`.\n\nThe [placeholders](#placeholders-and-modifiers) must follow the format: `{{placeholder}}`. You can apply modifiers to format values before replacement:\n\n```bash\n{{placeholder|modifier[,modifier]}}\n```\n\n### Running the CLI\n\nInitialize a package with vendor, package name, and author details:\n\n```bash\nskeleton init \\\n  acme \\\n  blog \\\n  \"Acme\\\\Blog\" \\\n  \"John Doe\" \\\n  \"john@doe.com\" \\\n  \"A blogging package for Laravel\" \\\n  --path=\"$HOME/projects/my-package\"\n```\n\nOr use prompts:\n\n```bash\nskeleton init\n# Prompts: vendor, package, namespace (optional), author, email (fetched from git config, if available), description\n```\n\n\u003e Note: The testing framework prompt appears only when dependencies are installed (i.e., without `--no-install`).\n\nTo skip confirmation:\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"Description\" \\\n  --proceed\n```\n\nTo skip Composer dependency installation:\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"Description\" \\\n  --no-install\n```\n\nTo skip creating a LICENSE file when it does not exist:\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"Description\" \\\n  --skip-license\n```\n\nTo exclude specific files/directories from processing:\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"Description\" \\\n  --exclude=\"composer.json\" \\\n  --exclude=\"package.json\"\n```\n\nTo bootstrap from a skeleton template (`vanilla` or `laravel`):\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"Description\" \\\n  --bootstrap=vanilla\n```\n\nTo force bootstrapping into a non-empty directory:\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"Description\" \\\n  --bootstrap=laravel \\\n  --force\n```\n\n### Placeholders and Modifiers\n\n#### Available Placeholders\n\n- `vendor` - Package vendor (e.g., `acme`)\n- `package` - Package name (e.g., `blog`)\n- `namespace` - Package namespace (auto-generated from vendor\\package, or custom)\n- `description` - Package description\n- `author` - Package author name\n- `email` - Author's email address\n- `license` - License name (defaults to `MIT`)\n- `version` - Package version (defaults to `0.0.1`)\n- `year` - Current year\n- `class` - Class name (defaults to package name in PascalCase). Used primarily in filenames\n\n\u003e **Namespace Format Requirements**\n\u003e\n\u003e The `namespace` argument must follow this pattern: `Vendor\\Package`\n\u003e\n\u003e - Must have exactly two parts separated by a backslash\n\u003e - Each part must start with an **uppercase letter**\n\u003e - Each part can contain alphanumeric characters (A-Z, a-z, 0-9)\n\u003e - Invalid example: `acme\\blog`, `Acme_Blog`, `Acme/Blog` ❌\n\u003e - Valid example: `Acme\\Blog`, `MyVendor\\MyPackage` ✅\n\u003e\n\u003e If not provided, the namespace will be auto-generated as `Vendor\\Package` based on the vendor and package arguments.\n\n#### Global Modifiers\n\n- `upper` - Converts to UPPERCASE\n- `lower` - Converts to lowercase\n- `title` - Converts to Title Case\n- `snake` - Converts to snake_case\n- `kebab` - Converts to kebab-case\n- `camel` - Converts to camelCase\n- `pascal` - Converts to PascalCase (StudlyCase)\n- `slug` - Converts to slug-format\n- `ucfirst` - Converts first character to uppercase\n- `acronym` - Generates acronym (e.g., \"John Doe\" → \"JD\")\n\n\u003e ⚠️\n\u003e **Modifier Order Matters!** The order of chained modifiers affects the output.\n\u003e\n\u003e ```text\n\u003e John Doe → JOHN-DOE\n\u003e\n\u003e {{author|upper,slug}} → john-doe     (incorrect)\n\u003e {{author|slug,upper}} → JOHN-DOE     (correct)\n\u003e ```\n\n#### Replacer-Specific Modifiers\n\n##### `namespace` Replacer\n\n- `escape` - Escapes `\\` to `\\\\` (e.g., `Acme\\Blog` → `Acme\\\\Blog`)\n- `reverse` - Reverses `\\` to `/` (e.g., `Acme\\Blog` → `Acme/Blog`)\n\n\u003e **Note**: Modifiers are applied to each part of the namespace separately (vendor and package).\n\n##### `version` Replacer\n\n- `major` - Extracts major version (e.g., `2` from `2.5.3`)\n- `minor` - Extracts minor version (e.g., `5` from `2.5.3`)\n- `patch` - Extracts patch version (e.g., `3` from `2.5.3`)\n- `pre` - Extracts pre-release (e.g., `alpha` from `1.0.0-alpha`)\n- `meta` - Extracts build metadata (e.g., `abc123` from `1.0.0+abc123`)\n- `prefix` - Adds `v` prefix if not present (e.g., `1.0.0` → `v1.0.0`)\n\n##### `email` Replacer\n\n- `upper` - Converts email to uppercase while preserving `@` and `.`\n\n##### `class` Replacer\n\n- Used only in **filename** contexts\n- Converts to kebab-case in filenames (e.g., `{{class}}` → `my-class.php`)\n- Default value is transformed from package name (e.g., `blog` → `Blog` → `blog` in filename)\n- Supports all global modifiers when used in content\n\n### CLI Arguments and Options\n\n```bash\nSYNOPSIS\n  skeleton init [options] [--] \u003cvendor\u003e \u003cpackage\u003e \u003cnamespace\u003e \u003cauthor\u003e \u003cemail\u003e \u003cdescription\u003e\n\nArguments\n  vendor                       The name of the package vendor (prompted if not provided)\n  package                      The name of the package (prompted if not provided)\n  namespace                    The package namespace (auto-generated as Vendor\\Package if not provided)\n  author                       The package author (fetched from `git config user.name` or prompted)\n  email                        The package author email (fetched from `git config user.email` or prompted)\n  description                  The package description (prompted if not provided)\n\nOptions\n      --bootstrap[=BOOTSTRAP]  Initialize a new package from skeleton template (options: laravel, vanilla)\n      --class[=CLASS]          The class name to use in replacements (defaults to package name)\n      --force                  Force bootstrapping even if target directory is not empty (use with --bootstrap)\n      --proceed                Accept the configuration and proceed without confirmation\n      --no-install             Skip installing composer dependencies\n      --skip-license           Skip creating a LICENSE file if one does not exist\n      --path[=PATH]            The path to initialize the package in (defaults to current working directory)\n      --exclude[=EXCLUDE]      Paths to exclude when processing files (multiple values allowed)\n  -h, --help                   Display help for the command\n      --silent                 Do not output any messages\n  -q, --quiet                  Only errors are displayed. All other output is suppressed\n  -V, --version                Display this application version\n      --ansi|--no-ansi         Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction         Do not ask any interactive question\n      --env[=ENV]              The environment the command should run under\n  -v|vv|vvv, --verbose         Increase the verbosity of messages: 1 for normal output, 2 for more verbose output, and 3 for debug output\n```\n\n### Excluded Paths (Default)\n\nBy default, the following paths are **excluded** from placeholder replacement:\n\n- `.git`\n- `.DS_Store`\n- `vendor`\n- `node_modules`\n\nAdd custom exclusions with `--exclude`:\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"Description\" \\\n  --exclude=\"dist\" \\\n  --exclude=\"build\" \\\n  --exclude=\".env\"\n```\n\n### Author Information\n\nThe CLI automatically fetches author information from git configuration:\n\n```bash\ngit config user.name \"John Doe\"\ngit config user.email \"john@doe.com\"\n```\n\nIf git config is not available, you'll be prompted interactively.\n\n### Testing Framework Selection\n\nWhen dependencies are enabled (without `--no-install`), you'll be prompted to choose your testing framework:\n\n- **Pest** (default) - Modern, elegant testing for PHP\n- **PHPUnit** - Industry-standard PHP testing framework\n\nThe selected framework's dev dependencies will be automatically installed.\n\nIf `--no-install` is used, this prompt is skipped and no testing framework dependencies are installed.\n\n### CLI Removal Prompt\n\nAt the end of a successful `init` run, the CLI always asks:\n\n```text\nDo you want to remove this CLI now?\n```\n\nIf you answer `yes`, the CLI removes the invoked executable file. If it cannot resolve or delete that executable, it shows a warning and continues.\n\n### Remove content\n\nTo remove `content` you can use a tag named `\u003cremove\u003e\u003c/remove\u003e`, and all the content between this tag would be removed, also the spaces after the close tag will be removed.\n\n```MD\n# Lorem ipsum\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sem libero, rutrum ut congue quis, cursus quis lectus.\n\n\u003cremove\u003eEtiam tempor ac lacus in congue.\u003c/remove\u003e\n\nUt lobortis eros a ipsum varius, eget tristique risus laoreet. Vestibulum ultricies augue ligula, vitae imperdiet urna tempus non.\n```\n\nand the result should be something like:\n\n```MD\n# Lorem ipsum\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sem libero, rutrum ut congue quis, cursus quis lectus.\n\nUt lobortis eros a ipsum varius, eget tristique risus laoreet. Vestibulum ultricies augue ligula, vitae imperdiet urna tempus non.\n```\n\n\n## Examples\n\n### Example 1: Initialize with all prompted values\n\n```bash\n$ skeleton init --path=\"$HOME/projects\"\nEnter the package vendor name: acme\nEnter the package name: blog\nEnter the package namespace (Optional, press Enter to auto-generate): Acme\\Blog\nEnter the package description: A blogging package\n(Author and email fetched from git config, if available)\n\n...\n\nDo you want to proceed with this configuration?: Yes\n\n...\n\nWhich testing framework do you want to use? [pest/phpunit]: pest\n\n...\n\nPackage [Acme\\Blog] initialized successfully!\n\nDo you want to remove this CLI now?: No\n```\n\n### Example 2: Initialize with all arguments provided\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"Jane Doe\" \"jane@example.com\" \"A blogging package\" \\\n  --proceed \\\n  --path=\"$HOME/projects\"\n```\n\n### Example 3: Initialize without dependencies\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"A blogging package\" \\\n  --no-install \\\n  --proceed\n```\n\n### Example 4: Initialize with a custom class name\n\n```bash\nskeleton init acme blog \"Acme\\\\Blog\" \"John Doe\" \"john@doe.com\" \"A blogging package\" \\\n  --class=\"BlogManager\" \\\n  --proceed\n```\n\n## Contributing\n\nIf you would like to contribute to the Skeleton CLI, please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Make your changes and add tests.\n4. Ensure all tests pass: `composer test`\n5. Run code standards: `composer lint:with-style`\n6. Submit a pull request.\n\n## Testing\n\nRun tests with:\n\n```bash\ncomposer test         # Run all tests\ncomposer test:ci      # Run tests in CI mode\n```\n\nCheck code standards with:\n\n```bash\ncomposer lint         # Run PHPStan (level 5)\ncomposer style        # Check code formatting with Pint\n```\n\nFix code formatting:\n\n```bash\ncomposer fix           # Auto-fix code formatting\n```\n\n## License\n\nThe Skeleton CLI is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoyotito-mx%2Fpackage-skeleton-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoyotito-mx%2Fpackage-skeleton-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoyotito-mx%2Fpackage-skeleton-cli/lists"}