{"id":13394757,"url":"https://github.com/auth0/wt-cli","last_synced_at":"2025-03-25T11:06:08.029Z","repository":{"id":33311462,"uuid":"36956204","full_name":"auth0/wt-cli","owner":"auth0","description":"Webtask CLI - all you need is code","archived":false,"fork":false,"pushed_at":"2023-07-11T09:52:21.000Z","size":1446,"stargazers_count":321,"open_issues_count":45,"forks_count":72,"subscribers_count":115,"default_branch":"master","last_synced_at":"2025-03-18T09:27:47.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://webtask.io","language":"JavaScript","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/auth0.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}},"created_at":"2015-06-05T21:27:22.000Z","updated_at":"2025-01-02T01:03:39.000Z","dependencies_parsed_at":"2024-05-30T08:04:56.909Z","dependency_job_id":"c25f336f-5fa1-4944-8201-af47538ce3d6","html_url":"https://github.com/auth0/wt-cli","commit_stats":{"total_commits":459,"total_committers":39,"mean_commits":11.76923076923077,"dds":"0.47058823529411764","last_synced_commit":"34df318f059e6e52e0cdb2e1bde79269bfa203b7"},"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Fwt-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Fwt-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Fwt-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Fwt-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auth0","download_url":"https://codeload.github.com/auth0/wt-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245449658,"owners_count":20617190,"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":[],"created_at":"2024-07-30T17:01:30.580Z","updated_at":"2025-03-25T11:06:08.010Z","avatar_url":"https://github.com/auth0.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ⚠️ Deprecated ⚠️\n\n**This repository is deprecated and is no longer receiving support or maintenance**\n\n# Webtask CLI: all you need is code\n\nCommand line tool for using [webtasks](https://webtask.io) to create microservices in seconds.\n\n## Setup\n\n```bash\n$ npm i -g wt-cli\n$ wt init\n```\n\n## Usage\n\n### Create a webtask\n\nWrite webtask code to the *hello-world.js* file:\n\n```javascript\nmodule.exports = function (cb) {\n  cb(null, 'Hello webtasks!');\n}\n```\n\n```bash\nwt create hello-world.js\n```\n\nand call it...\n\n```bash\ncurl https://webtask.it.auth0.com/api/run/{yours}/hello-world\n```\n\n### Create a webtask (from a public URL)\n\n```bash\nwt create https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/html-response.js \\\n          --name html-response-url\n```\n\n### Create a webtask with a secret\n\n```bash\nwt create https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/mongodb.js \\\n          --name mongo \\\n          --secret MONGO_URL=mongodb://webtask:supersecret@ds047592.mongolab.com:47592/webtask-examples\n```\n\n\u003e This is a real mongodb URL (powered by mongolab), no guarantee that it will work :)\n\n### Create a webtask that integrates with express.js\n\n```bash\nwt create https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/express.js \\\n          --name express \\\n          --dependency express \\\n          --dependency body-parser\n```\n\n\n### Log streaming\n\n```bash\nwt logs\n```\n\n### Cron a webtask (long running)\n\n```bash\nwt cron schedule -n mongocron \\\n                 -s MONGO_URL=mongodb://webtask:supersecret@ds047592.mongolab.com:47592/webtask-examples \\\n                 \"*/10 * * * *\" \\\n                 https://raw.githubusercontent.com/auth0/wt-cli/master/sample-webtasks/mongodb.js\n```\n\n\u003e This cron will insert a document in a mongo collection every 10 minutes\n\n### Get cron history\n\n```bash\nwt cron history mongogron\n```\n\n### Get all scheduled webtasks\n\n```bash\nwt cron ls\n```\n\n# Auth0 CLI: extend Auth0 with custom code (BETA)\n\nAuth0 hooks enable you to extend the Auth0 platform with custom code. Auth0 CLI allows you to manage Auth0 hooks for your Auth0 account.\n\nAuth0 hooks are webtasks associated with specific extensibility points of the Auth0 platform that are invoked by Auth0 runtime to execute your custom logic.\n\n## Setup\n\nFollow the instructions from the Account \u003e Webtasks panel on the Auth0 management dashboard to install and configure `wt-cli`. The package now includes `auth0` binary in addition to `wt`.\n\n**NOTE** While Auth0 CLI is in BETA, the `wt-cli` tool must be installed from a branch of this repository instead of the public npm registry. Use `npm i -g auth0/wt-cli#auth0` to install the tool. The rest of the instructions on the Auth0 management portal applies without changes.\n\n## Overview\n\nAuth0 CLI allows you to create, list, enable/disable, edit, and remove Auth0 hooks associated with specific extensibility points within the Auth0 platform, as well as receive real-time logging information generated by custom code.\n\nThe list of supported extensibility points will be growing over time. Currently, the following extensibility points are supported:\n\n[client-credentials-exchange](https://github.com/auth0/auth0-ext-compilers/blob/master/client-credentials-exchange.md)\n[password-exchange](https://github.com/auth0/auth0-ext-compilers/blob/master/password-exchange.md)\n[pre-user-registration](https://github.com/auth0/auth0-ext-compilers/blob/master/pre-user-registration.md)\n[post-user-registration](https://github.com/auth0/auth0-ext-compilers/blob/master/post-user-registration.md)\n\nFor each of the extensibility points, there can be several Auth0 hooks created. A hook can be enabled or disabled, but only up to one hook per extensibility point can be enabled at a time. Disabled hooks are useful for staging new functionality.\n\n## Synopsis\n\nThe script below assumes you are creating an Auth0 hook for the `pre-user-registration` extensibility point using profile name `tj-default`. You can use any of the extensibility points listed above and the actual profile name has been provided to you during `wt-cli` setup.\n\n```bash\n# Scaffold sample code of an Auth0 hook:\nauth0 scaffold -t pre-user-registration \u003e file.js\n\n# Create a new, disabled Auth0 hook:\nauth0 create -t pre-user-registration --name my-extension-1 -p tj-default file.js\n\n# Edit code of the Auth0 hook:\nauth0 edit my-extension-1\n\n# Enable the newly created extensibility point (all other hooks associated\n# with the same extensibility point will be disabled):\nauth0 enable my-extension-1 -p tj-default\n\n# List hooks for a specific extensibility point:\nauth0 ls -t pre-user-registration -p tj-default\n\n# List all Auth0 hooks on your account:\nauth0 ls -p tj-default\n\n# Access streaming, real-time logs of all of your hooks:\nauth0 logs -p tj-default\n\n# Disable a hook:\nauth0 disable my-extension-1 -p tj-default\n\n# Delete a hook:\nauth0 rm my-extension-1 -p tj-default\n```\n\n# Closing remarks\n\n## Working behind a proxy\n\n`wt-cli` supports operating behind a proxy as of `v6.1.0`. The cli relies on the `HTTP_PROXY` (or `http_proxy`) environment variable to determine if proxy support needs to be enabled. The `HTTP_PROXY` environment variable must be set to a uri according to the following table:\n\n| Protocol   | Proxy Agent for `http` requests | Proxy Agent for `https` requests | Example\n|:----------:|:-------------------------------:|:--------------------------------:|:--------:\n| `http`     | [http-proxy-agent](https://github.com/TooTallNate/node-http-proxy-agent)            | [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent)            | `http://proxy-server-over-tcp.com:3128`\n| `https`    | [http-proxy-agent](https://github.com/TooTallNate/node-http-proxy-agent)            | [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent)            | `https://proxy-server-over-tls.com:3129`\n| `socks(v5)`| [socks-proxy-agent](https://github.com/TooTallNate/node-socks-proxy-agent)           | [socks-proxy-agent](https://github.com/TooTallNate/node-socks-proxy-agent)            | `socks://username:password@some-socks-proxy.com:9050` (username \u0026 password are optional)\n| `socks5`   | [socks-proxy-agent](https://github.com/TooTallNate/node-socks-proxy-agent)           | [socks-proxy-agent](https://github.com/TooTallNate/node-socks-proxy-agent)            | `socks5://username:password@some-socks-proxy.com:9050` (username \u0026 password are optional)\n| `socks4`   | [socks-proxy-agent](https://github.com/TooTallNate/node-socks-proxy-agent)           | [socks-proxy-agent](https://github.com/TooTallNate/node-socks-proxy-agent)            | `socks4://some-socks-proxy.com:9050`\n| `pac`      | [pac-proxy-agent](https://github.com/TooTallNate/node-pac-proxy-agent)             | [pac-proxy-agent](https://github.com/TooTallNate/node-pac-proxy-agent)              | `pac+http://www.example.com/proxy.pac`\n\n\u003e * See [http-proxy-agent](https://github.com/TooTallNate/node-proxy-agent/blob/master/README.md) for the source of this table.\n\n## Issue Reporting\n\nIf you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.\n\n## Author\n\n[Auth0](https://auth0.com)\n\n## License\n\nThis project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Fwt-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauth0%2Fwt-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Fwt-cli/lists"}