{"id":19505335,"url":"https://github.com/pfwd/terminal-setup","last_synced_at":"2026-05-06T14:40:29.185Z","repository":{"id":136249059,"uuid":"107278378","full_name":"pfwd/terminal-setup","owner":"pfwd","description":"An easy way to switch between client based bash profiles and aliases. This may be helpful for freelancers who have multiple clients","archived":false,"fork":false,"pushed_at":"2017-10-18T12:18:08.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T14:38:12.988Z","etag":null,"topics":["aliases","bash","clients","command-line-tool","commandline","freelance","freelance-work","freelancer","ssh","terminal"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/pfwd.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":"2017-10-17T14:16:50.000Z","updated_at":"2021-07-30T16:47:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc2ea972-acc0-4d79-9191-12297a62487a","html_url":"https://github.com/pfwd/terminal-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pfwd/terminal-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfwd%2Fterminal-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfwd%2Fterminal-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfwd%2Fterminal-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfwd%2Fterminal-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pfwd","download_url":"https://codeload.github.com/pfwd/terminal-setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfwd%2Fterminal-setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32699088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aliases","bash","clients","command-line-tool","commandline","freelance","freelance-work","freelancer","ssh","terminal"],"created_at":"2024-11-10T22:29:48.287Z","updated_at":"2026-05-06T14:40:29.167Z","avatar_url":"https://github.com/pfwd.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terminal Setup\nThis allows switching between client bash profiles.\n\nEach client can have their own SSH config and bash aliases\n\nWhen switching between clients a symlink named .current_client_aliases is added to the home directory.  This is linked to the active client aliases and changed when the client is switched\n\n### Clients\nEach client should be structured like so\n\n```\n/clients/\u003cclient\u003e/.aliases\n/clients/\u003cclient\u003e/.ssh/keys/\n/clients/\u003cclient\u003e/.ssh/config\n```\nBoth bash aliases and ssh folders are optional\n\n### Installation\nClone the repository into your home directory\n```\ngit clone git@github.com:pfwd/terminal-setup.git ~/terminal-setup.git\n```\nPlease check the following [install](bin/install.sh) and [uninstall](bin/uninstall.sh) scripts to ensure this won't wipe out existing bash profiles\n\nMake sure the bash scripts are executable\n\n```\n$ chmod u+x ./bin/*\n```\n\nTo install new clients or updates run the following:\n\n```\n$ ./bin/install.sh\n```\nYou must source the new .profile_bash for the below reload command to work\n```\n$ source ~/.bash_profile\n```\n\n### Switch between clients\nTo switch between clients run the following:\n```\n$ ./bin/client_switch.sh -c \u003cclient\u003e \u0026\u0026 reload\n```\n\n### Reloading the bash profile\nThis only applies if you didn't add the `reload` command when switching between clients\nEach time you switch between clients you must reload the bash profile to pick up any changes\n```\n$ reload\n```\nWhen the profile is reloaded the [default aliases](.aliases) are also included\n\n### Tips and tricks\nIn each client add aliases that match to the clients SSH config\n```\n# clients/foo/.aliases\nalias ssh-dev-site=\"ssh -F ~/.ssh/foo/config dev-site\"\n  \n# clients/foo/.ssh/config\nHost dev-site\n   HostName \u003cIP_ADDRESS\u003e\n   User \u003cUSERNAME\u003e\n   IdentityFile ~/.ssh/foo/keys/id_rsa\n       \n# clients/bar/.aliases\nalias ssh-dev-site=\"ssh -F ~/.ssh/bar/config dev-site\"\n   \n# clients/bar/.ssh/config\nHost dev-site\n   HostName \u003cIP_ADDRESS\u003e\n   User \u003cUSERNAME\u003e\n   IdentityFile ~/.ssh/bar/keys/id_rsa\n   \n$ ./bin/client_switch.sh -c foo \u0026\u0026 reload\n$ ssh-dev-site # This will access foo server\n   \n$ ./bin/client_switch.sh -c bar \u0026\u0026 reload\n$ ssh-dev-site # This will access bar server\n```\n\nCreate an alias in each client that echos the current active client\n```\n# clients/foo/.aliases\nalias whichclient=\"echo Client Foo is loaded\"\n  \n# clients/bar/.aliases\nalias whichclient=\"echo Client Bar is loaded\"\n  \n$ ./bin/client_switch.sh -c foo \u0026\u0026 reload\n$ whichclient # Client Foo is loaded\n  \n$ ./bin/client_switch.sh -c bar \u0026\u0026 reload\n$ whichclient # Client Bar is loaded\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfwd%2Fterminal-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpfwd%2Fterminal-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfwd%2Fterminal-setup/lists"}