{"id":14988327,"url":"https://github.com/apache/openwhisk-cli","last_synced_at":"2026-01-12T07:38:10.980Z","repository":{"id":19462713,"uuid":"87096114","full_name":"apache/openwhisk-cli","owner":"apache","description":"Apache OpenWhisk Command Line Interface (CLI)","archived":false,"fork":false,"pushed_at":"2024-09-24T14:23:10.000Z","size":35176,"stargazers_count":104,"open_issues_count":112,"forks_count":99,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-04-02T04:07:06.688Z","etag":null,"topics":["apache","deployment","faas","functions","functions-as-a-service","openwhisk","serverless","serverless-functions","tooling"],"latest_commit_sha":null,"homepage":"https://openwhisk.apache.org/","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/apache.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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}},"created_at":"2017-04-03T16:29:00.000Z","updated_at":"2025-03-25T02:39:24.000Z","dependencies_parsed_at":"2024-12-01T10:22:31.282Z","dependency_job_id":null,"html_url":"https://github.com/apache/openwhisk-cli","commit_stats":{"total_commits":549,"total_committers":59,"mean_commits":9.305084745762711,"dds":0.8342440801457195,"last_synced_commit":"23f3cf73b812b75821122d9db94e9eebda6bab54"},"previous_names":["apache/incubator-openwhisk-cli"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/openwhisk-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247714511,"owners_count":20983889,"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":["apache","deployment","faas","functions","functions-as-a-service","openwhisk","serverless","serverless-functions","tooling"],"created_at":"2024-09-24T14:16:32.400Z","updated_at":"2026-01-12T07:38:10.971Z","avatar_url":"https://github.com/apache.png","language":"Go","funding_links":[],"categories":["Go","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003c!--\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n--\u003e\n\n# OpenWhisk Command-line Interface `wsk`\n\n[![Build Status](https://travis-ci.com/apache/openwhisk-cli.svg?branch=master)](https://travis-ci.com/apache/openwhisk-cli)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Join Slack](https://img.shields.io/badge/join-slack-9B69A0.svg)](http://slack.openwhisk.org/)\n[![Twitter](https://img.shields.io/twitter/follow/openwhisk.svg?style=social\u0026logo=twitter)](https://twitter.com/intent/follow?screen_name=openwhisk)\n\nOpenWhisk Command-line Interface (CLI) is a unified tool that provides a consistent interface to interact with OpenWhisk services.\n\n## Getting started\n\nHere are some quick links to help you get started:\n\n- [Downloading released binaries](#downloading-released-binaries) for Linux, macOS and Windows\n- [Running the `wsk` CLI](#running-the-wsk-cli) executable\n- [Building the project](#building-the-project) - download and build the GoLang source code\n- [Contributing to the project](#contributing-to-the-project) - join us!\n\n---\n\n## Downloading released binaries\n\nExecutable binaries of the OpenWhisk CLI are available for download on the project's GitHub [releases page](https://github.com/apache/openwhisk-cli/releases).\n\nWe currently provide binaries for the following Operating Systems (OS) and architecture combinations:\n\nOperating System | Architectures\n--- | ---\nLinux | i386, AMD64, ARM, ARM64, PPC64 (Power), S/390 and IBM Z\nmacOS (Darwin) | 386\u003csup\u003e[1](#1)\u003c/sup\u003e, AMD64\nWindows | 386, AMD64\n\n1. macOS, 32-bit (386) released versions are not available for builds using Go lang version 1.15 and greater.\n\nWe also provide instructions on how to build your own binaries from source code. See [Building the project](#building-the-project).\n\n---\n\n## Running the `wsk` CLI\n\nYou can copy the `wsk` binary to any folder, and add the folder to your system `PATH` in order to run the OpenWhisk CLI command from anywhere on your system. To get the CLI command help, execute the following:\n\n```sh\n$ wsk --help\n```\n\nTo get CLI command debug information, include the `-d`, or `--debug` flag when executing this command.\n\n---\n\n## Building the project\n\n### GoLang setup\n\nThe Openwhisk CLI is a GoLang program, so you will first need to [Download and install GoLang](https://golang.org/dl/) onto your local machine.\n\n\u003e **Note** Go version 1.15 or higher is recommended\n\nMake sure your `$GOPATH` is defined correctly in your environment. For detailed setup of your GoLang development environment, please read [How to Write Go Code](https://golang.org/doc/code.html).\n\n### Download the source code from GitHub\n\nAs the code is managed using GitHub, it is easiest to retrieve the code using the `git clone` command.\n\nif you just want to build the code and do not intend to be a Contributor, you can clone the latest code from the Apache repository:\n\n```sh\ngit clone git@github.com:apache/openwhisk-cli\n```\n\nor you can specify a release (tag) if you do not want the latest code by using the `--branch \u003ctag\u003e` flag. For example, you can clone the source code for the tagged 1.1.0 [release](https://github.com/apache/openwhisk-cli/releases/tag/1.1.0)\n\n```sh\ngit clone --branch 1.1.0 git@github.com:apache/openwhisk-cli\n```\n\nYou can also pull the code from a fork of the repository. If you intend to become a Contributor to the project, read the section [Contributing to the project](#contributing-to-the-project) below on how to setup a fork.\n\n### Build using `go build`\n\nUse the Go utility to build the ```wsk`` binary.\n\nChange into the cloned project directory and use `go build` with the target output name for the binary:\n\n```sh\n$ go build -o wsk\n```\n\nan executable named `wsk` will be created in the project directory compatible with your current operating system and architecture.\n\n#### Building for other Operating Systems (GOOS) and Architectures (GOARCH)\n\nIf you would like to build the binary for a specific operating system and processor architecture, you may add the arguments `GOOS` and `GOARCH` into the Go build command (as inline environment variables).\n\nFor example, run the following command to build the binary for 64-bit Linux:\n\n```sh\n$ GOOS=linux GOARCH=amd64 go build -o wsk\n```\n\nIf successful, an executable named `wsk` will be created in the project directory compatible with your current operating system and architecture.\n\nSupported value combinations include:\n\n`GOOS` | `GOARCH`\n--- | ---\nlinux | 386 (32-bit), amd64 (64-bit), s390x (S/390, Z), ppc64le (Power), arm (32-bit), arm64 (64-bit)\ndarwin (macOS) | amd64\nwindows | 386 (32-bit), amd64 (64-bit)\n\n### Build using Gradle\n\nThe project includes its own packaged version of Gradle called Gradle Wrapper which is invoked using the `./gradlew` command on Linux/Unix/Mac or `gradlew.bat` on Windows.\n\n1. Gradle requires you to [install Java JDK version 8](https://gradle.org/install/) or higher\n\n1. Clone the `openwhisk-cli` repo:\n\n    ```sh\n    git clone https://github.com/apache/openwhisk-cli\n    ```\n\n    and change into the project directory.\n\n1. Cross-compile binaries for all supported Operating Systems and Architectures:\n\n    ```sh\n    ./gradlew goBuild\n    ```\n\n    Upon a successful build, the `wsk` binaries can be found under the corresponding `build/\u003cos\u003e-\u003carchitecture\u003e/` folder of your project:\n\n    ```sh\n    $ ls build\n    darwin-amd64  linux-amd64   linux-arm64   linux-s390x   windows-amd64\n    linux-386     linux-arm     linux-ppc64le windows-386\n    ```\n\n#### Compiling for a single OS/ARCH\n\n1. View gradle build tasks for supported Operating Systems and Architectures:\n\n    ```sh\n    ./gradlew tasks\n    ```\n\n    you will see build tasks for supported OS/ARCH combinations:\n\n    ```sh\n    Gogradle tasks\n    --------------\n    buildDarwinAmd64 - Custom go task.\n    buildLinux386 - Custom go task.\n    buildLinuxAmd64 - Custom go task.\n    buildLinuxArm - Custom go task.\n    buildLinuxArm64 - Custom go task.\n    buildLinuxPpc64le - Custom go task.\n    buildLinuxS390x - Custom go task.\n    buildWindows386 - Custom go task.\n    buildWindowsAmd64 - Custom go task.\n    ```\n\n    \u003e **Note**: The `buildWindows386` option is only supported on Golang versions less than 1.15.\n\n1. Build using one of these tasks, for example:\n\n    ```sh\n    $ ./gradlew buildDarwinAmd64\n    ```\n\n\u003e **Note** You may use the `compile` Gradle task to build a subset of the supported platforms using the `buildPlatforms` parameter and supplying a comma-separated list, for example:\n`-PbuildPlatforms=linux-amd64,mac-amd64,windows-amd64`\n\n#### Using your own local Gradle to build\n\nAlternatively, you can choose to [Install Gradle](https://gradle.org/install/) and use it instead of the project's Gradle Wrapper.  If so, you would use the `gradle` command instead of `gradlew`. If you do elect to use your own Gradle, verify its version is `6.8.1` or higher:\n\n```sh\ngradle -version\n```\n\n\u003e **Note** If using your own local Gradle installation, use the `gradle` command instead of the `./gradlew` command in the build instructions below.\n\n### Building for internationalization (i18n)\n\nThe CLI internationalization is generated dynamically using the `bindata` tool as part of the gradle build. If you need to install it manually, you may use:\n\n```sh\n$ go get -u github.com/jteeuwen/go-bindata/...\n$ go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources\n```\n\n\u003e **Note**: the `go-bindata` package will automatically be installed if the `go build` command is used in the project as it is listed in the `go.mod` dependency file.\n\n### Running unit tests\n\n##### Using Go\n\n```sh\n$ cd commands\n$ go test -tags=unit -v\n```\n\n\u003e **Note** A large number of CLI tests today are not yet available as Go tests.\n\n##### Using gradle\n\nAll tests can be run using the Gradle script:\n\n```sh\n$ ./gradlew goTest -PgoTags=unit\n$ ./gradlew goTest -PgoTags=native\n```\n\n### Running integration tests\n\nIntegration tests are best left to the Travis build as they depend on a fully functional OpenWhisk environment.\n\n---\n\n## Contributing to the project\n\n### Git repository setup\n\n1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the Apache repository\n\n    If you intend to contribute code, you will want to fork the `apache/openwhisk-cli` repository into your github account and use that as the source for your clone.\n\n1. Clone the repository from your fork:\n\n    ```sh\n    git clone git@github.com:${GITHUB_ACCOUNT_USERNAME}/openwhisk-cli.git\n    ```\n\n1. Add the Apache repository as a remote with the `upstream` alias:\n\n    ```sh\n    git remote add upstream git@github.com:apache/openwhisk-cli\n    ```\n\n    You can now use `git push` to push local `commit` changes to your `origin` repository and submit pull requests to the `upstream` project repository.\n\n1. Optionally, prevent accidental pushes to `upstream` using this command:\n\n    ```sh\n    git remote set-url --push upstream no_push\n    ```\n\n\u003e Be sure to [Sync your fork](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) before starting any contributions to keep it up-to-date with the upstream repository.\n\n### Adding new dependencies\n\nPlease use `go get` to add new dependencies to the `go.mod` file:\n\n```sh\ngo get -u github.com/project/libname@v1.2.0\n```\n\n\u003e Please avoid using commit hashes for referencing non-OpenWhisk libraries.\n\n### Removing unused dependencies\n\nPlease us `go tidy` to remove any unused dependencies after any significant code changes:\n\n```sh\ngo mod tidy\n```\n\n### Updating dependency versions\n\nAlthough you might be tempted to edit the go.mod file directly, please use the recommended method of using the `go get` command:\n\n```sh\ngo get -u github.com/project/libname  # Using \"latest\" version\ngo get -u github.com/project/libname@v1.1.0 # Using tagged version\ngo get -u github.com/project/libname@aee5cab1c  # Using a commit hash\n```\n\n### Updating Go version\n\nAlthough you could edit the version directly in the go.mod file, it is better to use the `go edit` command:\n\n```sh\ngo mod edit -go=1.15\n```\n\n---\n\n## Continuous Integration\n\nTravis CI is used as a continuous delivery service for Linux and Mac. Currently, Travis CI supports the environments of Linux and Mac, but it is not available for Windows. The project would like to add AppVeyor CI in the future to run test cases for Windows.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fopenwhisk-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-cli/lists"}