@akanjs/cli 0.0.141 โ 0.0.142
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/README.md +286 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# โก AkanJS CLI
|
|
2
|
+
|
|
3
|
+
The official command-line interface for the AkanJS ecosystem, providing powerful development tools for creating, managing, and deploying modern web applications with ease.
|
|
4
|
+
|
|
5
|
+
## ๐ Get Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
2
8
|
|
|
3
9
|
- Node.js >=23.x
|
|
4
10
|
- pnpm >=10.x
|
|
5
11
|
- docker
|
|
6
12
|
- (temporary) access permission to akan-team github organization
|
|
7
13
|
|
|
8
|
-
|
|
14
|
+
### How to create your project
|
|
9
15
|
|
|
10
16
|
```bash
|
|
11
17
|
npm install -g @akanjs/cli --latest
|
|
@@ -17,7 +23,7 @@ akan create-workspace
|
|
|
17
23
|
# application name?
|
|
18
24
|
```
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
### How to start your project
|
|
21
27
|
|
|
22
28
|
```bash
|
|
23
29
|
cd <workspace-name> && akan start <app-name> --open
|
|
@@ -27,7 +33,7 @@ you can navigate to default webpage
|
|
|
27
33
|
|
|
28
34
|
- home: http://localhost:4200
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
### Recipes
|
|
31
37
|
|
|
32
38
|
```bash
|
|
33
39
|
# set llm model
|
|
@@ -39,3 +45,279 @@ akan create-module
|
|
|
39
45
|
# create scalar with ai (experimental)
|
|
40
46
|
akan create-scalar
|
|
41
47
|
```
|
|
48
|
+
|
|
49
|
+
## โจ Features
|
|
50
|
+
|
|
51
|
+
The `@akanjs/cli` is a comprehensive development toolkit that streamlines the entire application lifecycle:
|
|
52
|
+
|
|
53
|
+
### ๐๏ธ **Workspace Management** (`workspace`)
|
|
54
|
+
|
|
55
|
+
Complete workspace and project management:
|
|
56
|
+
|
|
57
|
+
- **๐ Project Initialization**
|
|
58
|
+
- `create-workspace` - Create new AkanJS workspace with organization setup
|
|
59
|
+
- `generate-mongo` - Generate MongoDB configuration and setup
|
|
60
|
+
- `lint` / `lint-all` - Code linting with auto-fix capabilities
|
|
61
|
+
|
|
62
|
+
### ๐ฑ **Application Lifecycle** (`application`)
|
|
63
|
+
|
|
64
|
+
Full-stack application development and deployment:
|
|
65
|
+
|
|
66
|
+
- **๐ง Application Management**
|
|
67
|
+
- `create-application` - Scaffold new applications with templates
|
|
68
|
+
- `remove-application` - Clean application removal
|
|
69
|
+
- `sync-application` - Synchronize application dependencies
|
|
70
|
+
|
|
71
|
+
- **๐๏ธ Build System**
|
|
72
|
+
- `build` - Complete application build
|
|
73
|
+
- `build-backend` - Server-side build optimization
|
|
74
|
+
- `build-frontend` - Client-side build with Next.js
|
|
75
|
+
- `build-csr` - Client-side rendering build
|
|
76
|
+
- `build-ios` - iOS native app compilation
|
|
77
|
+
- `build-android` - Android native app compilation
|
|
78
|
+
|
|
79
|
+
- **๐ Development Server**
|
|
80
|
+
- `start` - Full-stack development server
|
|
81
|
+
- `start-backend` - GraphQL backend server
|
|
82
|
+
- `start-frontend` - Next.js frontend server with Turbo support
|
|
83
|
+
- `start-csr` - Client-side rendering server
|
|
84
|
+
- `start-ios` - iOS simulator with live reload
|
|
85
|
+
- `start-android` - Android emulator with live reload
|
|
86
|
+
|
|
87
|
+
- **๐ฆ Release Management**
|
|
88
|
+
- `release-ios` - iOS App Store deployment
|
|
89
|
+
- `release-android` - Google Play deployment
|
|
90
|
+
- `release-source` - Source code release with versioning
|
|
91
|
+
|
|
92
|
+
- **๐๏ธ Database Operations**
|
|
93
|
+
- `dump-database` - Database backup across environments
|
|
94
|
+
- `restore-database` - Database restoration with environment selection
|
|
95
|
+
- `pull-database` - Pull remote database locally
|
|
96
|
+
- `dbup` / `dbdown` - Local database container management
|
|
97
|
+
|
|
98
|
+
### ๐ **Library Management** (`library`)
|
|
99
|
+
|
|
100
|
+
Modular library system for code reusability:
|
|
101
|
+
|
|
102
|
+
- **๐ฆ Library Operations**
|
|
103
|
+
- `create-library` - Create new shared libraries
|
|
104
|
+
- `remove-library` - Clean library removal
|
|
105
|
+
- `sync-library` - Synchronize library dependencies
|
|
106
|
+
- `install-library` - Install existing libraries into workspace
|
|
107
|
+
|
|
108
|
+
- **๐ Version Control Integration**
|
|
109
|
+
- `push-library` - Push library changes to remote repository
|
|
110
|
+
- `pull-library` - Pull latest library updates
|
|
111
|
+
|
|
112
|
+
### ๐งฉ **Module Development** (`module`)
|
|
113
|
+
|
|
114
|
+
AI-powered module generation and management:
|
|
115
|
+
|
|
116
|
+
- **๐ค Smart Module Creation**
|
|
117
|
+
- `create-module` - Generate modules with AI assistance
|
|
118
|
+
- `create-scalar` - Create scalar data models
|
|
119
|
+
- `remove-module` - Module cleanup with dependency checks
|
|
120
|
+
|
|
121
|
+
- **๐จ Component Generation**
|
|
122
|
+
- `create-view` - Generate React view components
|
|
123
|
+
- `create-unit` - Create reusable unit components
|
|
124
|
+
- `create-template` - Generate component templates
|
|
125
|
+
|
|
126
|
+
### ๐ **Page Generation** (`page`)
|
|
127
|
+
|
|
128
|
+
Dynamic page scaffolding:
|
|
129
|
+
|
|
130
|
+
- **๐ Page Management**
|
|
131
|
+
- `create-page` - Generate Next.js pages with routing
|
|
132
|
+
|
|
133
|
+
### โ๏ธ **Cloud Integration** (`cloud`)
|
|
134
|
+
|
|
135
|
+
Seamless cloud services and AI integration:
|
|
136
|
+
|
|
137
|
+
- **๐ Authentication**
|
|
138
|
+
- `login` / `logout` - Cloud service authentication
|
|
139
|
+
- User session and credential management
|
|
140
|
+
|
|
141
|
+
- **๐ค AI Development Assistant**
|
|
142
|
+
- `set-llm` / `reset-llm` - Configure AI language models
|
|
143
|
+
- `ask` - Interactive AI development assistance
|
|
144
|
+
|
|
145
|
+
- **๐ Deployment**
|
|
146
|
+
- `deploy-akan` - Deploy to AkanJS cloud infrastructure
|
|
147
|
+
- `update` - Update CLI and cloud integrations
|
|
148
|
+
|
|
149
|
+
### ๐ฆ **Package Operations** (`package`)
|
|
150
|
+
|
|
151
|
+
NPM package management and publishing:
|
|
152
|
+
|
|
153
|
+
- **๐ง Package Lifecycle**
|
|
154
|
+
- Package building and optimization
|
|
155
|
+
- NPM publishing with versioning
|
|
156
|
+
- Dependency management
|
|
157
|
+
|
|
158
|
+
## ๐ Usage Examples
|
|
159
|
+
|
|
160
|
+
### Workspace Management
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Create new workspace
|
|
164
|
+
akan create-workspace "acme-corp" --app "web-app" --dir "./projects"
|
|
165
|
+
|
|
166
|
+
# Setup MongoDB for development
|
|
167
|
+
akan generate-mongo
|
|
168
|
+
|
|
169
|
+
# Lint entire workspace
|
|
170
|
+
akan lint-all --fix
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Application Development
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Create new application
|
|
177
|
+
akan create-application "mobile-app" --start
|
|
178
|
+
|
|
179
|
+
# Start full development environment
|
|
180
|
+
akan start web-app --open
|
|
181
|
+
|
|
182
|
+
# Build for production
|
|
183
|
+
akan build web-app
|
|
184
|
+
|
|
185
|
+
# Start backend only
|
|
186
|
+
akan start-backend web-app --open # Opens GraphQL playground
|
|
187
|
+
|
|
188
|
+
# Build and start mobile app
|
|
189
|
+
akan build-ios mobile-app
|
|
190
|
+
akan start-ios mobile-app --open --release
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Library Management
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Create shared library
|
|
197
|
+
akan create-library "ui-components"
|
|
198
|
+
|
|
199
|
+
# Install existing library
|
|
200
|
+
akan install-library "util"
|
|
201
|
+
|
|
202
|
+
# Update library from remote
|
|
203
|
+
akan pull-library "shared" --branch main
|
|
204
|
+
|
|
205
|
+
# Push library changes (development)
|
|
206
|
+
akan push-library "ui-components" --branch feature/new-buttons
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### AI-Powered Module Creation
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Create module with AI assistance
|
|
213
|
+
akan create-module "user-profile" \
|
|
214
|
+
--description "User profile management with avatar upload" \
|
|
215
|
+
--schema-description "User entity with profile fields and file relationships" \
|
|
216
|
+
--ai
|
|
217
|
+
|
|
218
|
+
# Create scalar data model
|
|
219
|
+
akan create-scalar "address" \
|
|
220
|
+
--description "Address information for users" \
|
|
221
|
+
--schema-description "Street, city, country, postal code fields"
|
|
222
|
+
|
|
223
|
+
# Generate view components
|
|
224
|
+
akan create-view # Interactive selection
|
|
225
|
+
akan create-unit # Interactive selection
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Cloud & AI Integration
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Setup cloud authentication
|
|
232
|
+
akan login
|
|
233
|
+
|
|
234
|
+
# Configure AI assistant
|
|
235
|
+
akan set-llm
|
|
236
|
+
|
|
237
|
+
# Get AI development help
|
|
238
|
+
akan ask "How do I implement user authentication with JWT?"
|
|
239
|
+
|
|
240
|
+
# Deploy to cloud
|
|
241
|
+
akan deploy-akan
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Database Operations
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# Backup production database
|
|
248
|
+
akan dump-database web-app --environment main
|
|
249
|
+
|
|
250
|
+
# Restore from staging to development
|
|
251
|
+
akan restore-database web-app --source develop --target debug
|
|
252
|
+
|
|
253
|
+
# Pull remote database locally
|
|
254
|
+
akan pull-database web-app --env debug --dump
|
|
255
|
+
|
|
256
|
+
# Start local database
|
|
257
|
+
akan dbup
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## ๐๏ธ Architecture
|
|
261
|
+
|
|
262
|
+
The CLI follows a modular command structure:
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
pkgs/@akanjs/cli/
|
|
266
|
+
โโโ src/
|
|
267
|
+
โ โโโ workspace/ # Workspace management commands
|
|
268
|
+
โ โโโ application/ # Application lifecycle commands
|
|
269
|
+
โ โโโ library/ # Library management commands
|
|
270
|
+
โ โโโ module/ # AI-powered module generation
|
|
271
|
+
โ โโโ page/ # Page scaffolding commands
|
|
272
|
+
โ โโโ package/ # NPM package operations
|
|
273
|
+
โ โโโ cloud/ # Cloud services integration
|
|
274
|
+
โ โโโ templates/ # Code generation templates
|
|
275
|
+
โโโ index.ts # CLI entry point
|
|
276
|
+
โโโ package.json # Dependencies and configuration
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## ๐ค AI-Powered Development
|
|
280
|
+
|
|
281
|
+
The CLI integrates advanced AI capabilities:
|
|
282
|
+
|
|
283
|
+
- **๐ง Smart Code Generation** - AI analyzes requirements and generates optimized code
|
|
284
|
+
- **๐ Schema Intelligence** - Automatic database schema generation from descriptions
|
|
285
|
+
- **๐ Context-Aware Assistance** - AI understands your project structure for better suggestions
|
|
286
|
+
- **โก Rapid Prototyping** - Generate complete modules with business logic in seconds
|
|
287
|
+
|
|
288
|
+
## ๐ ๏ธ Advanced Features
|
|
289
|
+
|
|
290
|
+
- **๐ Hot Reload** - Instant development feedback across all platforms
|
|
291
|
+
- **๐ฑ Cross-Platform** - Build web, iOS, and Android from single codebase
|
|
292
|
+
- **๐ฏ TypeScript First** - Full TypeScript support with strict type checking
|
|
293
|
+
- **๐ GraphQL Integration** - Built-in GraphQL server and client generation
|
|
294
|
+
- **๐ Security Built-in** - JWT authentication, RBAC, and security best practices
|
|
295
|
+
- **๐ Performance Monitoring** - Built-in performance tracking and optimization
|
|
296
|
+
- **๐งช Testing Framework** - Integrated Jest and Playwright testing
|
|
297
|
+
- **๐ฆ Micro-frontends** - Support for modular frontend architecture
|
|
298
|
+
|
|
299
|
+
## ๐ค Contributing
|
|
300
|
+
|
|
301
|
+
1. Fork the repository
|
|
302
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
303
|
+
3. Commit your changes (`git commit -m 'Add amazing CLI feature'`)
|
|
304
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
305
|
+
5. Open a Pull Request
|
|
306
|
+
|
|
307
|
+
## ๐ License
|
|
308
|
+
|
|
309
|
+
This project is part of the AkanJS ecosystem. See the main repository for license information.
|
|
310
|
+
|
|
311
|
+
## ๐ Related Packages
|
|
312
|
+
|
|
313
|
+
- [`@akanjs/devkit`](../devkit) - Development toolkit and command infrastructure
|
|
314
|
+
- [`@akanjs/base`](../base) - Core foundation
|
|
315
|
+
- [`@akanjs/common`](../common) - Shared utilities
|
|
316
|
+
- [`@akanjs/nest`](../nest) - NestJS integrations
|
|
317
|
+
- [`@akanjs/next`](../next) - Next.js utilities
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
<p align="center">
|
|
322
|
+
<strong>Built with โค๏ธ by the AkanJS team</strong>
|
|
323
|
+
</p>
|