@burger-api/cli 0.7.0 → 0.7.1

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 CHANGED
@@ -1,79 +1,57 @@
1
- # Burger API CLI
1
+ # BurgerAPI CLI 👨‍💻
2
2
 
3
- Simple command-line tool for creating and managing Burger API projects.
3
+ A Command-Line Tool for Creating and Managing BurgerAPI Projects.
4
4
 
5
5
  ## Installation
6
6
 
7
- ### Option 1: npm/bun (Recommended if you have Bun installed)
7
+ ### Option 1: Bun Global Installation (Recommended if you have Bun installed)
8
+
9
+ **Global Installation:**
8
10
 
9
- **Global installation:**
10
11
  ```bash
11
12
  bun add -g @burger-api/cli
12
13
  ```
13
14
 
14
- **Or use with bunx (no installation needed):**
15
+ **Or use with bunx (No Installation Needed):**
16
+
15
17
  ```bash
16
18
  bunx @burger-api/cli create my-project
17
19
  ```
18
20
 
19
- ### Option 2: Standalone Executable
21
+ ### Option 2: Standalone Executable (Alternative Installation Method)
20
22
 
21
23
  **macOS, Linux, WSL:**
24
+
22
25
  ```bash
23
26
  curl -fsSL https://burger-api.com/install.sh | bash
24
27
  ```
25
28
 
26
29
  **Windows PowerShell:**
30
+
27
31
  ```powershell
28
32
  irm https://burger-api.com/install.ps1 | iex
29
33
  ```
30
34
 
31
- ### Option 3: Manual Download
35
+ ### Option 3: Manual Download (Alternative Installation Method)
32
36
 
33
- 1. Download the executable for your platform from [GitHub Releases](https://github.com/isfhan/burger-api/releases/latest)
37
+ 1. Download the executable for your platform from
38
+ [GitHub Releases](https://github.com/isfhan/burger-api/releases/latest)
34
39
  2. Add to PATH
35
40
  3. Make executable (Linux/macOS): `chmod +x burger-api`
36
41
 
37
- ### Verify Installation
42
+ ### Verify Installation (To Check if the CLI is Installed Correctly)
38
43
 
39
44
  ```bash
40
45
  burger-api --version
41
46
  ```
42
47
 
43
- ## Quick Start
44
-
45
- Create a new project in 30 seconds:
46
-
47
- ```bash
48
- # Create a new project
49
- burger-api create my-awesome-api
50
-
51
- # Navigate to your project
52
- cd my-awesome-api
53
-
54
- # Start development server
55
- bun run dev
56
-
57
- # Open http://localhost:4000 in your browser
58
- ```
59
-
60
- That's it! Your Burger API server is running! 🎉
61
-
62
- ---
63
-
64
- ## Commands
48
+ ## Available Commands (To Manage Your Project)
65
49
 
66
50
  ### `burger-api create <project-name>`
67
51
 
68
52
  Create a new Burger API project with interactive prompts.
69
53
 
70
- **Example:**
71
-
72
- ```bash
73
- burger-api create my-api
74
- ```
75
-
76
- The CLI will ask you:
54
+ **Questions You Will Be Asked:**
77
55
 
78
56
  - Do you need API routes? (yes/no)
79
57
  - API directory name (default: api)
@@ -346,69 +324,24 @@ export async function POST(req: BurgerRequest) {
346
324
 
347
325
  That's it! The route is automatically available at `/api/users`
348
326
 
349
- ## Common Workflows
350
-
351
- ### Workflow 1: Create and Run a Project
352
-
353
- ```bash
354
- # 1. Create project
355
- burger-api create my-api
327
+ ### Adding Pages
356
328
 
357
- # 2. Navigate to it
358
- cd my-api
329
+ Create a new file in the `pages/` folder:
359
330
 
360
- # 3. Start dev server
361
- bun run dev
362
-
363
- # 4. Make changes and see them instantly!
331
+ ```html
332
+ <!-- pages/about.html -->
333
+ <html>
334
+ <body>
335
+ <h1>About Page</h1>
336
+ <p>This is the about page.</p>
337
+ </body>
338
+ </html>
364
339
  ```
365
340
 
366
- ### Workflow 2: Add Middleware
367
-
368
- ```bash
369
- # 1. See what's available
370
- burger-api list
371
-
372
- # 2. Add what you need
373
- burger-api add cors logger rate-limiter
374
-
375
- # 3. Use them in index.ts (CLI shows you how!)
376
- ```
377
-
378
- ### Workflow 3: Build for Production
379
-
380
- ```bash
381
- # 1. Test your app works
382
- burger-api serve
383
-
384
- # 2. Build an executable
385
- burger-api build:executable index.ts --target bun-linux-x64
386
-
387
- # 3. Deploy to your server
388
- scp .build/my-api user@server:/opt/
389
- ssh user@server
390
- chmod +x /opt/my-api
391
- /opt/my-api
392
- ```
341
+ That's it! The page is automatically available at `/about`
393
342
 
394
343
  ## Troubleshooting
395
344
 
396
- ### "burger-api: command not found"
397
-
398
- **Solution:** Install the CLI using the install script:
399
-
400
- **macOS/Linux:**
401
- ```bash
402
- curl -fsSL https://burger-api.com/install.sh | bash
403
- ```
404
-
405
- **Windows:**
406
- ```powershell
407
- irm https://burger-api.com/install.ps1 | iex
408
- ```
409
-
410
- Or manually download from [GitHub Releases](https://github.com/isfhan/burger-api/releases/latest) and add to PATH.
411
-
412
345
  ### "Directory already exists"
413
346
 
414
347
  **Solution:** Choose a different project name or remove the existing directory:
@@ -602,30 +535,6 @@ bun run ../src/index.ts serve
602
535
  - **Simple language** - No jargon, clear explanations
603
536
  - **Well commented** - Explain why, not just what
604
537
 
605
- ---
606
-
607
- ## Release Process
608
-
609
- For maintainers releasing new versions:
610
-
611
- 1. **Update versions** in `package.json` and `src/index.ts`
612
- 2. **Update CHANGELOG.md** with all changes
613
- 3. **Create and push a version tag:**
614
- ```bash
615
- git tag v1.0.0
616
- git push origin v1.0.0
617
- ```
618
- 4. **GitHub Actions automatically:**
619
- - Builds executables for all platforms (Linux, Windows, macOS ARM64, macOS Intel)
620
- - Creates a GitHub Release with all executables attached
621
- - Generates SHA256 checksums for verification
622
-
623
- The release workflow is triggered automatically when you push a tag matching `v*` pattern.
624
-
625
- See [CHANGELOG.md](./CHANGELOG.md) for version history.
626
-
627
- ---
628
-
629
538
  ## Technical Details
630
539
 
631
540
  **Built with:**
@@ -653,4 +562,4 @@ See [CHANGELOG.md](./CHANGELOG.md) for version history.
653
562
 
654
563
  MIT License - See [LICENSE](../../LICENSE) for details.
655
564
 
656
- **Built with ❤️ for the Burger API community**
565
+ **Built with ❤️ for the BurgerAPI community**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burger-api/cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Simple command-line tool for Burger API projects",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -28,7 +28,7 @@ const program = new Command();
28
28
  program
29
29
  .name('burger-api')
30
30
  .description('Simple tool to work with BurgerAPI projects')
31
- .version('0.7.0');
31
+ .version('0.7.1');
32
32
 
33
33
  // Add all our commands to the CLI
34
34
  // Each command is defined in its own file for better organization
@@ -403,7 +403,7 @@ const LOGO_TEXT = `
403
403
  ██╔╝ ██╔══██╗██║ ██║██╔══██╗██║ ╚██╗██╔══╝ ██╔══██╗██╔══██║██╔═══╝ ██║
404
404
  ██╔╝ ██████╦╝╚██████╔╝██║ ██║╚██████╔╝███████╗██║ ██║██║ ██║██║ ██║
405
405
  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
406
- CLI tool for BurgerAPI projects - v0.7.0
406
+ CLI tool for BurgerAPI projects - v0.7.1
407
407
  `.trim();
408
408
 
409
409
  /**
@@ -931,7 +931,7 @@ export function generateIndexPage(projectName: string): string {
931
931
 
932
932
  <!-- Footer -->
933
933
  <footer class="footer">
934
- <div class="version">BurgerAPI v0.7.0 • Bun v1.3+</div>
934
+ <div class="version">BurgerAPI v0.7.1 • Bun v1.3+</div>
935
935
  <div class="social-links">
936
936
  <a href="https://github.com/isfhan/burger-api" target="_blank">GitHub</a>
937
937
  <a href="https://www.npmjs.com/package/burger-api" target="_blank">NPM</a>