{"id":13810396,"url":"https://github.com/gedex/wp-tools","last_synced_at":"2025-04-05T22:31:46.749Z","repository":{"id":57399558,"uuid":"80659991","full_name":"gedex/wp-tools","owner":"gedex","description":"Command line interface to reduce boring tasks when working on WordPress plugin / theme project that will be published to wp.org","archived":false,"fork":false,"pushed_at":"2018-04-21T19:54:49.000Z","size":194,"stargazers_count":33,"open_issues_count":17,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T18:53:10.695Z","etag":null,"topics":["cli","github","wordpress","wordpress-development","wordpress-plugin","wordpress-theme"],"latest_commit_sha":null,"homepage":null,"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/gedex.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":"2017-02-01T20:18:39.000Z","updated_at":"2023-08-24T15:02:11.000Z","dependencies_parsed_at":"2022-09-09T22:21:44.272Z","dependency_job_id":null,"html_url":"https://github.com/gedex/wp-tools","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gedex%2Fwp-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gedex%2Fwp-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gedex%2Fwp-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gedex%2Fwp-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gedex","download_url":"https://codeload.github.com/gedex/wp-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411237,"owners_count":20934650,"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":["cli","github","wordpress","wordpress-development","wordpress-plugin","wordpress-theme"],"created_at":"2024-08-04T02:00:52.059Z","updated_at":"2025-04-05T22:31:46.203Z","avatar_url":"https://github.com/gedex.png","language":"PHP","readme":"wp-tools (wpt)\n==============\n\n[![npm version](https://img.shields.io/npm/v/wp-tools.svg?style=flat)](https://www.npmjs.com/package/wp-tools)\n[![build status](https://api.travis-ci.org/gedex/wp-tools.svg)](http://travis-ci.org/gedex/wp-tools)\n[![dependency status](https://david-dm.org/gedex/wp-tools.svg)](https://david-dm.org/gedex/wp-tools)\n\nwp-tools (wpt) is a command line interface to reduce boring tasks when\nworking on WordPress plugin / theme project that will be published to wp.org.\nMost commands in wpt are shamelessly borrowed from existing task runner plugin\n(see credits) so that you can run it without task runner and embed it easily in\n`npm scripts` (which is the main goal of wpt).\n\n## Install\n\n```\n$ npm install -g wp-tools\n```\n\n## Usage\n\nOnce installed globally, `wpt` should be available from shell.\n\n```\n$ wpt\n\n  Usage:  [options] [command]\n\n\n  Commands:\n\n    bump:wp-version [options] \u003cfrom\u003e \u003cto\u003e  Bump WP version in readme.txt\n    generate:pot [options]                 Generate POT.\n    generate:readme-md [options]           Generate README.md from readme.txt.\n    generate:release-zip [options]         Generates project zip like in wp.org without releasing.\n    info [options]                         View plugin/theme project info.\n    init [options]                         Initialize .wpt.yaml.\n    release:gh [options]                   Release the project to GitHub.\n    release:wporg [options]                Release the project to WP.org.\n    preview:gh                             Preview GitHub README.md.\n    validate:i18n [options]                Check your code for incorrect text-domain.\n    validate:readme-txt                    Check your readme.txt.\n\n  Options:\n\n    -h, --help     output usage information\n    -V, --version  output the version number\n```\n\nFor more help on specific command, supply `-h` or `--help`, for example:\n\n```\n$ wpt init -h\n\n  Usage: init [options]\n\n  Initialize .wpt.yaml in current directory.\n\n  If .wpt.yml exists in current directory, it will read that first, and default to the options there.\n\n  Options:\n\n    -h, --help          output usage information\n    -d, --use-defaults  Use only defaults and not prompt you for any options.\n```\n\n## Project Config (`.wpt.yml`)\n\nSome commands in wpt expect config file to be present in your project directory.\nTo add / modify config file in a project:\n\n```\n$ wpt init\n```\n\nJust like `npm init` this will create `.wpt.yml` file. Following is an example\nof `.wpt.yml` content:\n\n~~~yaml\ntype: plugin\nfiles:\n    src:\n        - '**'\n        - '!node_modules/**'\n        - '!vendor/**'\n        - '!tests/**'\n        - '!test/**'\n        - '!build/**'\n        - '!tmp/**'\n        - '!README.md'\n    main: slack.php\n    assets:\n        - assets/*.png\ngh:\n    username: gedex\n    repo: gedex/wp-slack\n    branch: master\nwporg:\n    slug: slack\n    username: akeda\n    buildPath: build\n~~~\n\n* `type` is project type (plugin or theme).\n* `files.src` is list of files / patterns that are part of the plugin or theme.\n   All files that match with the pattern will be pushed to wp.org when using\n   command `release:wporg`. Command `wpt generate:pot` also uses matched files\n   to scan gettext functions.\n* `files.main` is main file of the plugin or theme. For theme it should be\n  `style.css`.\n* `files.assets` is list of files / patterns that are assets in wp.org. See\n   [here](https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/).\n* `gh.username` is your GitHub username, if the project is hosted on GitHub.\n* `gh.repo` is GitHub repository with following format:\n\n   ```\n   owner/repo\n   ```\n   For example https://github.com/Automattic/jetpack would be `Automattic/jetpack`.\n\n* `gh.branch` is git branch for stable release. If not specified it defaults to\n  `master`. This branch is checkout'ed when releasing to GitHub and wp.org.\n* `wporg.slug` is the plugin slug in wp.org directory.\n* `wporg.username` is your wp.org username that has commit access to the plugin\n  svn. Required by command `wpt release:wporg`.\n* `wporg.buildPath` is the directory containing all files to be pushed to wp.org.\n  By default it's under `build` of current directory. The directory must be\n  gitignore'ed. The checkout, diff, and commit are performed against this\n  directory.\n\n## Credits\n\n* [generate-markdown-readme](https://github.com/xwp/wp-dev-lib/blob/master/generate-markdown-readme)\n  from [xwp/wp-deb-lib](https://github.com/xwp/wp-dev-lib).\n* [wpi18n](https://github.com/cedaro/node-wp-i18n)\n* [grunt-checktextdomain](https://github.com/stephenharris/grunt-checktextdomain)\n\n## License\n\nMIT\n","funding_links":[],"categories":["WordPress Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgedex%2Fwp-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgedex%2Fwp-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgedex%2Fwp-tools/lists"}