{"id":14988048,"url":"https://github.com/apache/skywalking-cli","last_synced_at":"2025-05-15T08:09:27.106Z","repository":{"id":36014213,"uuid":"218930575","full_name":"apache/skywalking-cli","owner":"apache","description":"Apache SkyWalking CLI","archived":false,"fork":false,"pushed_at":"2025-04-21T04:15:31.000Z","size":901,"stargazers_count":93,"open_issues_count":0,"forks_count":45,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-05-10T17:16:42.639Z","etag":null,"topics":["apm","cli","distributed-tracing","observability","skywalking"],"latest_commit_sha":null,"homepage":"https://skywalking.apache.org/","language":"Go","has_issues":false,"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/apache.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","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":"2019-11-01T06:57:28.000Z","updated_at":"2025-04-21T04:15:31.000Z","dependencies_parsed_at":"2024-12-13T16:07:16.881Z","dependency_job_id":"a385535f-c762-4259-9adc-1c97f3147c68","html_url":"https://github.com/apache/skywalking-cli","commit_stats":{"total_commits":213,"total_committers":18,"mean_commits":"11.833333333333334","dds":0.6338028169014085,"last_synced_commit":"67cbc89dd7b214d5791321a7ca992f940cb586ba"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fskywalking-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fskywalking-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fskywalking-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fskywalking-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/skywalking-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850275,"owners_count":21973661,"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":["apm","cli","distributed-tracing","observability","skywalking"],"created_at":"2024-09-24T14:16:00.336Z","updated_at":"2025-05-15T08:09:27.048Z","avatar_url":"https://github.com/apache.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Apache SkyWalking CLI\n===============\n\n![](https://github.com/apache/skywalking-cli/workflows/Build/badge.svg?branch=master)\n![](https://codecov.io/gh/apache/skywalking-cli/branch/master/graph/badge.svg)\n\n\u003cimg src=\"https://skywalking.apache.org/assets/logo.svg\" alt=\"Sky Walking logo\" height=\"90px\" align=\"right\" /\u003e\n\nThe CLI (Command Line Interface) for [Apache SkyWalking](https://github.com/apache/skywalking).\n\nSkyWalking CLI is a command interaction tool for the SkyWalking user or OPS team, as an alternative besides using\nbrowser GUI. It is based on SkyWalking [GraphQL query protocol](https://github.com/apache/skywalking-query-protocol),\nsame as GUI.\n\n## Install\n\n### Quick install\n\n#### Linux\n\nInstall the latest version with the following command:\n\n```shell\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/apache/skywalking-cli/master/scripts/install.sh)\"\n```\n\n#### MacOS\n\nUse [Homebrew](https://brew.sh/) to install swctl on the macOS.\n\n```shell\nbrew update\nbrew install swctl\n```\n\nBesides that, you could still use the same command in Linux to install it.\n\n#### Windows\n\nNote: you need to start cmd or powershell in administrator mode.\n\n```shell\ncurl -LO \"https://raw.githubusercontent.com/apache/skywalking-cli/master/scripts/install.bat\" \u0026\u0026 .\\install.bat\n```\n\n### Install by available binaries\n\nGo to the [download page](https://skywalking.apache.org/downloads/#SkyWalkingCLI) to download all available binaries,\nincluding macOS, Linux, Windows.\n\n### Build from source\n\nIf you want to try the latest features, you can compile the latest source code and build `swctl` by yourself. Since\nSkyWalking CLI is using `Makefile`, compiling the project is as easy as executing a command in the root directory of the\nproject.\n\n```shell\ngit clone https://github.com/apache/skywalking-cli\ncd skywalking-cli\nmake\n```\n\nThen copy the `./bin/swctl-latest-(darwin|linux|windows)-amd64` to your `PATH` directory according to your OS,\nusually `/usr/bin/` or `/usr/local/bin`.\n\nYou can also copy it to any directory you like, then add that directory to `PATH`. **We recommend you to rename\nthe `swctl-latest-(darwin|linux|windows)-amd64` to `swctl`.**\n\n### Run from Docker image\n\nIf you prefer to use Docker, skywalking-cli also provides Docker images for convenient usages since 0.9.0. We also push\nthe snapshot Docker images to GitHub registry for developers who want to test the latest features, note that this is not\nApache releases, and it's for test only, **DO NOT** use it in your production environment.\n\n```shell\ndocker run -it --rm apache/skywalking-cli service ls\n\n# Or to use the snapshot Docker image\n\ndocker run -it --rm ghcr.io/apache/skywalking-cli/skywalking-cli  service ls\n```\n\n## Autocompletion\n\n`swctl` provides auto-completion support for bash and powershell, which can save you a lot of typing.\n\n### Bash\n\nThe swctl completion script for bash can be generated with the command `swctl completion bash`. Sourcing the completion\nscript in your shell enables swctl auto-completion:\n\n```shell\nswctl completion bash \u003e bash_autocomplete \u0026\u0026\n    sudo cp ./bash_autocomplete /etc/bash_completion.d/swctl \u0026\u0026\n    echo \u003e\u003e ~/.bashrc \u0026\u0026\n    echo \"export PROG=swctl\" \u003e\u003e ~/.bashrc\n```\n\nAfter reloading your shell, swctl auto-completion should be working.\n\n### powershell\n\nSimilarly, run the following command in your powershell terminal to enable auto-completion:\n\n```shell \nset-executionpolicy remotesigned -Scope CurrentUser\nswctl completion powershell \u003e\u003e $profile\n```\n\nIf you get an error like `OpenError: (:) [Out-File], DirectoryNotFoundException`, then you need to run the following\ncommand to create `$profile` file:\n\n```shell\nNew-Item -Type file -Force $profile\n```\n\nAfter reloading your shell, `swctl` auto-completion should be working.\n\n## Help / Manual\n\n`swctl` builds the help manual inside the command itself with some useful example commands, please type `swctl help`\nafter installation. If you want to look up detail manual for a specific sub-command, insert `help` before the last\nsub-command, for example, `swctl service help list` shows the manual for command `swctl service list`,\nand `swctl install manifest help oap` shows the manual for `swctl install manifest oap`.\n\n# More Use Cases\n\n\u003cdetails\u003e\n\u003csummary\u003eReport events in CD workflows - GitHub Actions\u003c/summary\u003e\n\nIntegrate skywalking-cli into your CD workflows to report events, this is an implementation of GitHub Actions, but we\nwelcome you to contribute plugins of other CD platforms, like Jenkins, GitLab, etc.\n\nThe usage of integration for GitHub Actions is as follows.\n\n```yaml\n# ...\n\njobs:\n  deploy:\n    strategy:\n      matrix:\n        instance:\n          - asia-southeast\n          - asia-northeast\n    name: Deploy Product Service\n    runs-on: ubuntu-latest\n    steps:\n      # other steps such as checkout ...\n\n      - name: Wrap the deployment steps with skywalking-cli\n        uses: apache/skywalking-cli@main # we always suggest using a revision instead of `main`\n        with:\n          oap-url: ${{ secrets.OAP_URL }}                       # Required. Set the OAP backend URL, such as example.com:11800\n          auth-token: ${{ secrets.OAP_AUTH_TOKEN }}             # Optional. OAP auth token if you enable authentication in OAP\n          service: product                                      # Required. Name of the service to be deployed\n          instance: ${{ matrix.instance }}                      # Required. Name of the instance to be deployed\n          endpoint: \"\"                                          # Optional. Endpoint of the service, if any\n          message: \"Upgrade from {fromVersion} to {toVersion}\"  # Optional. The message of the event\n          parameters: \"\"                                        # Optional. The parameters in the message, if any\n          layer: \"GENERAL\"                                      # Required. Name of the layer to which the event belongs (case-insensitive)\n\n      # your package / deployment steps... \n```\n\n\u003c/details\u003e\n\n# Compatibility\n\nSkyWalking CLI and SkyWalking OAP communicate with different query versions, here is a summary of the compatible versions of both.\nNote that many queries in older CLI releases can still work with new OAP versions and vice versa because most query APIs are forward-compatible.\nThe compatibility table here only lists fully compatible OAP versions, which mean new query APIs are implemented in this specific version.\n\n| SkyWalking CLI | OAP Server Version |\n|----------------|---------------|\n| \\\u003e = 0.11.0    | \\\u003e = 9.2.0    |\n| \\\u003e = 0.12.0    | \\\u003e = 9.3.0    |\n| \\\u003e = 0.12.0    | \\\u003e = 9.5.0    |\n| \\\u003e = 0.13.0    | \\\u003e = 9.6.0    |\n| \\\u003e = 0.14.0    | \\\u003e = 10.2.0   |\n\n# Contributing\n\nFor developers who want to contribute to this project, see [Contribution Guide](CONTRIBUTING.md)\n\n# License\n\n[Apache 2.0 License.](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fskywalking-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fskywalking-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fskywalking-cli/lists"}