{"id":26912823,"url":"https://github.com/dannymichel/ghs","last_synced_at":"2025-04-01T15:36:31.825Z","repository":{"id":241975282,"uuid":"808332443","full_name":"dannymichel/ghs","owner":"dannymichel","description":"Command-line tool to manage SSH and GPG keys for GitHub accounts, enabling analysis, pairing, and setting defaults for repositories.","archived":false,"fork":false,"pushed_at":"2025-04-01T12:37:19.000Z","size":1368,"stargazers_count":5,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T13:35:09.592Z","etag":null,"topics":["cli","command-line-tool","git","github","gpg","key-management","nodejs","npm","repository-management","ssh"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dannymichel.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-05-30T21:08:52.000Z","updated_at":"2025-03-29T22:45:19.000Z","dependencies_parsed_at":"2024-06-05T03:53:11.101Z","dependency_job_id":"68432596-e34e-4cda-afe7-a53467154ec6","html_url":"https://github.com/dannymichel/ghs","commit_stats":null,"previous_names":["dannymichel/ghs"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannymichel%2Fghs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannymichel%2Fghs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannymichel%2Fghs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannymichel%2Fghs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannymichel","download_url":"https://codeload.github.com/dannymichel/ghs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246663385,"owners_count":20813885,"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","command-line-tool","git","github","gpg","key-management","nodejs","npm","repository-management","ssh"],"created_at":"2025-04-01T15:36:31.225Z","updated_at":"2025-04-01T15:36:31.820Z","avatar_url":"https://github.com/dannymichel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ghs - GitHub SSH and GPG Key Manager\n\n`ghs` is a command-line tool and GUI to manage SSH and GPG keys for GitHub accounts. It allows you to analyze, save configurations, create new keys, delete configurations, and switch between them easily.\n\n## Features\n\n- Export and analyze GPG keys\n- Save and name GPG and SSH key configurations\n- Create new GPG and SSH key pairs\n- Clone repositories with specified SSH and GPG keys\n- Switch GitHub accounts using saved configurations\n- Set default GPG and SSH keys\n- Delete saved configurations\n- List all saved configurations\n- Dry-run mode for simulating commands without making changes\n- Modern GUI with dark and light modes\n\n## Installation\n\n### From the Repository\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/dannymichel/ghs.git\n    ```\n\n2. Navigate to the project directory:\n\n    ```bash\n    cd ghs\n    ```\n\n3. Install the dependencies for the backend and frontend:\n\n    ```bash\n    npm install\n    cd frontend\n    npm install\n    cd ../backend\n    npm install\n    cd ..\n    ```\n\n4. Link the package globally:\n\n    ```bash\n    npm link\n    ```\n\n### Global Installation via npm\n\nYou can install the tool globally using npm:\n\n```bash\nnpm install -g ghs-cli-tool\n```\n\n## Usage\n\nYou can use the `ghs` command to perform various tasks. Here are the available commands:\n\n### Analyze GPG Keys\n\nExport and analyze your GPG keys.\n\n```bash\nghs analyze\n```\n\n### Save GPG and SSH Key Configuration\n\nSave a new GPG and SSH key pair configuration. You can either pass the configuration name, GPG key, and SSH key directly as arguments, or run the command without arguments to select from options interactively.\n\n```bash\nghs save [configName] [gpgKey] [sshKey]\n```\n\nor\n\n```bash\nghs save\n```\n\n### Create New GPG and SSH Key Pair\n\nCreate a new GPG and SSH key pair. You can either pass the necessary details directly as arguments, or run the command without arguments to provide details interactively.\n\n```bash\nghs new [configName] [gpgName] [gpgEmail] [gpgPassphrase] [sshKeyName]\n```\n\nor\n\n```bash\nghs new\n```\n\n### Clone Repository\n\nClone a GitHub repository using specified SSH and GPG keys. You can either pass the URL, GPG key, and SSH key directly as arguments, or run the command without arguments to select from options interactively.\n\n```bash\nghs clone [url] [gpgKey] [sshKey]\n```\n\nor\n\n```bash\nghs clone\n```\n\n### Switch GitHub Accounts\n\nSwitch the GitHub account using a saved configuration. You can either pass the configuration name directly as an argument, or run the command without arguments to select from options interactively.\n\n```bash\nghs switch [configName]\n```\n\nor\n\n```bash\nghs switch\n```\n\n### Set Default Keys\n\nSet default GPG and SSH keys for your operations. You can either pass the GPG key, SSH key, user name, and user email directly as arguments, or run the command without arguments to provide details interactively.\n\n```bash\nghs default [gpgKey] [sshKey] [userName] [userEmail]\n```\n\nor\n\n```bash\nghs default\n```\n\n### Delete Saved Configuration\n\nDelete a saved GPG and SSH key pair configuration. Use the `--hard` option to delete both the configuration and the actual keys. You can either pass the configuration name directly as an argument, or run the command without arguments to select from options interactively.\n\n```bash\nghs delete [configName]\nghs delete --hard [configName]\n```\n\nor\n\n```bash\nghs delete\nghs delete --hard\n```\n\n### List All Saved Configurations\n\nList all saved configurations.\n\n```bash\nghs list\n```\n\n### Export GPG and SSH Keys\n\nExport GPG and SSH keys for a saved configuration. You can either pass the configuration name directly as an argument, or run the command without arguments to select from options interactively.\n\n```bash\nghs export [configName]\n```\n\nor\n\n```bash\nghs export\n```\n\n### Dry-Run Mode\n\nSimulate commands without making changes using the `--dry-run` option.\n\n```bash\nghs clone --dry-run [url] [gpgKey] [sshKey]\nghs switch --dry-run [configName]\nghs default --dry-run [gpgKey] [sshKey] [userName] [userEmail]\nghs new --dry-run [configName] [gpgName] [gpgEmail] [gpgPassphrase] [sshKeyName]\nghs save --dry-run [configName] [gpgKey] [sshKey]\nghs delete --dry-run [configName]\nghs delete --hard --dry-run [configName]\n```\n\n### Running the GUI\n\nTo run the GUI for managing your configurations, use the following command:\n\n```bash\nnpm start\n```\n\nThis will start both the frontend and backend servers. You can then access the GUI in your browser at `http://localhost:3000`.\n\n## Directory Structure\n\n```\nghs/\n│\n├── bin/\n│   └── ghs.js\n├── backend/\n│   ├── index.js\n│   └── ...\n├── frontend/\n│   ├── public/\n│   ├── src/\n│   │   ├── App.js\n│   │   ├── index.js\n│   │   ├── themes.js\n│   │   ├── ...\n│   └── package.json\n├── lib/\n│   ├── config.js\n│   ├── gpg.js\n│   ├── ssh.js\n│   ├── git.js\n│   └── prompts.js\n└── package.json\n```\n\n- **bin/ghs.js**: Entry point for the CLI tool.\n- **backend/index.js**: Entry point for the backend server.\n- **frontend/**: Contains the frontend React application.\n  - **public/**: Static assets for the frontend.\n  - **src/**: Source code for the frontend.\n    - **App.js**: Main application component.\n    - **index.js**: Entry point for the React application.\n    - **themes.js**: Contains theme configurations for light and dark modes.\n- **lib/config.js**: Handles loading and saving configuration.\n- **lib/gpg.js**: Functions for exporting, analyzing, saving, creating, setting default, and deleting GPG keys.\n- **lib/ssh.js**: Functions for managing SSH keys.\n- **lib/git.js**: Functions for cloning repositories and switching accounts.\n- **lib/prompts.js**: User prompts for various operations.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannymichel%2Fghs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannymichel%2Fghs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannymichel%2Fghs/lists"}