{"id":18293092,"url":"https://github.com/kubesphere/create-ks-project","last_synced_at":"2025-04-05T11:30:48.235Z","repository":{"id":50564918,"uuid":"517543370","full_name":"kubesphere/create-ks-project","owner":"kubesphere","description":"A CLI tool enables you to quickly set up a KubeSphere Console extension project.","archived":false,"fork":false,"pushed_at":"2023-12-21T02:59:35.000Z","size":92,"stargazers_count":4,"open_issues_count":2,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-13T21:43:07.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kubesphere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-07-25T06:23:55.000Z","updated_at":"2024-07-18T10:00:16.426Z","dependencies_parsed_at":"2024-03-25T18:23:25.475Z","dependency_job_id":"324ba89f-2455-4628-9a85-ede56a006fe1","html_url":"https://github.com/kubesphere/create-ks-project","commit_stats":{"total_commits":23,"total_committers":6,"mean_commits":"3.8333333333333335","dds":0.3913043478260869,"last_synced_commit":"de5731ada3272d18c48c3d4945b69dd3bb6cfa62"},"previous_names":["kubesphere/create-ks-app","kubesphere/create-ks-ext"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fcreate-ks-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fcreate-ks-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fcreate-ks-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fcreate-ks-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubesphere","download_url":"https://codeload.github.com/kubesphere/create-ks-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247330415,"owners_count":20921625,"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":[],"created_at":"2024-11-05T14:21:56.024Z","updated_at":"2025-04-05T11:30:47.910Z","avatar_url":"https://github.com/kubesphere.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create KubeSphere Extension Console Project\n\nHeavily inspired by create-next-app and create-react-app, this CLI tool can help you quickly set up The console part of a KubeSphere extension project.\nYou don't need to install or configure tools like webpack, Babel, TypeScript, etc. Just run the command shown as the following and your project will be ready to go.\n\n## Prerequisites\n\n- Access to a Unix-based operating system, such as Linux, MacOS or\n  [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/)\n- `curl` or `wget` installed\n- Node.js [Active LTS Release](https://nodejs.org/en/about/releases/) installed using one of these\n  methods:\n    - Using `nvm` (recommended)\n      - [Installing nvm](https://github.com/nvm-sh/nvm#install--update-script)\n      - [Install and change Node version with nvm](https://nodejs.org/en/download/package-manager/#nvm)\n    - [Binary Download](https://nodejs.org/en/download/)\n    - [Package manager](https://nodejs.org/en/download/package-manager/)\n- `yarn` [Installation](https://classic.yarnpkg.com/en/docs/install)\n- `git` [installation](https://github.com/git-guides/install-git)\n- Ensure the ports 8000 and 8001 is available for the local environment, we use the two ports for the bff server and webpack-dev-server.\n\n## Getting Started\n\nRun the command:\n\n```shell\nyarn create ks-project frontend\n```\n\nThe wizard will create the project `frontend` in the current directory.\nInside that folder, it will generate the initial project structure and install the dependencies.\n\nIt might take a little while, but as soon as the message similar as below, you can go to the next step.\n\n```shell\nSuccess! The project frontend is created at /Users/chenzhen/kubesphere-extensions/frontend\nInside the directory, you can run the following commands:\n\n  yarn create:ext\n    Creates a new extension.\n\n  yarn dev\n    Starts the development server.\n\n  yarn build:prod\n    Builds the app for production to use.\n\n  yarn start\n    Runs the built app in production mode.\n\nWe suggest that you begin by typing:\n\n  cd frontend\n  yarn create:ext\n\nAnd\n\n  yarn dev\n\n```\n\n## Options\n\n`create-ks-project` comes with the following option:\n\n* -f, --fast-mode: Install dependencies from a tarball.\n\n## Create your KubeSphere extension\n\nSwitch to the directory you just created and run the command:\n\n```shell\nyarn create:ext\n```\n\nthe wizard will ask you the extension name, displayName, description and author.\n\n```shell\n$ ksc create:ext\n? Extension Name demo\n? Display Name Demo\n? Description this is demo\n? Author chenzhen\n? Language JavaScript\n? Are you sure you want to create extension: [demo] ? Yes\n✨  Done in 12.64s.\n```\n\nThen the extension will be created in the `extensions` directory. The files structure of the extension is as follows:\n\n```shell\n.\n├── Dockerfile\n├── README.md\n├── package.json\n└── src\n    ├── App.jsx\n    ├── index.js\n    ├── locales\n    │   ├── en\n    │   │   ├── base.json\n    │   │   └── index.js\n    │   ├── index.js\n    │   └── zh\n    │       ├── base.json\n    │       └── index.js\n    └── routes\n        └── index.js\n\n```\n\n## Run development environment\n\n1. Edit the local_config.yaml file in the `configs` directory. Replace the apiServer value with the real value\n\n```shell\nserver:\n  apiServer:\n    url: http://apiserver.local\n    wsUrl: ws://apiserver.local\n```\n\n2. run the dev\n\n```shell\nyarn dev\n```\n\nAnd open the browser to http://localhost:8000/, you will see the kubesphere page.\nfor more information about the development environment, please refer to the [development documentation](https://kubesphere-dev-guide.netlify.app/extension-dev-guide)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Fcreate-ks-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubesphere%2Fcreate-ks-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Fcreate-ks-project/lists"}