Uploading plug-in files using plugin-uploader

Introduction

This article introduces plugin-uploader, a plug-in development tool designed to make the development of Kintone plug-ins easier by allowing users to upload plug-ins to the Kintone environment through the command line.

What is plugin-uploader?

plugin-uploader is a CLI tool that makes it easy to upload plug-in zip files from your Desktop to Kintone.

It supports npm and can run on Windows, macOS, and Linux.

The source code is published on GitHub.

Node version 6 or later is required to use this tool.

Installation

Install plugin-uploader globally using the following command. plugin-uploader can also be installed locally, but this tutorial will use the global installation.

 

Basic Usage

Zip files are uploaded to Kintone using plugin-uploader with the kintone-plugin-uploader command and one of three different ways to authenticate the user. These three authentication types are explained below.

 

In order to execute plugin-uploader, the authenticated user must be at least a Kintone System Administrator. For information on the types of Kintone Administrators, refer to the Types of Kintone Administrators article from the Kintone Help Center.

Inputting authentication information directly

The subdomain, user login name, password, and plug-in zip file are all specified in the same command. This method is suitable for scheduled processes. Note that the password is not concealed in this command.

 

Inputting authentication information in a dialog style

Specifying only the plug-in zip file in the command will prompt a dialog that will ask the user to input the subdomain, login name, and password individually. The password is concealed in this command.

 

Inputting authentication information using environment variables

Environment variables for the subdomain and login information can be set in advance. This method allows the password (and other environmental information) to be hidden when using the single-line command. 

 

Optional Features

There are also other optional features that can be specified in the command.

Proxy settings

If a proxy server is being used, the proxy information can be entered with --proxy.

 

File monitoring

Plug-in zip files can be uploaded to Kintone each time they are updated using --watch. This option is especially useful for developing plug-ins and checking them immediately after making changes.

 

Using plugin-packer and plugin-uploader Together

Plug-in files can be zipped using plugin-packer, which can be used with plugin-uploader to automate the process of zipping and uploading a modified plug-in source code to Kintone. 

Set Up

Open two terminals and follow the below examples.

 

Once the above set up is complete, modifications to the plug-in's source code will automatically be zipped and uploaded to Kintone, and changes can be checked with a simple page refresh.

Finally

With plugin-uploader, zipped plug-in files can be uploaded to Kintone using just the command line, and when used with plugin-packer, the process of developing Kintone plug-ins is even more efficient. Create a simple plug-in from scratch, or use a sample plug-in such as the Date Input Button Plug-in and try using plugin-packer and plugin-uploader.

Important Notes

The operation of this program is not guaranteed.
Modification, redistribution, commercial use, etc. of the source code is subject to the license agreement.

Was this article helpful?
0 out of 0 found this helpful
Do you have any questions or issues related to this article?
Please share your views with us in the Community forums!