{"id":23692503,"url":"https://github.com/yext/sud","last_synced_at":"2026-01-17T08:30:22.229Z","repository":{"id":48390260,"uuid":"283018946","full_name":"yext/sud","owner":"yext","description":"Solution updater","archived":false,"fork":false,"pushed_at":"2023-07-12T21:28:18.000Z","size":221,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-30T03:28:19.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/yext.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-07-27T21:18:59.000Z","updated_at":"2021-09-30T02:16:16.000Z","dependencies_parsed_at":"2022-09-26T18:10:46.687Z","dependency_job_id":null,"html_url":"https://github.com/yext/sud","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yext%2Fsud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yext%2Fsud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yext%2Fsud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yext%2Fsud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yext","download_url":"https://codeload.github.com/yext/sud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239758828,"owners_count":19692033,"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":[],"created_at":"2024-12-30T03:28:24.405Z","updated_at":"2026-01-17T08:30:20.092Z","avatar_url":"https://github.com/yext.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sud\n![Test](https://github.com/yext/sud/workflows/Test/badge.svg)\n[![Release][s0]][l0]\n\n[s0]: https://github.com/yext/sud/workflows/Release/badge.svg\n[l0]: https://github.com/yext/sud/actions\n\n\nsud OR solution updater updates solutions by running the command on the file in the given repositories.\n\nRepositories are space separated list of directories or github repository URLs.\n\nA repository can be one of the following:\n 1. A directory on your file system such as ~/repos/my-solution-dir\n 2. A url to github repository such as https://github.com/MyOrgIsHere/asbTest\n 3. A wildcard such as https://github.com/MyOrgIsHere/asbTest* that will be expanded to matched repositories\n\nFor example:\n\n```bash\nsud replace default/km/*.json \\\n  --value \"\\\"yext/atm\\\"\" \\\n  --path /primaryEntityType \\\n  \"https://github.com/MyOrgIsHere/asb*\" \\\n  --push\n```\n\nwill make the change in the matching files in all the matching repositories and push to github.\n\nNote: To avoid bash expansions, please quote the arguments. To consider bash expansions, please keep the arguments with wildcards unquoted.\n\nUsage:\n  sud [command]\n\nAvailable Commands:\n  add         adds a file, or a path in a file, in the given list of repositories\n  help        Help about any command\n  move        moves a file, or a path in a file, in the given list of repositories\n  remove      removes a file, or a path in a file, in the given list of repositories\n  rename      renames a file, or a path in a file, in the given list of repositories\n  replace     replaces a file, or a path in a file, in the given list of repositories\n\nFlags:\n  -h, --help   help for sud\n      --push   Whether to push the repo to github\n\nUse \"sud [command] --help\" for more information about a command.\n\n## Table of Contents\n\n* [Install](#install)  \n* [Update](#update)\n* [Access](#access)\n* [Run](#run)\n\n## Install\n\nSud requires Mac OS or Go 1.7 or higher.\n\n    brew install yext/tap/sud\n    go get github.com/yext/sud\n\n## Update\n\nTo update an existing install to the latest version of Sud, run:\n\n    brew upgrade yext/tap/sud\n    go get -u github.com/yext/sud\n## Access\nPlease make sure you have access to push to the repositories you are trying to update using Sud.\nTo update Github repos in specific orgs, you may need to create a personal token that has permissions to push to the repos: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token\n\n## Run\n### `sud rename` command\n\nsud rename --help\nRenames a file, or a path in a file, in the given repositories:\n\nRenames the given file in all the given repositories, if the file is present.\nRenames within a file if the path flag is provided.\n\nExamples:\n\nRenaming a File:\n\n```bash\nsud rename dependencies.json \\\n  --value foo.json \\\n  ~/repos/ans*\n```\nwill rename dependencies.json to foo.json in all ~/repos/ans* directories.\n\nRenaming a Path:\n\n```bash\nsud rename km/*/*.json \\\n  --path /apiName \\\n  --value \"\\$id\" \\\n  ~/repos/ans*\n```\nwill replace \"apiName\" with \"$id\" in km/*/*.json files in all ~/repos/ans* directories:\n\n{ \"apiName\": \"123\" } =\u003e { \"$id\": \"123\" }\n\nUsage:\n  sud rename FILE_PATH DIRs... [flags]\n\nFlags:\n  -h, --help           help for rename\n  -p, --path string    The path to the json pointer in the file as per https://tools.ietf.org/html/rfc6901\n  -v, --value string   The desired value\n\nGlobal Flags:\n      --push   Whether to push the repo to github\n\n### `sud move` command\n\nMoves a file, or a path in a file, in the given repositories :\n\nMoves the given file in all the given repositories, if the file is present.\nMoves within a file if the path flag is provided.\n\nExamples:\n\nMoving a File:\n\n```bash\nsud move km/entity-type/atm.json \\\n  --value km/entity-type-extension/atm.json \\\n  ~/repos/ans150-front-end-overview \\\n  ~/repos/kg*\n```\nwill move km/entity-type/atm.json to km/entity-type-extension/atm.json in the ans150-front-end-overview repo as well as any kg* repos.\n\nMoving within a File:\n\n```bash\nsud move \\\n  --path /a/b/c \\\n  --value /a/d \\\n  ~/repos/ans150-front-end-overview\n```\nwill move the JSON element specified by the JSON pointer /a/b/c to /a/d in the provided directories:\n\n{\n  \"a\": {\n    \"b\": {\n\t  ...\n\t  c: {...}\n\t}\n  }\n}\n\nbecomes:\n\n{\n  \"a\": {\n\t\"b\": {\n\t  ...\n\t},\n\t\"d:\" {...}\n  }\n}\n\nUsage:\n  sud move FILE_PATH DIRs... [flags]\n\nFlags:\n  -h, --help           help for move\n  -p, --path string    The path to the json pointer in the file as per https://tools.ietf.org/html/rfc6901\n  -v, --value string   The desired value\n\nGlobal Flags:\n      --push   Whether to push the repo to github\n\n### `sud add` command\n\nAdds a file, or a path in a file, in the given repositories :\n\n - Adds the given file in all the given repositories. It adds only if the file is not already present.\n - Adds within a file if the path flag is provided.\n\nThe value provided should conform to the intended type.\nFor example,\n 1. to add a number would be --value=304\n 2. to add string would be --value=\\\"my-string\\\" (escape the quote in bash)\n 3. to add an array would be --value=\"[1, 2]\"\n\nInstead of providing a value you can also provide a file path of a file that has the desired value.\n\nExamples:\n\nAdding a File:\n\n```bash\nsud add foo.json \\\n  --file bar.json \\\n  ~/repos/ans150-front-end-overview\n```\nwill add a file foo.json with the contents of the provided bar.json to ~/repos/ans150-front-end-overview.\n\nAdding a Path:\n\n```bash\nsud add dependencies.json \\\n  --path /productFeatureIds/- \\\n  --values 304,305 \\\n  ~/repos/ans150-front-end-overview\n```\nwill add product features 304 and 305 to ~repos/ans150-front-end-overview/dependencies.json:\n\n{ \"productFeatureIds\": [1, 2] } =\u003e { \"productFeatureIds\": [1, 2, 304, 305] }\n\nUsage:\n  sud add FILE_PATH DIRs... [flags]\n\nFlags:\n  -f, --file string      The file with the desired value\n  -h, --help             help for add\n  -p, --path string      The path to the json pointer in the file as per https://tools.ietf.org/html/rfc6901\n  -v, --value string     The desired value\n  -l, --values strings   The desired list of values\n\nGlobal Flags:\n      --push   Whether to push the repo to github\n      \n### `sud remove` command\n\nRemoves a file, or a path in a file, in the given repositories :\n\nRemoves the given file in all the given repositories, if the file is present.\nRemoves within a file if the path flag is provided.\nIf value is provided along with the path, then removes only the provided value, if present at the path. (Currently, only removing a number from an array is supported.)\n\nExamples:\n\nRemove a File:\n\n```bash\nsud remove dependencies.json \\\n  ~/repos/ans150-front-end-overview \\\n  ~/repos/kg*\n```\nRemoves dependencies.json from all of the specified directories.\n\nRemoving a Value in a File:\n\n```bash\nsud remove dependencies.json \\\n  --path /productFeatureIds \\\n  --value 304 \\\n  ~/repos/ans150-front-end-overview \\\n  ~/repos/kg*\n```\nwill remove product feature 304 from dependencies.json in all the specified directories:\n\n{ \"productFeatureIds\": [1, 2, 304] } =\u003e { \"productFeatureIds\": [1 ,2] }\n\n\nRemoving fields from entities:\n\n```bash\nsud remove default/km/entity/*.json \\\n  --path /content/facebookParentPageId \\\n  ~/repos/kg*\n```\nwill remove the given field from all the entities in the matched directories.\n\nUsage:\n  sud remove FILE_PATH DIRs... [flags]\n\nFlags:\n  -f, --file string      The file with the desired value\n  -h, --help             help for remove\n  -p, --path string      The path to the json pointer in the file as per https://tools.ietf.org/html/rfc6901\n  -v, --value string     The desired value\n  -l, --values strings   The desired list of values\n\nGlobal Flags:\n      --push   Whether to push the repo to github\n      \n### `sud replace` command\n\nReplaces a file, or a path in a file, in the given repositories :\n\n - Replaces the given file in all the given repositories. It does nothing if the file is not present.\n - Replaces within a file if the path flag is provided.\n\nThe value provided should conform to the intended type.\nFor example,\n 1. to replace a number would be --value=304\n 2. to replace string would be --value=\\\"my-string\\\" (escape the quote in bash)\n 3. to replace an array would be --value=\"[1, 2]\"\n\nInstead of providing a value you can also provide a file path of a file that has the desired value.\n\nExamples:\n\nReplacing a File:\n\n```bash\nsud replace pages/page-builder/template/page.json \\\n  --file new-page.json \\\n  ~/repos/pgs*\n```\n\nwill replace pages/page-builder/template/page.json with the contents of new-page.json in all ~/repos/pgs* directories.\n\nReplacing a Path:\n\n```bash\nsud replace km/*/hotel.json \\\n  --path \"/\\$id\" \\\n  --value \"\\\"my_hotel\\\"\" \\\n  ~/repos/kg122-intro-to-fields\n```\n\nwill replace the value at path /$id with \"my_hotel\" in ~/repos/kg122-intro-to-fields/km/entity-type-extension/hotel.json\n\n```bash\nsud replace km/*/hotel.json \\\n  --path /enabled \\\n  --value true \\\n  ~/repos/kg122-intro-to-fields\n```\n\nwill replace the value at path /enabled with true in ~/repos/kg122-intro-to-fields/km/entity-type-extension/hotel.json\n\nUsage:\n  sud replace FILE_PATH DIRs... [flags]\n\nFlags:\n  -f, --file string    The file with the desired value\n  -h, --help           help for replace\n  -p, --path string    The path to the json pointer in the file as per https://tools.ietf.org/html/rfc6901\n  -v, --value string   The desired value\n\nGlobal Flags:\n      --push   Whether to push the repo to github\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyext%2Fsud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyext%2Fsud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyext%2Fsud/lists"}