{"id":37086423,"url":"https://github.com/opsani/cli","last_synced_at":"2026-01-14T10:37:54.519Z","repository":{"id":57543300,"uuid":"253713758","full_name":"opsani/cli","owner":"opsani","description":"Opsani cloud optimization in your terminal","archived":true,"fork":false,"pushed_at":"2021-04-11T22:26:51.000Z","size":505,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-06-21T13:21:53.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opsani.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opsani.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04-07T07:04:00.000Z","updated_at":"2024-06-11T18:50:06.000Z","dependencies_parsed_at":"2022-08-27T19:10:26.333Z","dependency_job_id":null,"html_url":"https://github.com/opsani/cli","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/opsani/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsani%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsani%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsani%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsani%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opsani","download_url":"https://codeload.github.com/opsani/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsani%2Fcli/sbom","scorecard":{"id":711089,"data":{"date":"2025-08-11","repo":{"name":"github.com/opsani/cli","commit":"df157baea250779f6c3487c49bf2fbf7ce68b194"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.2.2 not signed: https://api.github.com/repos/opsani/cli/releases/27643576","Warn: release artifact v0.2.1 not signed: https://api.github.com/repos/opsani/cli/releases/27535589","Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/opsani/cli/releases/27528797","Warn: release artifact v0.1.4 not signed: https://api.github.com/repos/opsani/cli/releases/27286894","Warn: release artifact v0.1.3 not signed: https://api.github.com/repos/opsani/cli/releases/26828754","Warn: release artifact v0.2.2 does not have provenance: https://api.github.com/repos/opsani/cli/releases/27643576","Warn: release artifact v0.2.1 does not have provenance: https://api.github.com/repos/opsani/cli/releases/27535589","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/opsani/cli/releases/27528797","Warn: release artifact v0.1.4 does not have provenance: https://api.github.com/repos/opsani/cli/releases/27286894","Warn: release artifact v0.1.3 does not have provenance: https://api.github.com/repos/opsani/cli/releases/26828754"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/opsani/cli/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/opsani/cli/go.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:15: pin your Docker image by updating golang:alpine to golang:alpine@sha256:244baa35bcfaf9a5b3444519df6d42554a1f92dc33820bd98f0662df270d8a6a","Warn: containerImage not pinned by hash: demo/app/Dockerfile:1: pin your Docker image by updating golang:1.14-alpine to golang:1.14-alpine@sha256:e196a762bd349b188d66c539354fc23f0e5a0178c214e6dfe4d7894c3c2753f1","Warn: containerImage not pinned by hash: demo/servo/Dockerfile:1: pin your Docker image by updating golang:1.14-alpine to golang:1.14-alpine@sha256:e196a762bd349b188d66c539354fc23f0e5a0178c214e6dfe4d7894c3c2753f1","Warn: containerImage not pinned by hash: vital/Dockerfile:1: pin your Docker image by updating golang:1.14-alpine to golang:1.14-alpine@sha256:e196a762bd349b188d66c539354fc23f0e5a0178c214e6dfe4d7894c3c2753f1","Warn: goCommand not pinned by hash: demo/servo/Dockerfile:9","Warn: goCommand not pinned by hash: demo/servo/Dockerfile:10","Warn: pipCommand not pinned by hash: demo/servo/Dockerfile:23","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 containerImage dependencies pinned","Info:   1 out of   3 goCommand dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"33 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2021-0108 / GHSA-9cx9-x2gp-9qvh","Warn: Project is vulnerable to: GHSA-3q5p-3558-364f","Warn: Project is vulnerable to: GO-2024-2959 / GHSA-98j2-3j3p-fw2v","Warn: Project is vulnerable to: GO-2025-3706","Warn: Project is vulnerable to: GO-2022-0322 / GHSA-cg3q-j54f-5p7p","Warn: Project is vulnerable to: GO-2022-0355 / GHSA-fx95-883v-4q4h","Warn: Project is vulnerable to: GO-2021-0059 / GHSA-w942-gw6m-p62c","Warn: Project is vulnerable to: GO-2022-0957 / GHSA-wjm3-fq3r-5x46","Warn: Project is vulnerable to: GO-2021-0054 / GHSA-p64j-r5f4-pwwx","Warn: Project is vulnerable to: GO-2021-0265 / GHSA-ppj4-34rq-v8j9","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2022-0411 / GHSA-3839-6r69-m497 / GHSA-xg2h-wx96-xgxr","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T08:13:15.582Z","repository_id":57543300,"created_at":"2025-08-22T08:13:15.583Z","updated_at":"2025-08-22T08:13:15.583Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:25:19.714Z","status":"ssl_error","status_checked_at":"2026-01-14T10:22:49.371Z","response_time":107,"last_error":"SSL_read: 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":[],"created_at":"2026-01-14T10:37:53.844Z","updated_at":"2026-01-14T10:37:54.513Z","avatar_url":"https://github.com/opsani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Opsani CLI\n![Tests](https://github.com/opsani/cli/workflows/Tests/badge.svg)\n\nOpsani CLI is cloud optimization in your terminal. It brings a suite of tools\nfor configuring \u0026 deploying servos, managing optimization runs, and interacting\nwith the optimization engine to your command line.\n\n## Status\n\nOpsani CLI is an early stage project in active development.\n\nWe need your feedback to determine how best to evolve the tool.\n\nIf you run into any bugs or think of a feature you'd like to see, please file a\nticket on GitHub.\n\n## Usage\n\nThe CLI currently supports controling optimization lifecycle, managing\nconfiguration, and building servo artifacts for connecting new apps to Opsani\nfor optimization.\n\nTo perform any meaningful work, you must first initialize the client via `opsani\ninit` and supply details about your optimizer and API token.\n\nOnce initialized, you can work with the optimizer using the subcommands of `opsani optimizer`.\n\nHelp is available via `opsani --help`.\n\n### Environment Variables\n\nOpsani CLI respects a few key environment variables, when present:\n\n| Variable | Description |\n|----------|-------------|\n| `OPSANI_OPTIMIZER` | Sets the optimizer to interact with |\n| `OPSANI_TOKEN` | Sets the API authentication token |\n| `OPSANI_BASE_URL` | Sets the base URL for reaching Opsani API |\n| `OPSANI_PROFILE` | Sets the profile to use (implies an optimizer, servo, token, and base URL) |\n\n### Persistent \u0026 Ad-hoc Invocations\n\nThe Opsani CLI is designed to be a flexible utility that is useful in day to day\ndevelopment \u0026 administration activities and suitable for integration into automated\nworkflows. The CLI can maintain a persistent configuration in ~/.opsani or can be\nconfigured via environment variables and CLI arguments for automation tasks.\n\nCertain functionality such as the profile and servo registries are dependent on\npersistent storage and will emit an error if they are unavailable due to a configuration\nfile not found condition.\n\n### Profiles\n\nTo support users who work across a number of Opsani implementations, the CLI supports\nnamed profiles. When the client is initialized, the first profile is named \"default\"\nand is auto-selected when no profile argument is supplied. Profiles can be managed via\nthe `opsani profile` subcommands.\n\n## Documentation\n\nThe primary source of documentation at this stage is this README and the CLI help text.\n\n## Installation\n\nOpsani CLI is distributed in several forms to support easy installation.\n\n### macOS (Homebrew)\n\nBuilds for macOS systems can be installed via Homebrew:\n\n```console\n$ brew tap opsani/tap\n$ brew install opsani-cli\n```\n\n### Windows (scoop)\n\nBuilds for Windows systems are available via scoop:\n\n```console\n$ scoop bucket add opsani https://github.com/opsani/scoop-bucket.git\n$ scoop install opsani-cli\n```\n\n**NOTE**: Opsani Ignite requires a hypervisor to run minikube virtualization. Microsoft provides the Hyper-V\nhypervisor for modern version of Windows that can be installed via PowerShell. Install Hyper-V using the instructions\nat the Microsoft [Hyper-V Quick Start](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v#enable-hyper-v-using-powershell) page.\n\n### Linux\n\nBinary packages for Linux are available in RPM and DEB package formats.\nDownload the appropriate package for your distribution of the [latest release](https://github.com/opsani/cli/releases/latest)\nand then install as detailed below.\n\n#### Debian/Ubuntu Linux\n\n`$ sudo apt install ./opsani-cli_*_linux_amd64.deb`\n\n#### Fedora Linux\n\n`$ sudo dnf install opsani-cli_*_linux_amd64.rpm`\n\n#### Centos Linux\n\n`$ sudo yum localinstall opsani-cli_*_linux_amd64.rpm`\n\n#### openSUSE/SUSE Linux\n\n`$ sudo zypper in opsani-cli_*_linux_amd64.rpm`\n\n### Binary Releases\n\nVersioned binaries for all platforms are distributed via GitHub: https://github.com/opsani/cli/releases.\n\nDownload and install the appropriate build for your platform\n\n### From Source\n\nThe `Makefile` is configured with a `make install` target that will build and\ninstall the CLI into `/usr/local/bin/opsani` on Unixy platforms.\n\n## Running via Docker\n\nContainerized releases of Opsani CLI are pushed to the Opsani organization on Docker Hub.\nTo retrieve the latest container image:\n\n```console\n$ docker pull opsani/cli:latest\nor\n$ make image\n```\n\nOnce the image is pulled, configuration must be provided to enable the CLI to function. There are\na couple of options for supplying the configuration:\n\n1. **CLI Arguments** - Arguments can be directly supplied to the CLI via the Docker invocation: \n`docker run -it --rm --name opsani-cli opsani/cli:latest --optimizer example.com/app --token 123456`\n2. **Environment Variables** - Export `OPSANI_OPTIMIZER` and `OPSANI_TOKEN` into your shell and pass them\nthrough to the container: `docker run -it --rm --name opsani-cli -e OPSANI_OPTIMIZER=$OPSANI_OPTIMIZER -e OPSANI_TOKEN=$OPSANI_TOKEN opsani/cli:latest`\n3. **Config Volume** - Existing configuration files in your home directory can be shared with the container through a\nvolume mount: `docker run -it --rm --name opsani-cli -v ~/.opsani:/root/.opsani opsani/cli:latest`\n\nCommands can then be appended to the end of the command just as when executing in a local shell.\n\nNote that running under a container for day to day work is typically unnecessary and inconvenient\nas Opsani CLI is distributed as a single statically linked binary.\n\n### Building a local image\n\nThis repository includes a Dockerfile for building and running Opsani CLI in a\ncontainer. To build the image from the Dockerfile:\n\n```console\n$ docker build . -t opsani/cli:latest\n```\n\n## Development\n\nOpsani CLI is implemented in Golang and utilizes a handful of well established\nlibraries including Cobra, Viper, and Resty. Anyone reasonably well versed in Go\nshould have no trouble following along.\n\nThere is a Makefile for running typical tasks but `go run .` is a great way to\npoke around.\n\n## Testing\n\nOpsani CLI has extensive automated test coverage. Unit tests exist alongside the\ncode under test and there are integration tests in the `integration` directory.\n\nTesting assertions and mocks are provided by the\n[Testify](https://github.com/stretchr/testify) library. Tests are organized\nusing the `testify.suite` package to provide familiar xUnit testing primitives.\n\nThe local test package contains shared testing helpers useful in both unit and\nintegration test scenarios.\n\nTests can be run via the Makefile:\n\n* `make test` - Run unit \u0026 integration tests.\n* `make test_unit` - Run unit tests.\n* `make test_integration` - Run integration tests.\n\n### Integration Tests\n\nThe integration test harness functions by building the `opsani` binary, copying\nit into a temp directory, and then interacting with it as a subprocess and\nevaluating stdout, stderr, and exit code status.\n\nAPI interactions are mocked locally via an `http.httptest` server that runs in\nthe test executor parent process. The `--base-url` flag is used to direct the\nCLI to interact with the test API server rather than the Opsani API.\n\n## License\n\nOpsani CLI is released under the Apache 2.0 license. See LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsani%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopsani%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsani%2Fcli/lists"}