{"id":13715789,"url":"https://github.com/aaemnnosttv/wp-cli-login-command","last_synced_at":"2025-05-16T03:03:21.144Z","repository":{"id":43210965,"uuid":"66396670","full_name":"aaemnnosttv/wp-cli-login-command","owner":"aaemnnosttv","description":"Log in to WordPress with secure passwordless magic links.","archived":false,"fork":false,"pushed_at":"2024-08-18T15:02:24.000Z","size":237,"stargazers_count":310,"open_issues_count":9,"forks_count":48,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-09T16:53:16.736Z","etag":null,"topics":["wp-cli","wp-cli-package"],"latest_commit_sha":null,"homepage":"https://aaemnnost.tv/wp-cli-commands/login/","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/aaemnnosttv.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":"2016-08-23T19:27:00.000Z","updated_at":"2025-05-09T10:48:09.000Z","dependencies_parsed_at":"2024-01-09T19:01:16.650Z","dependency_job_id":"e834761b-97db-4a5b-9fe5-3ebb49330693","html_url":"https://github.com/aaemnnosttv/wp-cli-login-command","commit_stats":{"total_commits":237,"total_committers":8,"mean_commits":29.625,"dds":0.05063291139240511,"last_synced_commit":"6aabb74f17090f5e12a3b2e58a2bc14c561e97da"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fwp-cli-login-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fwp-cli-login-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fwp-cli-login-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaemnnosttv%2Fwp-cli-login-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaemnnosttv","download_url":"https://codeload.github.com/aaemnnosttv/wp-cli-login-command/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253292116,"owners_count":21885036,"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":["wp-cli","wp-cli-package"],"created_at":"2024-08-03T00:01:03.536Z","updated_at":"2025-05-16T03:03:19.354Z","avatar_url":"https://github.com/aaemnnosttv.png","language":"PHP","readme":"# WP-CLI Login Command\n\nLogin to WordPress with secure passwordless links.\n\n[![Test](https://github.com/aaemnnosttv/wp-cli-login-command/actions/workflows/test.yml/badge.svg)](https://github.com/aaemnnosttv/wp-cli-login-command/actions/workflows/test.yml)\n[![Packagist](https://img.shields.io/packagist/v/aaemnnosttv/wp-cli-login-command.svg)](https://packagist.org/packages/aaemnnosttv/wp-cli-login-command)\n\nQuick links: [Using](#using) | [Installation](#installation) | [Contributing](#contributing)\n\n## Using\n\n```\nNAME\n\n  wp login\n\nDESCRIPTION\n\n  Manage magic passwordless sign-in.\n\nSYNOPSIS\n\n  wp login \u003ccommand\u003e\n\nSUBCOMMANDS\n\n  create          Create a magic sign-in link for the given user.\n  email           Email a magic sign-in link to the given user.\n  install         Install/update the companion server plugin.\n  invalidate      Invalidate any existing magic links.\n  toggle          Toggle the active state of the companion server plugin.\n\n```\n\n### `create` / `as`\n\n```\nwp login create \u003cuser\u003e [options]\n```\nor alternatively use the alias\n```\nwp login as \u003cuser\u003e [options]\n```\n\nCreate a magic sign-in link for the given user.  Outputs the created URL with some extra information for the user regarding usage and expiration.  URLs expire 15 minutes after creation ([configurable](#--expiresseconds)), or at the time of use, whichever comes first.\n\n\u003e `\u003cuser\u003e` can be passed as an User ID, username/login or email address. This is the same for all `login` commands which accept this as a parameter.\n\n#### `--expires=\u003cseconds\u003e`\n\nSet the lifetime of the magic link in seconds.\n\n    10 minutes = 600\n    1 hour     = 3600\n    1 day      = 86400\n\nDefault: `900` (15 minutes)\n\n#### `--redirect-url=\u003curl\u003e`\n\nSet the URL to redirect to upon successfully logging in. Defaults to `admin_url()`.\n\n\u003e Note: The redirect is executed using [`wp_safe_redirect`](https://developer.wordpress.org/reference/functions/wp_safe_redirect/) which restricts the destination URL using a list of allowed hosts. By default, this is limited to the domain of the site, but can be extended using the [`allowed_redirect_hosts`](https://developer.wordpress.org/reference/hooks/allowed_redirect_hosts/) filter.\n\n#### `--url-only`\n\nOutputs the created sign-in URL only. Great for scripting, piping to your clipboard, or anything else you can think of.\n\n#### `--launch`\n\nLaunches the sign-in link your default browser immediately after creation.  This is the fastest possible way to login.\n\n### `email`\n\n```\nwp login email \u003cuser\u003e [options]\n```\n\nEmail a magic sign-in link to the given user.  Sends a nice HTML email to the user's email address containing their freshly created magic sign-in link.  Planning to add support for both HTML and plain text emails in the future.\n\n#### `--expires=\u003cseconds\u003e`\n\n[See above.](#--expiresseconds)\n\n#### `--redirect-url=\u003curl\u003e`\n\n[See above.](#--redirect-urlurl)\n\n#### `--subject=\u003cemail-subject\u003e`\n\nOptionally override the default email subject with your own custom string. You may use the `{{ domain }}` placeholder.\n\nDefault: Magic log-in link for {{domain}}\n\n#### `--template=\u003cpath-to-custom-template\u003e`\n\nOptionally override the default email template with your own by providing the path to a different template file to use.\nThe email template is compiled using the Mustache template engine, so you may use the `{{ magic_url }}` and `{{ domain }}` placeholders in your custom template.  The default template can be found in this repository under `template/email-default.mustache`.\n\n### `install`\n\n```\nwp login install [options]\n```\n\nInstall/update the companion server plugin.  Installing the companion plugin is required before magic links will work on the host.\nThe `login` command is aware of the installed version of the plugin, and will inform you if it needs to be installed, activated or upgraded.\nIf the plugin is already installed, you will be prompted to overwrite it.\n\n#### `--activate`\n\nOptionally activate the plugin immediately after installation.\n\n#### `--mu`\n\nInstall as a Must Use plugin.\n\n#### `--yes`\n\nSuppress prompting for confirmation to overwrite the existing plugin.\n\n\u003e Using a Composer-based WordPress install? You can require the companion plugin using the package `aaemnnosttv/wp-cli-login-server`.\n\n### `invalidate`\n\n```\nwp login invalidate\n```\n\nInvalidate any existing magic sign-in links.  Any previously created links will most likely go to a 404 page.\n\n### `toggle`\n\n```\nwp login toggle [\u003con|off\u003e]\n```\n\nToggles the active status of the companion plugin.  Optionally pass `on` or `off` to set the activation accordingly. Without it, the status is simply inverted.\n\n## Installation\n\nInstalling this package requires WP-CLI v0.23.0 or greater. Update to the latest stable release with `wp cli update`.\n\nOnce you've done so, you can install this package with `wp package install aaemnnosttv/wp-cli-login-command`.\n\n## Contributing\n\nWe appreciate you taking the initiative to contribute to this project.\n\nContributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.\n\n### Reporting a bug\n\nThink you’ve found a bug? We’d love for you to help us get it fixed.\n\nBefore you create a new issue, you should [search existing issues](https://github.com/aaemnnosttv/wp-cli-login-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.\n\nOnce you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/aaemnnosttv/wp-cli-login-command/issues/new) with the following:\n\n1. What you were doing (e.g. \"When I run `wp post list`\").\n2. What you saw (e.g. \"I see a fatal about a class being undefined.\").\n3. What you expected to see (e.g. \"I expected to see the list of posts.\")\n\nInclude as much detail as you can, and clear steps to reproduce if possible.\n\n### Creating a pull request\n\nWant to contribute a new feature? Please first [open a new issue](https://github.com/aaemnnosttv/wp-cli-login-command/issues/new) to discuss whether the feature is a good fit for the project.\n\nOnce you've decided to commit the time to seeing your pull request through, please follow our guidelines for creating a pull request to make sure it's a pleasant experience:\n\n1. Create a feature branch for each contribution.\n2. Submit your pull request early for feedback.\n3. Include functional tests with your changes. [Read the WP-CLI documentation](https://make.wordpress.org/cli/handbook/contributions/pull-requests/#running-and-writing-tests) for an introduction.\n4. Follow [PSR-2 Coding Standards](http://www.php-fig.org/psr/psr-2/).\n","funding_links":[],"categories":["Third-party packages","PHP"],"sub_categories":["Notable packages"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaemnnosttv%2Fwp-cli-login-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaemnnosttv%2Fwp-cli-login-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaemnnosttv%2Fwp-cli-login-command/lists"}