{"id":24651660,"url":"https://github.com/skitzum/commander","last_synced_at":"2026-05-08T18:36:11.074Z","repository":{"id":270178636,"uuid":"909567528","full_name":"Skitzum/Commander","owner":"Skitzum","description":"Commander: Easily manage and execute shortcuts, from CMD and PowerShell commands to .exe and .bat files. Features include placeholders for dynamic input, two-step confirmation, customizable themes, and JSON-based storage.","archived":false,"fork":false,"pushed_at":"2025-01-09T00:04:32.000Z","size":38436,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T19:12:31.690Z","etag":null,"topics":["command-line-tool","gui-application","json","network-diagnostics","powershell","pyqt","python","shortcut-manager","shortcuts","windows-utilities"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Skitzum.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":"2024-12-29T05:18:25.000Z","updated_at":"2024-12-29T08:49:57.000Z","dependencies_parsed_at":"2024-12-29T07:10:34.609Z","dependency_job_id":null,"html_url":"https://github.com/Skitzum/Commander","commit_stats":null,"previous_names":["skitzum/commander"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skitzum%2FCommander","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skitzum%2FCommander/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skitzum%2FCommander/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skitzum%2FCommander/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skitzum","download_url":"https://codeload.github.com/Skitzum/Commander/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244702249,"owners_count":20495858,"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-line-tool","gui-application","json","network-diagnostics","powershell","pyqt","python","shortcut-manager","shortcuts","windows-utilities"],"created_at":"2025-01-25T19:12:39.613Z","updated_at":"2026-05-08T18:36:11.022Z","avatar_url":"https://github.com/Skitzum.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nCommander is a **Python + PyQt** application that manages a collection of handy shortcuts—each shortcut can be:\n\n- A simple **CMD** command (e.g., `ping google.com`)\n- A **PowerShell** command or script (e.g., `.ps1` files)\n- An **.exe** or **.bat** program\n- Commands with **placeholders** (like `{host}`) that prompt the user at runtime\n\nIt provides:\n\n- A **table** with name, command, tags, and category.\n- **Light/Dark** theme toggle switch.\n- **Search** bar for filtering by text in name/command/tags/category.\n- A **category sidebar** for advanced filtering.\n- **Two-step execution** (Execute → Confirm) to avoid accidental runs.\n- Add/Edit/Delete for new shortcuts (persisted in a JSON file).\n- Support for **multiline PowerShell** scripts via external `.ps1` or an embedded approach.\n\n---\n\n## Features\n\n1. **Searchable Table**\n    \n    - Real-time filter by name, command, tags, or category.\n    - Category sidebar to quickly navigate or show `(All Categories)`.\n2. **Light/Dark Mode**\n    \n    - A toggle switch in the search bar area.\n    - Setting saved to JSON so it’s remembered next time.\n3. **Two-Step Confirmation**\n    \n    - Prevents accidental command execution by requiring “Execute” → “Confirm.”\n4. **Add/Edit/Delete Shortcuts**\n    \n    - Add new shortcuts with a **ShortcutDialog** (input name, command, description, tags, category, etc.).\n    - Option to mark “Requires user input?” for placeholder substitution.\n    - Link `.exe`, `.bat`, `.ps1`, or embed multiline code.\n5. **Placeholder Logic**\n    \n    - If `requires_input` is set, Commander scans the command for tokens like `{host}`.\n    - Prompts the user for each placeholder at runtime.\n    - Substitutes them before execution.\n6. **Automatic Shell Detection**\n    \n    - If the command ends with `.exe`, Commander runs it directly.\n    - If `.ps1`, it uses PowerShell.\n    - Otherwise, defaults to `cmd /k`.\n7. **Easy Portability**\n    \n    - All data stored in `shortcuts.json` in the same folder.\n    - Just drop the folder on a flash drive—Commander references relative paths if you choose.\n\n---\n\n## Installation \u0026 Requirements\n\n1. **Python 3.7+** (recommended)\n2. **PyQt5** (For the GUI).\n3. **Windows** environment for best results (Currently all commands are Windows specific).\n\nInstall dependencies:\n\nbash\n\nCopy code\n\n`pip install pyqt5`\n\n---\n\n## Running Commander\n\n1. **Clone** or **copy** the Commander files (including `main.py`, `shortcuts.json`, etc.) to a folder.\n2. **Open** a terminal or command prompt in that folder.\n3. **Launch**:\n    \n    bash\n    \n    Copy code\n    \n=======\n    \n4. The Commander window appears. You’ll see:\n    - A **search bar** (with a theme toggle switch).\n    - A **category sidebar** (left).\n    - A **table** listing your shortcuts (right).\n    - Bottom buttons for adding/editing/deleting.\n    - An “Execute” button.\n\n---\n\n## Adding a Shortcut\n\n1. **Click** “Add Shortcut.”\n2. Fill in:\n    - **Name**: A label (e.g., “Ping Google”).\n    - **Command**: The command or path (e.g., “ping google.com” or `E:\\HwInfo\\HwInfo64.exe`).\n    - **Description**: Optional brief text.\n    - **Tags**: Comma-separated tags (e.g., `network, ping`).\n    - **Category**: For grouping (e.g., `Networking`).\n    - **Requires user input?**: If you have placeholders like `{host}` in Command, check this box.\n3. **Press OK**. The new shortcut is saved to JSON and appears in the table.\n\n---\n\n## Editing or Deleting a Shortcut\n\n1. **Select** the row in the table.\n2. **Edit Shortcut** or **Delete Shortcut**:\n    - **Edit** opens the same dialog, pre-filled. Change fields, then OK.\n    - **Delete** asks “Are you sure?”\n3. Changes are saved automatically to `shortcuts.json`.\n\n---\n\n## Running a Shortcut\n\n1. **Select** the row you want.\n2. Click **Execute**.\n3. Button changes to **Confirm**. Click again → the command runs.\n4. If it’s a `.exe`, it launches. If `.ps1`, it uses PowerShell. Otherwise, default to `cmd /k`.\n5. If the command has placeholders like `{host}`, you’ll be prompted for each placeholder first.\n\n---\n\n## Handling Multiline PowerShell\n\n**Recommended**: Put your multiline script in a `.ps1` file. Then your “Command” might be:\n\narduino\n\nCopy code\n\n`powershell.exe -NoExit -File \"E:\\Commander\\Scripts\\FindRecentFiles.ps1\"`\n\n_(Or you can embed multiline code directly in the Command field and write it to a temp file on-the-fly, but that requires more code changes. See the documentation for details.)_\n\n---\n\n## Building an Executable (Optional)\n\nIf you want a **single-file `.exe`**:\n\n1. Install [**PyInstaller**](https://www.pyinstaller.org/):\n    \n    bash\n    \n    Copy code\n    \n    `pip install pyinstaller`\n    \n2. In your folder, run:\n    \n    bash\n    \n    Copy code\n    \n    `pyinstaller --onefile main.py`\n    \n3. It creates `dist/main.exe`. Put `shortcuts.json` (and any `.ps1` scripts you need) **beside** that `.exe`.\n\n---\n\n## Troubleshooting\n\n- **Placeholder logic** not working? Make sure you don’t **overwrite** the local `command` variable after replacements, or skip the `requires_input` check.\n- **Not picking up `.exe`**? Double-check your extension logic or see if the path is spelled correctly.\n- **No shortcuts** appear? Possibly your `shortcuts.json` is empty or in a different folder. Add debug prints or check the console for file paths.\n\n---\n\n## Contributing\n\nFeel free to open a PR or share improvements:\n\n- More advanced search or category logic.\n- Additional shells (e.g. WSL?).\n- Integration with external tools or an embedded console approach.\n- Much more robust handling for .exe creation with better instructions\n- Groups that can run multiple commands at a time\n- Need more ideas for great commands to add to default JSON\n- Resizing columns correctly so long commands don't take up the whole window\n\n---\n\n## License\n\nCommander is licensed under the MIT License. You can freely modify and distribute it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskitzum%2Fcommander","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskitzum%2Fcommander","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskitzum%2Fcommander/lists"}