KDX
kintone CLI for development & deployment, with Developer Experience.
Enjoy type-safe and repository-centric development!
This is an unstable pre-release
Features
- Pull and push the kintone multiple Apps settings.
- You can also deploy to other environments and applications.
- Download and upload app's JavaScript and CSS files.
- Edit custom view HTML file as a separated file.
- Generate the app fields schema and type definitions.
- You can validate the input with
kdx/helpers
library codes. - You can write codes with types.
- You can validate the input with
Install
npm install -g kdx
Get started
# clone a template git clone https://github.com/shellyln/kdx-project-template.git MyProjectcd MyProjectrm -rf .git/git initnpm install # configure vi .envvi meta/meta-info.json # first pull and push kdx pull MyApp1npm run buildkdx push MyApp1 --force # debug app npm run serve:MyApp1 # first commit git add .git commit -m "initial commit"
See also: https://github.com/shellyln/kdx-project-template
Commands
kdx - kintone CLI for development & deployment, with Developer Experience
kdx <Subcommand> <AppName> [--force]
kdx <Subcommand> --all [--force]
kdx switch <profile>
Subcommands:
compile-schema : Generate definition and validation codes from schema/*.tss info.
gen-schema : Generate definition and validation codes from meta/**/*.json info.
fetch : Fetch from kintone, but no code generation is performed.
push : Push to kintone.
pull : Pull from kintone, and perform code generation.
switch : Switch target profile (e.g. development, staging, production).
Update .env and re-generate AppID enum.
help : Show this help.
Pull from kintone
- Pull one app:
kdx pull <AppName>
- Pull all apps:
kdx pull --all
Push to kintone
- Push one app:
kdx push <AppName>
- Push all apps:
kdx pull --all
- Push one app (ignore revision / deproying to the other app):
kdx push <AppName> --force
Fetch from kintone
Similar to pull
, but no code generation is performed.
- Fetch one app:
kdx fetch <AppName>
- Fetch all apps:
kdx fetch --all
meta/**/*.json
info
Generate definition and validation codes from - Generate code for one app:
kdx gen-schema <AppName>
- Generate code for all apps:
kdx gen-schema --all
schema/*.tss
info
Generate definition and validation codes from Similar to gen-schema
, but it uses pre-generated schema/*.tss
.
- Generate code for one app:
kdx compile-schema <AppName>
- Generate code for all apps:
kdx compile-schema --all
Switch target profile
kdx switch <ProfileName>
Configurations
.env
TARGET = development
KINTONE_URL_development = https://XXXXXXXX.cybozu.com
KINTONE_USERNAME_development = XXXXXXXXXXXXXXXXXXXXXXXXXX
KINTONE_PASSWORD_development = XXXXXXXXXXXXXXXXXXXXXXXXXX
KINTONE_URL_staging = https://XXXXXXXX.cybozu.com
KINTONE_USERNAME_staging = XXXXXXXXXXXXXXXXXXXXXXXXXX
KINTONE_PASSWORD_staging = XXXXXXXXXXXXXXXXXXXXXXXXXX
KINTONE_URL_production = https://XXXXXXXX.cybozu.com
KINTONE_USERNAME_production = XXXXXXXXXXXXXXXXXXXXXXXXXX
KINTONE_PASSWORD_production = XXXXXXXXXXXXXXXXXXXXXXXXXX
${projectDir}/meta/meta-info.json
${projectDir}/meta/apps/${appName}/_views.json
- View settings
views.json
will re-generate from this file.
${projectDir}/meta/apps/${appName}/_resources.json
- JavaScript and CSS settings
customize.json
will re-generate from this file.
License
MIT
Copyright (c) 2020 Shellyl_N and Authors
Bundled softwares' license
- 51-modern-default.css - Copyright (c) 2014 Cybozu (MIT)
- @kintone/rest-api-client (type definitions) - Copyright (c) Cybozu (MIT)