{"id":18466799,"url":"https://github.com/ivanklee86/argonap","last_synced_at":"2025-07-14T15:08:41.943Z","repository":{"id":251830823,"uuid":"838295027","full_name":"ivanklee86/argonap","owner":"ivanklee86","description":"CLI to make 🐙 take a quick 💤","archived":false,"fork":false,"pushed_at":"2025-07-10T04:00:38.000Z","size":280,"stargazers_count":4,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-10T13:08:16.087Z","etag":null,"topics":["argocd","cicd","deployments","platform-engineering"],"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/ivanklee86.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,"zenodo":null}},"created_at":"2024-08-05T10:55:57.000Z","updated_at":"2025-02-24T09:01:37.000Z","dependencies_parsed_at":"2024-10-25T03:18:47.969Z","dependency_job_id":"563092b4-2351-414a-abb5-9aa277e1a55b","html_url":"https://github.com/ivanklee86/argonap","commit_stats":null,"previous_names":["ivanklee86/argocd_client","ivanklee86/octanap","ivanklee86/argonap"],"tags_count":5,"template":false,"template_full_name":"ivanklee86/template_go","purl":"pkg:github/ivanklee86/argonap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanklee86%2Fargonap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanklee86%2Fargonap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanklee86%2Fargonap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanklee86%2Fargonap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanklee86","download_url":"https://codeload.github.com/ivanklee86/argonap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanklee86%2Fargonap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265311872,"owners_count":23745161,"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":["argocd","cicd","deployments","platform-engineering"],"created_at":"2024-11-06T09:17:32.112Z","updated_at":"2025-07-14T15:08:41.923Z","avatar_url":"https://github.com/ivanklee86.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# argonap\n\n![GitHub Release](https://img.shields.io/github/v/release/ivanklee86/argonap)[![CI](https://github.com/ivanklee86/argonap/actions/workflows/ci.yaml/badge.svg)](https://github.com/ivanklee86/argonap/actions/workflows/ci.yaml) [![codecov](https://codecov.io/gh/ivanklee86/argonap/graph/badge.svg?token=KEWN2E756X)](https://codecov.io/gh/ivanklee86/argonap)[![Go Reference](https://pkg.go.dev/badge/github.com/ivanklee86/argonap.svg)](https://pkg.go.dev/github.com/ivanklee86/argonap)\n\n![Example](docs/images/example.png)\n\nCLI to make 🐙 take a quick 💤\n\naka\n\nArgoCD [SyncWindows](https://argo-cd.readthedocs.io/en/stable/user-guide/sync_windows/) are great for addressing those whacky situations that somehow pop up in real life:\n- Holidays\n- Failovers\n- Maintainance\n- Emergencies where you just want to run lots and lots of `kubectl` commands\n- Some (or all) of the above!🤣\n\n`argonap` allows you to create and clear SyncWindows across multiple projects from the comfort of the command line.\n\n## Installation\n\n### Homebrew\n```sh\nbrew tap ivanklee86/homebrew-tap\nbrew install ivanklee86/tap/argonap\n```\n\n### Docker Image\n```sh\ndocker run -it --rm ghcr.io/ivanklee86/argonap:latest\n```\n\n### Go\n```sh\ngo install github.com/ivanklee86/argonap@latest\n```\n\n## Authentication\n\n`argonap` uses a JWT to authenticate to ArgoCD.  This can be configured in the Helm chart as follows:\n\n```YAML\nconfigs:\n  cm:\n    accounts.YOUR_ACCOUNT_NAME: apiKey\n\n  rbac:\n    policy.csv: |\n      p, role:argonap, projects, get, *, allow\n      p, argonap, projects, update, *, allow\n      g, YOUR_ACCOUNT_NAME, role:argonap\n```\n\nA JWT can be then generated using the ArgoCD CLI using the following command:\n```shell\nargocd login # Using username/password or SSO\nargocd account generate-token --account YOUR_ACCOUNT\n```\n\n`argonap` flags can be set via environment variables with the format `ARGONAP_[flag but replace - with _]` e.g. `ARGONAP_AUTH_TOKEN`.  This allows you to store the auth token securely and pass it to the CLI using your favorite local secrets solution (e.g. [1Password CLI](https://developer.1password.com/docs/cli/secret-references))\n\n## Selection\n\nProjects can be selected by the following CLI flags.  Flags can be used multiple times.\n- `--name` will cause `argonap` to only make changes to the target AppProject(s).\n- `--label` will only select AppProjects where all labels are matched.  Labels should be in format `key=value`.  Using this flag multiple times will select projects that match all specified labels.\n\nPassing no options will run the command on all projects.\n\n## Usage\n\n### `set`\n\nThe `set` command takes a file that contain a list SyncWindows to add to projects matching the selection criteria.  The file should be a JSON file containing items that match the [SyncWindows struct](https://pkg.go.dev/github.com/argoproj/argo-cd@v1.8.7/pkg/apis/application/v1alpha1#SyncWindow).\n\nExample file:\n```json\n[\n    {\n        \"kind\": \"deny\",\n        \"schedule\": \"00 3 * * *\",\n        \"duration\": \"1h\",\n        \"namespaces\": [\"*\"]\n    }\n]\n```\n\n#### Help\n```\nSet SyncWindows from file\n\nUsage:\n  argonap set [flags]\n\nFlags:\n      --file string   Path to file with SyncWindows to configure\n  -h, --help          help for set\n\nGlobal Flags:\n      --auth-token string       JWT Authentication Token\n      --insecure                Don't validate SSL certificate on client request\n      --label strings           Labels to filter projects on in format 'key=value'.  Can be used multiple times.\n      --name strings            Project names to update.  If specified, label filtering will not apply.  Can be used multiple times.\n      --server-address string   ArgoCD server address\n      --timeout int             Context timeout in seconds. (default 240)\n      --workers int             # of parallel workers. (default 4)\n```\n\n### `clear`\n\nThe `clear` command removes **all** SyncWindows on projects matching selection criteria.\n\n\n#### Help\n```\nClear SyncWindows on all AppProjects.\n\nUsage:\n  argonap clear [flags]\n\nFlags:\n  -h, --help   help for clear\n\nGlobal Flags:\n      --auth-token string       JWT Authentication Token\n      --insecure                Don't validate SSL certificate on client request\n      --label strings           Labels to filter projects on in format 'key=value'.  Can be used multiple times.\n      --name strings            Project names to update.  If specified, label filtering will not apply.  Can be used multiple times.\n      --server-address string   ArgoCD server address\n      --timeout int             Context timeout in seconds. (default 240)\n      --workers int             # of parallel workers. (default 4)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanklee86%2Fargonap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanklee86%2Fargonap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanklee86%2Fargonap/lists"}