{"id":37095707,"url":"https://github.com/nobl9/sloctl","last_synced_at":"2026-02-27T10:18:39.665Z","repository":{"id":59346423,"uuid":"335407585","full_name":"nobl9/sloctl","owner":"nobl9","description":"A command line tool to cast SLO spells 🪄","archived":false,"fork":false,"pushed_at":"2026-01-12T15:48:27.000Z","size":802111,"stargazers_count":39,"open_issues_count":5,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-12T19:48:08.676Z","etag":null,"topics":["cli","go","golang","nobl9","reliability","slo","sre"],"latest_commit_sha":null,"homepage":"https://docs.nobl9.com/sloctl-user-guide","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nobl9.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-02T19:57:29.000Z","updated_at":"2026-01-12T12:52:31.000Z","dependencies_parsed_at":"2023-02-08T20:00:16.902Z","dependency_job_id":"a7e65638-8392-4e45-9958-64b16f876a0f","html_url":"https://github.com/nobl9/sloctl","commit_stats":null,"previous_names":[],"tags_count":132,"template":false,"template_full_name":null,"purl":"pkg:github/nobl9/sloctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nobl9%2Fsloctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nobl9%2Fsloctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nobl9%2Fsloctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nobl9%2Fsloctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nobl9","download_url":"https://codeload.github.com/nobl9/sloctl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nobl9%2Fsloctl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"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":["cli","go","golang","nobl9","reliability","slo","sre"],"created_at":"2026-01-14T11:47:39.188Z","updated_at":"2026-01-14T11:47:39.758Z","avatar_url":"https://github.com/nobl9.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable line-length html --\u003e\n\u003ch1 align=\"center\"\u003e\n   \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nobl9/sloctl/assets/48822818/cef721c7-1394-4120-80d1-a5e6eb7c7b7e\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/nobl9/sloctl/assets/48822818/e137ac37-a299-4a24-951d-197642d31b1a\"\u003e\n      \u003cimg alt=\"N9\" src=\"https://github.com/nobl9/sloctl/assets/48822818/e137ac37-a299-4a24-951d-197642d31b1a\" width=\"500\" /\u003e\n   \u003c/picture\u003e\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003cimg alt=\"checks\" src=\"https://github.com/nobl9/sloctl/actions/workflows/checks.yml/badge.svg?event=push\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg alt=\"tests\" src=\"https://github.com/nobl9/sloctl/actions/workflows/unit-tests.yml/badge.svg?event=push\"\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cimg alt=\"vulnerabilities\" src=\"https://github.com/nobl9/sloctl/actions/workflows/vulns.yml/badge.svg?event=push\"\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\u003c!-- markdownlint-enable line-length html --\u003e\n\nSloctl is a command-line interface (CLI) for [Nobl9](https://www.nobl9.com/).\nYou can use sloctl to manage multiple Nobl9 configuration objects\nsuch as [SLOs](https://docs.nobl9.com/getting-started/nobl9-resources/slo),\n[Projects](https://docs.nobl9.com/getting-started/nobl9-resources/projects)\nor [Alert Policies](https://docs.nobl9.com/getting-started/nobl9-resources/alert-policies).\n\nThe web user interface is available to give you an easy way to create\nand update SLOs and other resources, while sloctl aims to provide a\nsystematic and automated approach to maintaining SLOs as code.\n\nYou can use it in CI/CD or your terminal power-user workflows :fire:\n\n## Usage\n\nSloctl includes built-in documentation for each command, to access it, run:\n\n```shell\nsloctl \u003ccommand\u003e --help\n```\n\nFor more details check out\n[sloctl user guide](https://docs.nobl9.com/sloctl-user-guide).\n\nIf you want to learn how to fully tame the sloctl's potential, see\n[recipes](#recipes) section below.\n\n## Install\n\n### Script\n\nThe script requires bash and a minimal set of GNU utilities.\nOn Windows it will work with either MinGW or Cygwin.\nYou can either pipe it directly into bash or download the file and run it manually.\n\n```bash\n# Using curl:\ncurl -fsSL https://raw.githubusercontent.com/nobl9/sloctl/main/install.bash | bash\n\n# On systems where curl is not available:\nwget -O - -q https://raw.githubusercontent.com/nobl9/sloctl/main/install.bash | bash\n\n# If you prefer to first download the script, inspect it and then run it:\ncurl -fsSL -o install.bash https://raw.githubusercontent.com/nobl9/sloctl/main/install.bash\n# Or with wget:\nwget -O install.bash -q https://raw.githubusercontent.com/nobl9/sloctl/main/install.bash\n# Once downloaded, set execution permissions:\nchmod 700 install.bash\n# The script is well documented and comes with additional options.\n# You can display the help message by running:\n./install.bash --help\n```\n\n### Prebuilt Binaries\n\nThe binaries are available at\n[Releases](https://github.com/nobl9/sloctl/releases/latest) page.\n\n### Go install\n\n```shell\ngo install github.com/nobl9/sloctl/cmd/sloctl@latest\n```\n\n### Homebrew\n\n```shell\nbrew tap nobl9/sloctl\nbrew install sloctl\n```\n\n### Docker\n\nSloctl official images are hosted on [hub.docker.com](https://hub.docker.com/r/nobl9/sloctl).\n\nHere's an example workflow for managing Project object:\n\n1. Export sloctl access keys through environment variables.\n\n   ```shell\n   export SLOCTL_CLIENT_ID=\u003cyour-client-id\u003e\n   export SLOCTL_CLIENT_SECRET=\u003cyour-client-secret\u003e\n   ```\n\n2. Create a sample Project object and save it to `project.yaml` file.\n\n   ```shell\n   cat \u003c\u003c EOF \u003e project.yaml\n   apiVersion: n9/v1alpha\n   kind: Project\n   metadata:\n     displayName: My Project\n     name: my-project\n   spec:\n     description: Just and example Project :)\n   EOF\n   ```\n\n3. Apply the project from `project.yaml`.\n   To keep STDIN open and allow piping the contents of `project.yaml` into\n   the `docker run` command, use interactive mode with `docker run`.\n\n   ```shell\n   cat project.yaml | docker run --rm -i \\\n     -e SLOCTL_CLIENT_ID=${SLOCTL_CLIENT_ID} \\\n     -e SLOCTL_CLIENT_SECRET=${SLOCTL_CLIENT_SECRET} \\\n     nobl9/sloctl apply -f -\n   ```\n\n4. Fetch the applied Project.\n\n   ```shell\n   docker run --rm \\\n     -e SLOCTL_CLIENT_ID=${SLOCTL_CLIENT_ID} \\\n     -e SLOCTL_CLIENT_SECRET=${SLOCTL_CLIENT_SECRET} \\\n     nobl9/sloctl get project my-project\n   ```\n\n5. Remove the Project.\n\n   ```shell\n   docker run --rm \\\n     -e SLOCTL_CLIENT_ID=${SLOCTL_CLIENT_ID} \\\n     -e SLOCTL_CLIENT_SECRET=${SLOCTL_CLIENT_SECRET} \\\n     nobl9/sloctl delete project my-project\n   ```\n\n### Build Docker image locally\n\n1. Download Dockerfile and latest linux sloctl binary from the Releases page.\n   Make sure they are in your working directory.\n2. Build the image:\n\n   ```shell\n   docker build -t \u003cNAME_YOUR_IMAGE\u003e .\n   ```\n\n3. Set environment variables if you plan to use them for authenticating with SLOCTL.\n   Reference the [sloctl environment variables Doc](https://docs.nobl9.com/sloctl-user-guide/#configure-sloctl-with-environmental-variables).\n4. Run the image:\n\n   ```shell\n   docker run\n   -e SLOCTL_CLIENT_ID=$SLOCTL_CLIENT_ID \\\n   -e SLOCTL_CLIENT_SECRET=$SLOCTL_CLIENT_SECRET \\\n   \u003cYOUR_IMAGE_NAME\u003e get slos --no-config-file\n   ```\n\n### Recipes\n\nPrerequisites:\n\n- [jq](https://github.com/jqlang/jq), a popular command-line JSON processor.\n- [yq](https://github.com/kislyuk/yq) is wrapper over jq,\n  it extends jq's capabilities with YAML support.\n\n1. Filter out SLOs with specific integration (_prometheus_ in this example):\n\n    ```shell\n    sloctl get slos -A --jq '\n    [ .[] | select(\n      .spec.objectives[] |\n        (.rawMetric and .rawMetric.query[\"prometheus\"])\n        or\n        (.countMetrics and .countMetrics.total[\"prometheus\"])\n    )]'\n    ```\n\n2. Count SLOs per integration:\n\n    ```shell\n    sloctl get slo -A -o json --jq '\n      .[] |\n      first(.. | (.query? // .total?) |\n      select(type == \"object\") |\n      keys[0])\n    ' |\n    sort |\n    uniq -c |\n    sort -nr\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnobl9%2Fsloctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnobl9%2Fsloctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnobl9%2Fsloctl/lists"}