{"id":17124900,"url":"https://github.com/shellyln/kdx","last_synced_at":"2025-06-10T12:36:20.577Z","repository":{"id":40844809,"uuid":"248929604","full_name":"shellyln/kdx","owner":"shellyln","description":"kintone CLI for development \u0026 deployment, with Developer Experience.","archived":false,"fork":false,"pushed_at":"2023-01-07T16:11:07.000Z","size":708,"stargazers_count":6,"open_issues_count":15,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T06:13:09.723Z","etag":null,"topics":["developer-experience","dx","kintone","tynder","typescript","validator"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/shellyln.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-21T07:45:01.000Z","updated_at":"2021-11-20T09:38:59.000Z","dependencies_parsed_at":"2023-02-07T15:01:52.552Z","dependency_job_id":null,"html_url":"https://github.com/shellyln/kdx","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fkdx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fkdx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fkdx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fkdx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellyln","download_url":"https://codeload.github.com/shellyln/kdx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670436,"owners_count":21142904,"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":["developer-experience","dx","kintone","tynder","typescript","validator"],"created_at":"2024-10-14T18:43:39.686Z","updated_at":"2025-04-13T06:13:17.929Z","avatar_url":"https://github.com/shellyln.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KDX\n\n![KDX](https://shellyln.github.io/assets/image/kdx-logo.svg)\n\nkintone CLI for development \u0026 deployment, with Developer Experience.  \nEnjoy type-safe and repository-centric development!\n\n\u003e This is an unstable pre-release\n\n\n## Features\n* Pull and push the kintone multiple Apps settings.\n  * You can also deploy to other environments and applications.\n* Download and upload app's JavaScript and CSS files.\n* Edit custom view HTML file as a separated file.\n* Generate the app fields schema and type definitions.\n  * You can validate the input with `kdx/helpers` library codes.\n  * You can write codes with types.\n\n\n## Install\n\n```sh\nnpm install -g kdx\n```\n\n## Get started\n\n```sh\n# clone a template\ngit clone https://github.com/shellyln/kdx-project-template.git MyProject\ncd MyProject\nrm -rf .git/\ngit init\nnpm install\n\n# configure\nvi .env\nvi meta/meta-info.json\n\n# first pull and push\nkdx pull MyApp1\nnpm run build\nkdx push MyApp1 --force\n\n# debug app\nnpm run serve:MyApp1\n\n# first commit\ngit add .\ngit commit -m \"initial commit\"\n```\n\nSee also:\n[https://github.com/shellyln/kdx-project-template](https://github.com/shellyln/kdx-project-template)\n\n\n## Commands\n\n```\nkdx - kintone CLI for development \u0026 deployment, with Developer Experience\n\nkdx \u003cSubcommand\u003e \u003cAppName\u003e [--force]\nkdx \u003cSubcommand\u003e --all     [--force]\nkdx switch \u003cprofile\u003e\n\nSubcommands:\n    compile-schema  : Generate definition and validation codes from schema/*.tss info.\n    gen-schema      : Generate definition and validation codes from meta/**/*.json info.\n    fetch           : Fetch from kintone, but no code generation is performed.\n    push            : Push to kintone.\n    pull            : Pull from kintone, and perform code generation.\n    switch          : Switch target profile (e.g. development, staging, production).\n                      Update .env and re-generate AppID enum.\n    help            : Show this help.\n```\n\n### Pull from kintone\n\n* Pull one app:\n```sh\nkdx pull \u003cAppName\u003e\n```\n\n* Pull all apps:\n```sh\nkdx pull --all\n```\n\n### Push to kintone\n\n* Push one app:\n```sh\nkdx push \u003cAppName\u003e\n```\n\n* Push all apps:\n```sh\nkdx pull --all\n```\n\n* Push one app (ignore revision / deproying to the other app):\n```sh\nkdx push \u003cAppName\u003e --force\n```\n\n### Fetch from kintone\nSimilar to `pull`, but no code generation is performed.\n\n* Fetch one app:\n```sh\nkdx fetch \u003cAppName\u003e\n```\n\n* Fetch all apps:\n```sh\nkdx fetch --all\n```\n\n### Generate definition and validation codes from `meta/**/*.json` info\n\n* Generate code for one app:\n```sh\nkdx gen-schema \u003cAppName\u003e\n```\n\n* Generate code for all apps:\n```sh\nkdx gen-schema --all\n```\n\n### Generate definition and validation codes from `schema/*.tss` info\nSimilar to `gen-schema`, but it uses pre-generated `schema/*.tss`.\n\n* Generate code for one app:\n```sh\nkdx compile-schema \u003cAppName\u003e\n```\n\n* Generate code for all apps:\n```sh\nkdx compile-schema --all\n```\n\n### Switch target profile\n\n```sh\nkdx switch \u003cProfileName\u003e\n```\n\n\n## Configurations\n\n### .env\n\n```\nTARGET = development\n\nKINTONE_URL_development      = https://XXXXXXXX.cybozu.com\nKINTONE_USERNAME_development = XXXXXXXXXXXXXXXXXXXXXXXXXX\nKINTONE_PASSWORD_development = XXXXXXXXXXXXXXXXXXXXXXXXXX\n\nKINTONE_URL_staging          = https://XXXXXXXX.cybozu.com\nKINTONE_USERNAME_staging     = XXXXXXXXXXXXXXXXXXXXXXXXXX\nKINTONE_PASSWORD_staging     = XXXXXXXXXXXXXXXXXXXXXXXXXX\n\nKINTONE_URL_production       = https://XXXXXXXX.cybozu.com\nKINTONE_USERNAME_production  = XXXXXXXXXXXXXXXXXXXXXXXXXX\nKINTONE_PASSWORD_production  = XXXXXXXXXXXXXXXXXXXXXXXXXX\n```\n\n\n### ${projectDir}/meta/meta-info.json\n\n```json\n{\n    \"apps\": {\n        \"foo\": {              // \u003c- App name\n            \"development\": {  // \u003c- Target profile\n                \"appId\": 38,  // \u003c- App id\n                \"preview\": false\n            },\n            \"staging\": {\n                \"appId\": 22,\n                \"guestSpaceId\": 10,\n                \"preview\": false\n            },\n            \"production\": {\n                \"appId\": 43,\n                \"guestSpaceId\": 10,\n                \"preview\": true\n            }\n        },\n        \"bar\": {\n            \"development\": {\n                \"appId\": 44,\n                \"guestSpaceId\": 5,\n                \"preview\": false\n            },\n            \"staging\": {\n                \"appId\": 22,\n                \"guestSpaceId\": 10,\n                \"preview\": false\n            },\n            \"production\": {\n                \"appId\": 43,\n                \"guestSpaceId\": 10,\n                \"preview\": true\n            }\n        }\n    }\n}\n```\n\n\n### ${projectDir}/meta/apps/${appName}/_views.json\n\n* View settings\n  * `views.json` will re-generate from this file.\n\n```json\n{\n    \"Qwerty\": {           // \u003c- View name\n        \"view\": {\n            \"type\": \"CUSTOM\",\n            \"filterCond\": \"\",\n            \"sort\": \"Record_number desc\",\n            \"index\": \"0\",\n            \"html\": \"\u003cdiv\u003eHello, World!\u003c/div\u003e\",\n            \"pager\": true,\n            \"device\": \"ANY\"\n        },\n        \"development\": {  // \u003c- Target profile\n            \"id\": \"5123450\",\n            \"name\": \"View 1\"\n        },\n        \"staging\": {\n            \"id\": \"5123451\",\n            \"name\": \"View 1\"\n        },\n        \"production\": {\n            \"id\": \"5123452\",\n            \"name\": \"View 1\"\n        }\n    },\n    \"5123456\": {\n        \"view\": {\n            \"type\": \"LIST\",\n            \"filterCond\": \"\",\n            \"sort\": \"Record_number desc\",\n            \"index\": \"1\",\n            \"fields\": [\n                \"Record_number\",\n                \"Text\",\n                \"Created_by\",\n                \"Created_datetime\"\n            ]\n        },\n        \"development\": {\n            \"id\": \"5123456\",\n            \"name\": \"View 2\"\n        }\n    },\n    \"5123457\": {\n        \"view\": {\n            \"type\": \"LIST\",\n            \"filterCond\": \"\",\n            \"sort\": \"Record_number desc\",\n            \"index\": \"2\",\n            \"fields\": [\n                \"Record_number\",\n                \"Text\",\n                \"Created_by\",\n                \"Created_datetime\"\n            ]\n        },\n        \"development\": {\n            \"id\": \"5123457\",\n            \"name\": \"View 3\"\n        }\n    },\n    \"5123458\": {\n        \"view\": {\n            \"type\": \"CALENDAR\",\n            \"filterCond\": \"\",\n            \"sort\": \"Record_number desc\",\n            \"index\": \"3\",\n            \"date\": \"Updated_datetime\",\n            \"title\": \"Text\"\n        },\n        \"development\": {\n            \"id\": \"5123458\",\n            \"name\": \"View 4\"\n        }\n    }\n}\n```\n\n### ${projectDir}/meta/apps/${appName}/_resources.json\n\n* JavaScript and CSS settings\n  * `customize.json` will re-generate from this file.\n\n```json\n{\n    \"js\": [\n        {\n            \"name\": \"react.production.min.js\",\n            \"target\": [\"desktop\", \"mobile\"],\n            \"file\": \"https://cdnjs.cloudflare.com/ajax/libs/react/16.13.0/cjs/react.production.min.js\"\n        },\n        {\n            \"name\": \"bbb.js\",\n            \"target\": [\"desktop\", \"mobile\"],\n            \"file\": {\n                \"development\": \"https://localhost:8034/index.js\", // URL\n                \"staging\":     \"project:bin/apps/foo/index.js\",   // Upload the project local file\n                \"production\":  \"project:bin/apps/foo/index.js\"\n            }\n        },\n        {\n            \"name\": \"ddd.js\",\n            \"target\": [\"desktop\", \"mobile\"],\n            \"file\": {\n                \"development\": \"filekey:2020XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\", // Keep the file uploaded by Web Settings console\n                \"staging\":     \"project:bin/apps/foo/ddd.js\",\n                \"production\":  \"project:bin/apps/foo/ddd.js\"\n            }\n        }\n    ],\n    \"css\": [\n        {\n            \"name\": \"aaa.css\",\n            \"target\": [\"desktop\", \"mobile\"],\n            \"file\": \"project:static-resources/aaa.css\"\n        },\n        {\n            \"name\": \"ccc.css\",\n            \"target\": [\"desktop\", \"mobile\"],\n            \"file\": {\n                \"development\": \"https://localhost:8034/index.css\",\n                \"staging\":     \"project:bin/apps/foo/index.css\",\n                \"production\":  \"project:bin/apps/foo/index.css\"\n            }\n        }\n    ]\n}\n```\n\n---\n\n## License\nMIT  \nCopyright (c) 2020 Shellyl_N and Authors\n\n---\n\n### Bundled softwares' license\n* 51-modern-default.css - Copyright (c) 2014 Cybozu (MIT)\n* @kintone/rest-api-client (type definitions) - Copyright (c) Cybozu (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellyln%2Fkdx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellyln%2Fkdx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellyln%2Fkdx/lists"}