kimu-cli 0.1.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -2
- package/README.md +18 -7
- package/bin/kimu.js +7 -5
- package/dist/commands/install.d.ts +3 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +58 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +167 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/new.d.ts +16 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +316 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/types/cli-types.d.ts +7 -0
- package/dist/types/cli-types.d.ts.map +1 -1
- package/dist/utils/module-installer.d.ts +11 -0
- package/dist/utils/module-installer.d.ts.map +1 -0
- package/dist/utils/module-installer.js +21 -0
- package/dist/utils/module-installer.js.map +1 -0
- package/dist/utils/registry.d.ts +8 -0
- package/dist/utils/registry.d.ts.map +1 -0
- package/dist/utils/registry.js +109 -0
- package/dist/utils/registry.js.map +1 -0
- package/docs/README.md +126 -0
- package/docs/command-kimu.md +14 -0
- package/docs/commands/create.md +60 -15
- package/docs/commands/install.md +52 -8
- package/docs/commands/list.md +39 -51
- package/docs/commands/new.md +626 -0
- package/docs/configuration-files.md +192 -0
- package/docs/getting-started.md +386 -0
- package/docs/index.md +57 -27
- package/docs/intro.md +30 -8
- package/docs/quick-reference.md +335 -0
- package/package.json +101 -101
- package/templates/generators/README.md +76 -0
- package/templates/generators/extension/config.json +45 -0
- package/templates/generators/extension/templates/component.ts.template +66 -0
- package/templates/generators/extension/templates/style.css.template +40 -0
- package/templates/generators/extension/templates/view.html.template +9 -0
- package/templates/generators/module/config.json +35 -0
- package/templates/generators/module/templates/README.md.template +62 -0
- package/templates/generators/module/templates/module.ts.template +36 -0
- package/templates/generators/module/templates/service.ts.template +41 -0
- package/docs/command-kimu-new.md +0 -207
- package/docs/command-kimu-old.md +0 -51
package/docs/command-kimu.md
CHANGED
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
The `kimu` command is the main entry point for KIMU-CLI and provides access to all framework tools and utilities.
|
|
4
4
|
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Global Installation
|
|
8
|
+
```bash
|
|
9
|
+
npm install -g kimu-cli
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Using npx (No Installation)
|
|
13
|
+
```bash
|
|
14
|
+
npx kimu-cli <command> [options]
|
|
15
|
+
```
|
|
16
|
+
|
|
5
17
|
## Basic Usage
|
|
6
18
|
```bash
|
|
7
19
|
kimu <command> [options]
|
|
8
20
|
kimu <command> --help
|
|
21
|
+
kimu --version
|
|
9
22
|
```
|
|
10
23
|
|
|
11
24
|
## Global Options
|
|
@@ -20,6 +33,7 @@ These options are available for all commands:
|
|
|
20
33
|
| Command | Description | Status |
|
|
21
34
|
|---------|-------------|---------|
|
|
22
35
|
| `create <name>` | Create a new KIMU project | ✅ **Available** |
|
|
36
|
+
| `new <type> <name>` | Create components from templates | ✅ **Available** |
|
|
23
37
|
| `info` | Show project information and status | ✅ **Available** |
|
|
24
38
|
| `doctor` | Run project health diagnostics | ⏳ **Planned** |
|
|
25
39
|
|
package/docs/commands/create.md
CHANGED
|
@@ -35,24 +35,69 @@ kimu create my-app --git --no-install
|
|
|
35
35
|
|
|
36
36
|
## What it creates
|
|
37
37
|
The command performs the following steps:
|
|
38
|
-
1. **
|
|
39
|
-
2. **
|
|
40
|
-
3. **
|
|
41
|
-
4. **
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
1. **Creates project folder** and validates it doesn't exist (or confirms overwrite)
|
|
39
|
+
2. **Initializes npm** with `npm init -y` creating `package.json`
|
|
40
|
+
3. **Installs kimu-core** via `npm install kimu-core` from npm registry
|
|
41
|
+
4. **Copies all files** from `node_modules/kimu-core` to the project root:
|
|
42
|
+
- `src/` - Source code with core framework, extensions, and modules
|
|
43
|
+
- `scripts/` - Build and utility scripts
|
|
44
|
+
- `public/` - Static assets
|
|
45
|
+
- `README.md`, `LICENSE`, configuration files, etc.
|
|
46
|
+
- Excludes: `node_modules/`, `dist/`, `.git/`, `.env`, `package-lock.json`
|
|
47
|
+
5. **Removes kimu-core** from `node_modules` after copying
|
|
48
|
+
6. **Installs dependencies** with `npm install` (unless `--no-install` is used)
|
|
49
|
+
7. **Generates build config** by running `npm run generate-config:dev`
|
|
50
|
+
8. **Updates package.json** with the project name
|
|
51
|
+
9. **Initializes git repository** (if `--git` flag is used) with initial commit
|
|
52
|
+
10. **Displays success message** with next steps
|
|
53
|
+
|
|
54
|
+
## Project Structure Created
|
|
55
|
+
```
|
|
56
|
+
my-app/
|
|
57
|
+
├── src/ # Source code
|
|
58
|
+
│ ├── core/ # KIMU core framework
|
|
59
|
+
│ ├── extensions/ # UI extensions
|
|
60
|
+
│ ├── modules/ # Modules (router, i18n, etc.)
|
|
61
|
+
│ └── main.ts # Application entry point
|
|
62
|
+
├── public/ # Static assets
|
|
63
|
+
├── scripts/ # Build scripts
|
|
64
|
+
├── dist/ # Build output (created on build)
|
|
65
|
+
├── kimu.config.json # KIMU configuration
|
|
66
|
+
├── kimu-build-config.ts # Build configuration (generated)
|
|
67
|
+
├── package.json # NPM dependencies
|
|
68
|
+
├── tsconfig.json # TypeScript configuration
|
|
69
|
+
├── vite.config.ts # Vite bundler config
|
|
70
|
+
└── README.md # Project documentation
|
|
71
|
+
```
|
|
44
72
|
|
|
45
73
|
## Notes
|
|
46
74
|
- The project name must contain only lowercase letters, numbers, and hyphens
|
|
47
|
-
- The command will
|
|
48
|
-
- Requires
|
|
49
|
-
- Internet connection is required to
|
|
50
|
-
-
|
|
51
|
-
-
|
|
75
|
+
- The command will ask for confirmation if the target folder already exists (unless `--force` is used)
|
|
76
|
+
- Requires Node.js >= 18.0.0 and npm >= 8.0.0
|
|
77
|
+
- Internet connection is required to download kimu-core from npm
|
|
78
|
+
- Uses kimu-core from npm registry (https://www.npmjs.com/package/kimu-core)
|
|
79
|
+
- All framework files are copied locally, making the project fully independent
|
|
80
|
+
- The `kimu-build-config.ts` is auto-generated based on your environment
|
|
81
|
+
|
|
82
|
+
## Next Steps After Creation
|
|
83
|
+
```bash
|
|
84
|
+
# Navigate to project
|
|
85
|
+
cd my-app
|
|
86
|
+
|
|
87
|
+
# Start development server
|
|
88
|
+
npm run dev
|
|
89
|
+
|
|
90
|
+
# Build for production
|
|
91
|
+
npm run build
|
|
92
|
+
|
|
93
|
+
# Check project info
|
|
94
|
+
kimu info --verbose
|
|
95
|
+
```
|
|
52
96
|
|
|
53
97
|
## Future features (planned)
|
|
54
98
|
- Template support (`--template basic|dashboard|chat`)
|
|
55
|
-
-
|
|
56
|
-
- Offline mode with cached
|
|
57
|
-
-
|
|
58
|
-
-
|
|
99
|
+
- Interactive prompts for project configuration
|
|
100
|
+
- Offline mode with cached templates
|
|
101
|
+
- Custom npm registry support
|
|
102
|
+
- Module pre-selection during creation
|
|
103
|
+
- Extension marketplace integration
|
package/docs/commands/install.md
CHANGED
|
@@ -6,13 +6,21 @@ Install modules and extensions for your KIMU project.
|
|
|
6
6
|
```bash
|
|
7
7
|
kimu install module <name> [options]
|
|
8
8
|
kimu install extension <name> [options]
|
|
9
|
-
kimu install <name> [options]
|
|
10
9
|
```
|
|
11
10
|
|
|
12
11
|
## Arguments
|
|
13
12
|
- `module <name>`: install a specific module from the KIMU modules registry
|
|
14
13
|
- `extension <name>`: install a specific extension from the KIMU extensions registry
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
> ⚠️ **It is strongly recommended to always specify `module` or `extension` explicitly.**
|
|
16
|
+
> The generic `kimu install <name>` syntax is discouraged to avoid ambiguity with third-party or similarly named packages.
|
|
17
|
+
|
|
18
|
+
## Abbreviations
|
|
19
|
+
|
|
20
|
+
You can use short aliases for install commands:
|
|
21
|
+
|
|
22
|
+
- `kimu i m <name>` → `kimu install module <name>`
|
|
23
|
+
- `kimu i e <name>` → `kimu install extension <name>`
|
|
16
24
|
|
|
17
25
|
## Options
|
|
18
26
|
- `--save-dev`: install as development dependency
|
|
@@ -25,12 +33,13 @@ kimu install <name> [options]
|
|
|
25
33
|
```bash
|
|
26
34
|
# Install a module
|
|
27
35
|
kimu install module router
|
|
36
|
+
# Or using abbreviation
|
|
37
|
+
kimu i m router
|
|
28
38
|
|
|
29
39
|
# Install an extension
|
|
30
40
|
kimu install extension dashboard
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
kimu install analytics
|
|
41
|
+
# Or using abbreviation
|
|
42
|
+
kimu i e dashboard
|
|
34
43
|
|
|
35
44
|
# Install specific version
|
|
36
45
|
kimu install module router --version 1.2.0
|
|
@@ -40,8 +49,29 @@ kimu install module router --registry https://custom-registry.com
|
|
|
40
49
|
|
|
41
50
|
# Force reinstall
|
|
42
51
|
kimu install module router --force
|
|
52
|
+
|
|
53
|
+
# Verbose output
|
|
54
|
+
kimu install module analytics --verbose
|
|
43
55
|
```
|
|
44
56
|
|
|
57
|
+
## Listing available and installed modules/extensions
|
|
58
|
+
|
|
59
|
+
To list available modules/extensions from the registry:
|
|
60
|
+
```bash
|
|
61
|
+
kimu list modules # Shows all modules with [installed] marker
|
|
62
|
+
kimu list extensions # Shows all extensions with [installed] marker
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
To list only installed modules/extensions in your project:
|
|
66
|
+
```bash
|
|
67
|
+
kimu list installed # Shows installed modules and extensions
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The `list modules` and `list extensions` commands show:
|
|
71
|
+
- ✓ Green checkmark for installed packages
|
|
72
|
+
- ○ Gray circle for available packages
|
|
73
|
+
- `[installed]` label for clarity
|
|
74
|
+
|
|
45
75
|
## What it does
|
|
46
76
|
- Downloads the specified module or extension from the registry
|
|
47
77
|
- Resolves and installs dependencies
|
|
@@ -62,6 +92,20 @@ kimu install module router --force
|
|
|
62
92
|
- Custom registries supported via `--registry` option
|
|
63
93
|
|
|
64
94
|
## Status
|
|
65
|
-
|
|
66
|
-
- Current status:
|
|
67
|
-
- Target: Full registry integration
|
|
95
|
+
✅ **Command available (mock version)**
|
|
96
|
+
- Current status: The install command is available and simulates the installation of modules or extensions from the registry (mock). The real logic for download and integration will be added in future releases.
|
|
97
|
+
- Target: Full registry integration and dependency resolution coming soon.
|
|
98
|
+
|
|
99
|
+
### Current behavior (December 2025)
|
|
100
|
+
- The command accepts the name of a module or extension and shows a simulated installation.
|
|
101
|
+
- You must specify `module` or `extension` explicitly.
|
|
102
|
+
- Example:
|
|
103
|
+
```bash
|
|
104
|
+
kimu install module router
|
|
105
|
+
kimu i m router
|
|
106
|
+
kimu install extension kimu-home
|
|
107
|
+
kimu i e kimu-dashboard
|
|
108
|
+
kimu install module analytics --verbose
|
|
109
|
+
```
|
|
110
|
+
- Simulated success or error output.
|
|
111
|
+
- The structure is ready to be connected to a real registry.
|
package/docs/commands/list.md
CHANGED
|
@@ -4,82 +4,70 @@ List available and installed modules and extensions.
|
|
|
4
4
|
|
|
5
5
|
## Syntax
|
|
6
6
|
```bash
|
|
7
|
-
kimu list
|
|
7
|
+
kimu list modules [options]
|
|
8
|
+
kimu list extensions [options]
|
|
9
|
+
kimu list installed [options]
|
|
8
10
|
```
|
|
9
11
|
|
|
12
|
+
## Abbreviations
|
|
13
|
+
|
|
14
|
+
You can use short aliases for list commands:
|
|
15
|
+
|
|
16
|
+
- `kimu l m` → `kimu list modules`
|
|
17
|
+
- `kimu l e` → `kimu list extensions`
|
|
18
|
+
- `kimu l i` → `kimu list installed`
|
|
19
|
+
|
|
10
20
|
## Arguments
|
|
11
21
|
- `modules`: list available modules from registry
|
|
12
22
|
- `extensions`: list available extensions from registry
|
|
13
|
-
- `installed`: list currently installed modules and extensions
|
|
14
|
-
- `templates`: list available project templates
|
|
23
|
+
- `installed`: list currently installed modules and extensions in your project
|
|
15
24
|
|
|
16
25
|
## Options
|
|
17
|
-
- `--
|
|
18
|
-
- `--verbose`: show detailed information
|
|
19
|
-
- `--registry <url>`: use custom registry URL
|
|
20
|
-
- `--filter <pattern>`: filter results by name pattern
|
|
21
|
-
- `--updates`: show available updates for installed packages
|
|
26
|
+
- `--verbose`: show detailed information (descriptions, etc.)
|
|
22
27
|
|
|
23
28
|
## Examples
|
|
24
29
|
```bash
|
|
25
30
|
# List all available modules
|
|
26
31
|
kimu list modules
|
|
32
|
+
# Or using abbreviation
|
|
33
|
+
kimu l m
|
|
27
34
|
|
|
28
35
|
# List all available extensions
|
|
29
36
|
kimu list extensions
|
|
37
|
+
# Or using abbreviation
|
|
38
|
+
kimu l e
|
|
30
39
|
|
|
31
|
-
# List installed packages
|
|
40
|
+
# List installed packages in current project
|
|
32
41
|
kimu list installed
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
kimu list templates
|
|
36
|
-
|
|
37
|
-
# Output in JSON format
|
|
38
|
-
kimu list modules --json
|
|
42
|
+
# Or using abbreviation
|
|
43
|
+
kimu l i
|
|
39
44
|
|
|
40
45
|
# Show detailed information
|
|
41
|
-
kimu list
|
|
42
|
-
|
|
43
|
-
# Filter by pattern
|
|
44
|
-
kimu list modules --filter "router*"
|
|
45
|
-
|
|
46
|
-
# Check for updates
|
|
47
|
-
kimu list installed --updates
|
|
46
|
+
kimu list modules --verbose
|
|
47
|
+
kimu l e --verbose
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Output Information
|
|
51
51
|
|
|
52
|
-
###
|
|
52
|
+
### `kimu list modules` and `kimu list extensions` show:
|
|
53
53
|
- Package name and version
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
- Author information
|
|
60
|
-
- Dependencies
|
|
61
|
-
- Compatibility requirements
|
|
62
|
-
- Last update date
|
|
63
|
-
- Download statistics
|
|
64
|
-
|
|
65
|
-
### Update checking shows:
|
|
66
|
-
- Current installed version
|
|
67
|
-
- Latest available version
|
|
68
|
-
- Update priority (patch/minor/major)
|
|
69
|
-
- Changelog summary
|
|
54
|
+
- Installation status with visual indicators:
|
|
55
|
+
- ✓ (green checkmark) for installed packages
|
|
56
|
+
- ○ (gray circle) for available packages
|
|
57
|
+
- `[installed]` label for clarity
|
|
58
|
+
- With `--verbose`: full description
|
|
70
59
|
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
- Supports filtering and search functionality
|
|
60
|
+
### `kimu list installed` shows:
|
|
61
|
+
- All modules and extensions currently installed in your project
|
|
62
|
+
- Read from `kimu.config.json`
|
|
63
|
+
- Grouped by type (Modules and Extensions)
|
|
76
64
|
|
|
77
|
-
##
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
65
|
+
## Notes
|
|
66
|
+
- `list modules` and `list extensions` read from registry and check installation status from `kimu.config.json`
|
|
67
|
+
- `list installed` only shows packages actually installed in your project
|
|
68
|
+
- Must be run from within a KIMU project directory (for installation status)
|
|
81
69
|
|
|
82
70
|
## Status
|
|
83
|
-
|
|
84
|
-
- Current status:
|
|
85
|
-
- Target: Full registry
|
|
71
|
+
✅ **Command available (mock version)**
|
|
72
|
+
- Current status: The list command is available and reads installation status from kimu.config.json. Registry data is mocked, real registry integration coming soon.
|
|
73
|
+
- Target: Full registry integration with real-time data and search functionality.
|