{"id":18406649,"url":"https://github.com/fedragon/cuttlefish","last_synced_at":"2026-05-15T01:04:14.777Z","repository":{"id":38679942,"uuid":"270298928","full_name":"fedragon/cuttlefish","owner":"fedragon","description":"Switch environment according to current working directory","archived":false,"fork":false,"pushed_at":"2022-06-23T14:58:17.000Z","size":50,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T16:21:57.702Z","etag":null,"topics":["environment","fish","golang","shell","shell-extension"],"latest_commit_sha":null,"homepage":"","language":"Go","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/fedragon.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}},"created_at":"2020-06-07T12:25:41.000Z","updated_at":"2022-08-07T12:05:57.000Z","dependencies_parsed_at":"2022-08-27T00:40:50.437Z","dependency_job_id":null,"html_url":"https://github.com/fedragon/cuttlefish","commit_stats":null,"previous_names":["fedragon/fish-switchenv"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedragon%2Fcuttlefish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedragon%2Fcuttlefish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedragon%2Fcuttlefish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedragon%2Fcuttlefish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fedragon","download_url":"https://codeload.github.com/fedragon/cuttlefish/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248628618,"owners_count":21136119,"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":["environment","fish","golang","shell","shell-extension"],"created_at":"2024-11-06T03:09:57.846Z","updated_at":"2025-10-28T00:41:57.417Z","avatar_url":"https://github.com/fedragon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cuttlefish\n\n![logo](logo.png)\n\nSwitch environment according to current working directory. Heavily inspired by the amazing [direnv](https://direnv.net/), but not limited to environment variables and only targeting [fish shell](https://fishshell.com).\n\n## Features\n\nConfigure any combination of the following in a simple YAML file:\n- ssh identities\n- paths (to append to `$fish_user_paths`, which then becomes a _universal_ variable)\n- global (= universal) variables\n- git user details (name, email address)\n\nWhenever you visit a directory containing a `.cuttlefish.yaml` file, its configuration is applied to your environment.\n\n**Note:** Only subdirectories of the user's home directory are scanned.\n\n## Install\n\n**Note:** The script installs itself in your `~/.config/fish/config.fish`: before doing so, though, it will copy the original file to `~/.config/fish/config.fish_bck` so that it can be restored for any reason (see `install` target in `Makefile` for more details).\n\n### Option 1: Install released binaries\n\nGrab the binaries from the [releases page](https://github.com/fedragon/cuttlefish/releases), uncompress them and run e.g.\n\n```shell\ncd cuttlefish-darwin64\nmake install\n```\n\n### Option 2: Build from sources\n\nThe installation requires Go 1.25+.\n\n```shell\ngit clone https://github.com/fedragon/cuttlefish\ncd cuttlefish\nmake\n```\n\n### Usage\n\nCreate a `.cuttlefish.yaml` in every directory where you want to load a different environment and ensure it is only writable by the current user (`chmod 644 .cuttlefish.yaml`).\n\nThe file should look like this:\n\n```yaml\ngit_config:\n  name: John Doe\n  email: foo@bar.com\nssh_identities:\n  - ~/.ssh/id_rsa1\n  - ~/.ssh/id_rsa2\n# - ...\nuser_paths:\n  - ~/Documents\n  - ~/Desktop\n# - ...\nglobal_variables:\n  FOO: bar\n# x: y\n# ... : ...\n```\n\nAny combination of the above fields is possible and they're all optional. A complete example is available in `examples/cuttlefish.yaml`.\n\n### Uninstall\n\n```shell\ncd cuttlefish\nmake uninstall\n```\n\n## Develop\n\n### Build\n\n```shell\nmake build\n```\n\n### Test\n\n**Note:** This requires a running Docker daemon.\n\n```shell\nmake test\n```\n\n### Release\n\n```shell\nmake release\n```\n\n## Credits\n\nCuttlefish logo made by [Freepik](http://www.freepik.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedragon%2Fcuttlefish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedragon%2Fcuttlefish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedragon%2Fcuttlefish/lists"}