npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kong-portal-cli

v3.6.2

Published

CLI tool to manage your Kong Developer Portals for Kong Enterprise

Downloads

1,504

Readme

Kong Developer Portal CLI

License

The Kong Developer Portal CLI is used to manage your Developer Portals from the command line. It is built using clipanion.

Overview

This is the next generation TypeScript based Developer Portal CLI. The goal of this project is to make a higher quality CLI tool over the initial sync script.

This project is built for Kong Enterprise >= 1.3.

For Kong Enterprise <= 0.36, or for legacy mode on Kong Enterprise >= 1.3 use the legacy sync script.

Install

npm install -g kong-portal-cli

Usage

The easiest way to start is by cloning the portal-templates repo master branch locally.

Then edit workspaces/default/cli.conf.yaml to set kong_admin_url and kong_admin_token to match your setup.

Make sure Kong is running and portal is on:

Now from root folder of the templates repo you can run:

portal <command> <workspace>

Where <command> is one of:

  • config Output or change configuration of the portal on the given workspace.
  • deploy Deploy changes made locally under the given workspace upstream.
  • disable Disable the portal on the given workspace.
  • enable Enable the portal on the given workspace.
  • fetch Fetches content and themes from the given workspace.
  • init Initialize a local workspace with a default cli.conf.yaml configuration file.
  • sync Sync changes made locally under the given workspace upstream with the upstream workspace.
  • wipe Deletes all content and themes from upstream workspace.

Where <workspace> indicates the directory/workspace pairing you would like to operate on.

For deploy

  • Add -W or --watch to make changes reactive.
  • Add -P or --preserve to avoid deleting files upstream that you do not have locally.
  • Add -D or --disable-ssl-verification to disable SSL verification and use self-signed certs.
  • Add -I or --ignore-specs to ignore the '/specs' directory.
  • Add -S or --skip-path to skip files or directories that match the given path. This option can be repeated.

For fetch

  • Add -K or --keep-encode to keep binary assets as base64 encoded strings locally.
  • Add -D or --disable-ssl-verification to disable SSL verification and use self-signed certs.
  • Add -I or --ignore-specs to ignore the '/specs' directory.

For sync

  • Add -W or --watch to make changes reactive.
  • Add -D or --disable-ssl-verification to disable SSL verification and use self-signed certs.
  • Add -I or --ignore-specs to ignore the '/specs' directory.
  • Add -S or --skip-path to skip files or directories that match the given path. This option can be repeated.

For wipe

  • Add -D or --disable-ssl-verification to disable SSL verification and use self-signed certs.
  • Add -I or --ignore-specs to ignore the '/specs' directory.
  • Add -S or --skip-path to skip files or directories that match the given path. This option can be repeated.

For enable and disable

  • Add -D or --disable-ssl-verification to disable SSL verification and use self-signed certs.

Using cli.conf.yaml

In addition to kong_admin_uri and kong_admin_token, you can also add:

  • disable_ssl_verification: true and
  • ignore_specs: true
  • max_content_length_mb - maximum size allowed to be transferred in Mb - default is 10 (10Mb)

Set the options in the CLI configuration file to always enable those settings on that Workspace instead of passing the option flags with every command.

Using Environment Variables

You can override some config values set in cli.conf.yaml via environment variables. For example, If you wanted to override the Kong Admin URL, you can run:

KONG_ADMIN_URL=http://new-admin-url.com portal deploy default

Environment variables are useful for scripting as well as temporarily overriding particular settings.

Available environment variables include:

  • KONG_ADMIN_URL Kong Admin URL the CLI should target for uploading files.
  • KONG_ADMIN_TOKEN_FILE Kong Admin Token token file path used to authenticate with the Kong Admin API, this will take precedence to KONG_ADMIN_TOKEN.
  • KONG_ADMIN_TOKEN Kong Admin Token token used to authenticate with the Kong Admin API.

Contributing

For problems directly related to the CLI, add an issue on GitHub.

For other issues, submit a support ticket.

Contributors.