{"id":13830291,"url":"https://github.com/am-impact/amcommand","last_synced_at":"2025-07-11T11:05:50.259Z","repository":{"id":18361627,"uuid":"21541808","full_name":"am-impact/amcommand","owner":"am-impact","description":"Command palette in Craft; Because you can","archived":false,"fork":false,"pushed_at":"2023-01-17T15:55:56.000Z","size":299,"stargazers_count":87,"open_issues_count":12,"forks_count":8,"subscribers_count":10,"default_branch":"craft3","last_synced_at":"2024-11-08T01:53:39.966Z","etag":null,"topics":["command-palette","craft","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/am-impact.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-06T14:43:27.000Z","updated_at":"2024-03-29T15:16:16.000Z","dependencies_parsed_at":"2023-02-10T10:31:27.155Z","dependency_job_id":null,"html_url":"https://github.com/am-impact/amcommand","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/am-impact%2Famcommand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/am-impact%2Famcommand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/am-impact%2Famcommand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/am-impact%2Famcommand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/am-impact","download_url":"https://codeload.github.com/am-impact/amcommand/tar.gz/refs/heads/craft3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225539369,"owners_count":17485314,"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":["command-palette","craft","php"],"created_at":"2024-08-04T10:00:58.314Z","updated_at":"2024-11-20T11:30:36.672Z","avatar_url":"https://github.com/am-impact.png","language":"PHP","readme":"# Command Palette\n\n_Command palette in Craft._\n\n## Requirements\n\nThis plugin requires Craft CMS 3.0.0-RC1 or later.\n\n## Installation\n\nTo install the plugin, follow these instructions.\n\n1. Open your terminal and go to your Craft project:\n\n        cd /path/to/project\n\n2. Then tell Composer to load the plugin:\n\n        composer require am-impact/amcommand\n\n3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Command Palette.\n\n## Functionality\n\nIf you have ever used Alfred, you know you'll be zipping through the control panel in no time!\n\nYou can open the command palette by using the keyboard combination: (command key for Apple users) CTRL + SHIFT + P, or you click on Command in the CP navigation.\n\nUse the keyboard arrows (up and down) to navigate to your desired command.\nWhen you hit the return key or click on a command, the command palette will navigate to the location and show what it's loading.\nUse (command key for Apple users) CTRL + RETURN (or click) to fire the command in a new window.\n\n![Palette](https://raw.githubusercontent.com/am-impact/am-impact.github.io/master/img/readme/amcommand/palette.gif \"Palette\")\n\n## Current commands\n\n### Default commands\n\n| Command | Description |\n| --------- | ----------- |\n| Content: Delete all entries | Delete all entries in one of the available sections. |\n| Content: Delete entries | Delete an entry in one of the available sections. |\n| Content: Edit entries | Edit an entry in one of the available sections. |\n| Content: New entry | Create a new entry in one of the available sections. |\n| Dashboard | Redirect. |\n| Globals: Edit | Edit one of your globals. |\n| Search on Craft | Redirect - Search on Craft with given keywords. |\n| Search on StackExchange | Redirect - Search on StackExchange with given keywords. |\n| Settings: Assets | Redirect. |\n| Settings: Categories | Redirect. |\n| Settings: Fields | Redirect. |\n| Settings: Fields - Duplicate | Duplicate a field. |\n| Settings: Fields - Edit | Edit one of the fields. |\n| Settings: Globals | Redirect. |\n| Settings: Globals - Global Sets | Edit the settings for one of the globals. |\n| Settings: New... | Add something new in the settings... |\n| Settings: Plugins | Redirect. |\n| Settings: Plugin settings | Edit the settings for one of the enabled plugins |\n| Settings: Routes | Redirect. |\n| Settings: Sections | Redirect. |\n| Settings: Sections - Edit | Edit a section. |\n| Settings: Sections - Edit entry type | Edit an entry type of a section. (Field Layout and such) |\n| Settings: Users | Redirect. |\n| Tasks | Manage Craft tasks. |\n| Tools | Use one of the most used tools. |\n| Users: Delete users | Delete a user other than your own. |\n| Users: Edit users | Edit a user. |\n| Users: Login as user | Log in as a different user, and navigate to their dashboard. |\n| Users: New user | Create a user. |\n| Sign out | End current session. |\n| My Account | Redirect. |\n\n### Special commands\n\n| Command | Description |\n| --------- | ----------- |\n| Content: Compare entry version | Compare the current entry you are viewing in the CP with older versions. |\n| Content: Duplicate entry | Duplicate the current entry you are viewing in the CP. |\n| Simply type! | You will be able to search in elements directly when you haven't triggered a (deeper command, that returns a new list or such things) command yet. |\n\n## Adding your own commands\n\nIf you'd like to add commands for a plugin you're developing, register the commands through an event.\n\nAdd this at the top of your main plugin file:\n```php\nuse amimpact\\commandpalette\\events\\RegisterCommandsEvent;\nuse amimpact\\commandpalette\\services\\General;\nuse yii\\base\\Event;\n```\n\nAdd this to the init function of your main plugin file:\n```php\nif (class_exists(General::class)) {\n    Event::on(General::class, General::EVENT_REGISTER_COMMANDS, function(RegisterCommandsEvent $event) {\n        $event-\u003ecommands[] = [\n            'name' =\u003e 'Search on Google',\n            'type' =\u003e 'Custom',\n            'url'  =\u003e 'http://www.google.nl',\n            'icon' =\u003e [\n                'type' =\u003e 'font',\n                'content' =\u003e 'plugin'\n            ]\n        ];\n        $event-\u003ecommands[] = [\n            'name' =\u003e 'My own plugin function in a service',\n            'type' =\u003e 'Custom',\n            'call' =\u003e 'yourPluginFunctionName',\n            'plugin' =\u003e 'your-plugin-handle',\n            'service' =\u003e 'yourPluginServiceName'\n        ];\n    });\n}\n```\n\nThat's it! The command palette will add these two commands.\n\nIf you look at the second example, you see a call, plugin and service key. These can be used to load a new set of commands.\n\nIn your plugin's service __yourPluginServiceName__ (e.g.: general), you'll create a new function called __yourPluginFunctionName__. In here you could do the same thing as you see in the example, and just return the new set of commands.\n\n## Contact\n\nIf you have any questions or suggestions, don't hesitate to contact us. We would like to add more commands to the palette, so if you have any ideas then please let us know!\n","funding_links":[],"categories":["Plugins / extensions"],"sub_categories":["Browser extensions"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fam-impact%2Famcommand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fam-impact%2Famcommand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fam-impact%2Famcommand/lists"}