Getting Started
There are better tutorials for Japanese speakers.
What is cli-kintone?
cli-kintone is the CLI tool for importing and exporting Kintone records. It is suitable for batch record operations.
- Backup/restore Kintone records
- Data synchronization between Kintone and other BI platforms
- Data migration from other systems
cli-kintone is pronounced "Koo-Ree Kint-Own," and "Kint" rhymes with "hint." It is named after the Japanese sweet 栗きんとん.
Why cli-kintone?
cli-kintone enhance non-engineers work performance.
Here is a comparison of Web GUI, CLI, and API:
- Web GUI
- Low learning cost
- Easy to operate
- Difficult to automate
- Mainly for end users
- CLI
- Moderate learning cost
- Modestly easy to operate
- Easy to automate with shell scripts
- Mainly used by IT personnel
- API
- High learning cost
- Application development required to operate
- High level automation can be built
- Mainly used by plugin developers
With cli-kintone, non-engineers can automate their routine and regular tasks with a little shell scripting skill.
Try cli-kintone
This part will walk you through the process of installing cli-kintone and exporting records from the application.
Requirements
To run cli-kintone, a Kintone subscription with API access is required.
Installing
- Binary
- npm
- Jump to the Releases page.
- Download latest cli-kintone ZIP file and extract it.
Run npm install
command:
npm install @kintone/cli --global
For more details, see Installation page.
Operation check
Run cli-kintone with --version
option.
- Linux/macOS
- Windows
./cli-kintone --version
# A version should be printed
# 1.10.0
./cli-kintone.exe --version
# A version should be printed
# 1.10.0
If you see the version you downloaded, you are ready to go!
Configuring
To access Kintone from cli-kintone, you need to set authentication information. We recommend setting environment variables to reduce repetition.
Here are the environment variables to set.
Key | Description |
---|---|
KINTONE_BASE_URL | Base URL of Kintone you want to access. e.g. https://example.cybozu.com |
KINTONE_API_TOKEN | API token of the app you want to access |
Alternatively, you can set KINTONE_USERNAME
and KINTONE_PASSWORD
to use password authentication.
- Linux/macOS
- Windows (PowerShell)
- Windows (Cmd)
export KINTONE_BASE_URL='https://example.cybozu.com'
export KINTONE_API_TOKEN='YourAPIToken'
$Env:KINTONE_BASE_URL='https://example.cybozu.com'
$Env:KINTONE_API_TOKEN='YourAPIToken'
set KINTONE_BASE_URL=https://example.cybozu.com
set KINTONE_API_TOKEN=YourAPIToken
Exporting record
Now, it's time. Use the record export
command to retrive records from Kintone app.
- Linux/macOS
- Windows
./cli-kintone --app 123
# Exported records will be printed in CSV format
./cli-kintone.exe --app 123
# Exported records will be printed in CSV format
Next steps
See Commands section to check all features.