apiforge 0.1.0

Production-grade API release automation CLI. From merged code to healthy pods in production β€” one command.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# Apiforge πŸ”₯

> Production-grade API release automation CLI. From merged code to healthy pods in production β€” one command, zero tribal knowledge required.

[![Rust](https://img.shields.io/badge/rust-1.70%2B-orange.svg)](https://www.rust-lang.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

---

## The Problem

Releasing an API to production typically involves:

1. ✏️ Bumping version numbers in multiple files
2. πŸ“ Writing changelog entries manually
3. πŸ“¦ Building Docker images with correct tags
4. πŸ” Authenticating with container registries (ECR, DockerHub, GHCR)
5. ⬆️ Pushing images to the registry
6. ☸️ Updating Kubernetes deployments
7. ⏳ Waiting for rollouts to complete
8. πŸ₯ Running health checks
9. 🏷️ Creating Git tags and GitHub releases
10. πŸ“’ Sending notifications to Slack/webhooks
11. πŸ”™ Rolling back if anything fails

**This is error-prone, time-consuming, and requires tribal knowledge.**

## The Solution

```bash
apiforge release patch
```

**One command. That's it.** Apiforge handles the entire pipeline automatically:

- βœ… Validates your environment before making any changes
- βœ… Bumps versions in Cargo.toml, package.json, etc.
- βœ… Generates changelogs from commit messages
- βœ… Builds, tags, and pushes Docker images
- βœ… Updates Kubernetes deployments
- βœ… Monitors rollout progress
- βœ… Runs health checks
- βœ… Creates Git tags and GitHub releases
- βœ… Sends success/failure notifications
- βœ… **Automatically rolls back on failure**

---

## Table of Contents

- [Installation]#installation
- [Quick Start]#quick-start
- [Commands]#commands
- [Configuration]#configuration
- [How It Works]#how-it-works
- [Supported Integrations]#supported-integrations
- [CI/CD Integration]#cicd-integration
- [Troubleshooting]#troubleshooting
- [Contributing]#contributing

---

## Installation

### Option 1: Install from Cargo (Recommended for Rust users)

```bash
cargo install apiforge
```

### Option 2: Download Prebuilt Binary

```bash
# Linux (x86_64)
curl -L https://github.com/PrazwalR/Apiforge/releases/latest/download/apiforge-linux-x86_64 -o apiforge
chmod +x apiforge
sudo mv apiforge /usr/local/bin/

# macOS (Apple Silicon)
curl -L https://github.com/PrazwalR/Apiforge/releases/latest/download/apiforge-darwin-arm64 -o apiforge
chmod +x apiforge
sudo mv apiforge /usr/local/bin/

# macOS (Intel)
curl -L https://github.com/PrazwalR/Apiforge/releases/latest/download/apiforge-darwin-x86_64 -o apiforge
chmod +x apiforge
sudo mv apiforge /usr/local/bin/
```

### Option 3: Build from Source

```bash
git clone https://github.com/PrazwalR/Apiforge.git
cd Apiforge
cargo build --release
sudo cp target/release/apiforge /usr/local/bin/
```

### Verify Installation

```bash
apiforge --version
# apiforge 0.1.0
```

---

## Quick Start

### 1. Initialize Configuration

```bash
cd your-api-project
apiforge init
```

This creates `apiforge.toml` with sensible defaults based on your project.

### 2. Validate Your Environment

```bash
apiforge doctor
```

Output:
```
β–Έ Checking dependencies
  βœ“ git (2.39.0)
  βœ“ docker (24.0.5)
  βœ“ kubectl (1.28.0)

β–Έ Checking configuration
  βœ“ apiforge.toml found
  βœ“ Dockerfile exists
  βœ“ Kubernetes context 'prod' available

β–Έ Checking connectivity
  βœ“ Docker daemon accessible
  βœ“ Kubernetes cluster reachable
  βœ“ AWS credentials valid

βœ“ All checks passed! Ready to release.
```

### 3. Preview a Release (Dry Run)

```bash
apiforge release patch --dry-run
```

This shows exactly what will happen without making any changes.

### 4. Execute the Release

```bash
apiforge release patch
```

Output:
```
β–Έ Pre-flight checks
  βœ“ git-preflight
  βœ“ version-bump
  βœ“ docker-build
  βœ“ k8s-update

β–Έ Executing release pipeline
  βœ“ git-preflight         Repository clean, on main branch (12ms)
  βœ“ version-bump          Bumped version from 1.2.3 to 1.2.4 (5ms)
  βœ“ changelog             Generated changelog with 3 commits (8ms)
  βœ“ git-commit            Committed: Release v1.2.4 (15ms)
  βœ“ git-tag               Created tag v1.2.4 (3ms)
  βœ“ docker-build          Built image sha256:abc123 with tags: 1.2.4, latest (45s)
  βœ“ docker-push           Pushed 123456789.dkr.ecr.us-east-1.amazonaws.com/my-api:1.2.4 (12s)
  βœ“ git-push              Pushed to origin/main (2s)
  βœ“ k8s-update            Updated deployment api-server container 'api' to 1.2.4 (1s)
  βœ“ k8s-rollout           Rollout complete: 3/3 replicas ready (25s)
  βœ“ health-check          Health check passed: https://api.example.com/health (500ms)
  βœ“ github-release        Created release v1.2.4 (800ms)

✨ Release 1.2.4 complete!
   12 steps executed successfully
```

---

## Commands

### `apiforge init`

Generates a configuration file for your project.

```bash
apiforge init
```

Detects your project type (Rust, Node.js, Python, Go, Java) and creates appropriate defaults.

### `apiforge doctor`

Validates your environment and configuration.

```bash
apiforge doctor
```

Checks:
- Required CLI tools (git, docker, kubectl)
- Configuration file validity
- Docker daemon connectivity
- Kubernetes cluster access
- AWS/GitHub credentials

### `apiforge release <bump>`

Executes the full release pipeline.

```bash
# Patch release (1.2.3 β†’ 1.2.4)
apiforge release patch

# Minor release (1.2.3 β†’ 1.3.0)
apiforge release minor

# Major release (1.2.3 β†’ 2.0.0)
apiforge release major
```

**Options:**

| Flag | Description |
|------|-------------|
| `--dry-run` | Preview without making changes |
| `--skip-docker` | Skip Docker build and push |
| `--skip-k8s` | Skip Kubernetes deployment |
| `--skip-github` | Skip GitHub release creation |
| `--skip-notify` | Skip notifications |
| `--no-changelog` | Skip changelog generation |
| `--output json` | Output results as JSON |
| `-y, --yes` | Skip confirmation prompt |

### `apiforge rollback`

Roll back to a previous version.

```bash
# Roll back to previous version (auto-detect)
apiforge rollback

# Roll back to specific version
apiforge rollback --to v1.2.3

# Preview rollback
apiforge rollback --dry-run
```

### `apiforge history`

View release history.

```bash
# Show recent releases
apiforge history

# Limit results
apiforge history --limit 5

# Filter by status
apiforge history --filter success
apiforge history --filter failed

# JSON output
apiforge history --output json
```

### `apiforge status`

Show current deployment status.

```bash
apiforge status
```

Output:
```
β–Έ Current State
  Project: my-api
  Language: rust
  Current Version: 1.2.4
  Git Branch: main
  Kubernetes Context: prod-cluster

β–Έ Deployment Status
  Namespace: production
  Deployment: api-server
  Ready: 3/3 replicas
  Image: 123456789.dkr.ecr.us-east-1.amazonaws.com/my-api:1.2.4
```

---

## Configuration

Apiforge uses `apiforge.toml` in your project root.

### Full Configuration Reference

```toml
# Project metadata
[project]
name = "my-api"
language = "rust"  # rust, node, python, go, java

# Git configuration
[git]
require_clean = true           # Require clean working tree
require_main_branch = true     # Only release from main/master
main_branch = "main"           # Name of main branch
tag_format = "v{version}"      # Tag format ({version} is replaced)
changelog = true               # Generate changelog
commit_message = "Release v{{ version }}"

# Docker configuration
[docker]
registry = "aws-ecr"           # aws-ecr, dockerhub, ghcr, custom
repository = "my-api"          # Repository name
dockerfile = "Dockerfile"      # Dockerfile path
context = "."                  # Build context
tags = ["{version}", "latest"] # Tag patterns

# Optional: Build arguments
[docker.build_args]
NODE_ENV = "production"
BUILD_DATE = "$(date -u +%Y-%m-%dT%H:%M:%SZ)"

# AWS configuration (for ECR)
[aws]
region = "us-east-1"
# profile = "production"       # Optional: AWS profile

# Kubernetes configuration
[kubernetes]
context = "prod-cluster"       # kubectl context name
namespace = "production"       # Target namespace
deployment = "api-server"      # Deployment name
image_field = "api"            # Container name or index ("0", "api", "sidecar")
rollout_timeout = 300          # Seconds to wait for rollout
min_ready_percent = 100        # Minimum ready replicas percentage

# GitHub configuration (optional)
[github]
token = "${GITHUB_TOKEN}"      # Environment variable reference
create_release = true
prerelease = false
draft = false
generate_notes = true          # Auto-generate release notes

# Health check (optional)
[health_check]
url = "https://api.example.com/health"
method = "GET"
expected_status = 200
timeout = 60                   # Seconds
interval = 5                   # Check interval
# expected_body_field = "status"
# expected_body_value = "healthy"

# Notifications (optional)
[notifications.slack]
webhook_url = "${SLACK_WEBHOOK_URL}"
channel = "#releases"
message = "πŸš€ {{ project }} {{ version }} released! {{ status_emoji }}"
```

### Environment Variables

Sensitive values can be referenced using `${VAR_NAME}` syntax:

```toml
[github]
token = "${GITHUB_TOKEN}"

[notifications.slack]
webhook_url = "${SLACK_WEBHOOK_URL}"
```

---

## How It Works

### Release Pipeline

When you run `apiforge release patch`, the following steps execute in order:

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Pre-flight     β”‚ ← Validates all steps before executing
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Git Preflight  β”‚ ← Checks clean tree, correct branch
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Version Bump   β”‚ ← Updates Cargo.toml/package.json
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Changelog      β”‚ ← Generates CHANGELOG.md from commits
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Git Commit     β”‚ ← Commits version + changelog
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Git Tag        β”‚ ← Creates version tag (e.g., v1.2.4)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Docker Build   β”‚ ← Builds image with version tags
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Docker Push    β”‚ ← Pushes to registry (ECR/DockerHub/GHCR)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Git Push       β”‚ ← Pushes commit and tag to remote
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  K8s Update     β”‚ ← Patches deployment with new image
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  K8s Rollout    β”‚ ← Waits for rollout to complete
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Health Check   β”‚ ← Verifies API is healthy
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  GitHub Release β”‚ ← Creates GitHub release with notes
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Notifications  β”‚ ← Sends Slack/webhook notifications
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

### Automatic Rollback

**If any step fails, Apiforge automatically rolls back completed steps in reverse order:**

```
Step 7 (K8s Update) FAILED!

β–Έ Rolling back completed steps
  βœ“ git-push (rolled back)       ← Reverts pushed commits
  βœ“ git-tag (rolled back)        ← Deletes created tag
  βœ“ git-commit (rolled back)     ← Resets to previous commit
  βœ“ changelog (rolled back)      ← Restores original file
  βœ“ version-bump (rolled back)   ← Restores original version

βœ— Release failed. All changes have been rolled back.
```

This ensures your repository and infrastructure never end up in an inconsistent state.

---

## Supported Integrations

### Container Registries

| Registry | Config Value | Authentication |
|----------|--------------|----------------|
| AWS ECR | `aws-ecr` | AWS credentials (env/profile/IAM role) |
| Docker Hub | `dockerhub` | `DOCKER_USERNAME` + `DOCKER_PASSWORD` |
| GitHub Container Registry | `ghcr` | `GITHUB_TOKEN` |
| Custom Registry | `custom` | Docker config.json |

### Languages

| Language | Version File | Detection |
|----------|-------------|-----------|
| Rust | `Cargo.toml` | `package.version` |
| Node.js | `package.json` | `version` |
| Python | `pyproject.toml` | (Coming soon) |
| Go | `go.mod` | (Coming soon) |
| Java | `pom.xml` | (Coming soon) |

### Kubernetes

- **Deployments**: Update container images
- **Rollout monitoring**: Wait for ready replicas
- **Automatic rollback**: Uses revision history

### Notifications

| Service | Configuration |
|---------|--------------|
| Slack | Webhook URL + message template |
| Custom Webhook | Any HTTP endpoint |

---

## CI/CD Integration

### GitHub Actions

```yaml
name: Release

on:
  workflow_dispatch:
    inputs:
      bump:
        description: 'Version bump type'
        required: true
        type: choice
        options:
          - patch
          - minor
          - major

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0  # Full history for changelog

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v4
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-east-1

      - name: Setup kubectl
        uses: azure/setup-kubectl@v3

      - name: Configure kubeconfig
        run: |
          aws eks update-kubeconfig --name my-cluster --region us-east-1

      - name: Install Apiforge
        run: |
          curl -L https://github.com/PrazwalR/Apiforge/releases/latest/download/apiforge-linux-x86_64 -o apiforge
          chmod +x apiforge
          sudo mv apiforge /usr/local/bin/

      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
        run: |
          apiforge release ${{ inputs.bump }} --yes
```

### GitLab CI

```yaml
release:
  stage: deploy
  image: rust:latest
  before_script:
    - cargo install apiforge
    - aws eks update-kubeconfig --name my-cluster
  script:
    - apiforge release patch --yes
  only:
    - main
  when: manual
```

---

## Troubleshooting

### "Docker daemon not accessible"

```bash
# Check Docker is running
docker ps

# If using Docker Desktop, ensure it's started
# If using Linux, check the socket
sudo systemctl status docker
```

### "Kubernetes context not found"

```bash
# List available contexts
kubectl config get-contexts

# Set the correct context in apiforge.toml
[kubernetes]
context = "your-context-name"
```

### "AWS credentials invalid"

```bash
# Check AWS credentials
aws sts get-caller-identity

# If using profiles, set in config
[aws]
profile = "your-profile"
```

### "Tag already exists"

Apiforge validates that the version tag doesn't exist before creating it. If you see this error:

```bash
# Either bump to a new version
apiforge release minor

# Or delete the existing tag (use with caution!)
git tag -d v1.2.4
git push origin :refs/tags/v1.2.4
```

### "Rollout timeout"

```bash
# Check pod status
kubectl get pods -n your-namespace

# Check events
kubectl describe deployment your-deployment -n your-namespace

# Increase timeout in config
[kubernetes]
rollout_timeout = 600  # 10 minutes
```

---

## Architecture

```
apiforge/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.rs              # CLI entry point
β”‚   β”œβ”€β”€ cli.rs               # Command definitions (clap)
β”‚   β”œβ”€β”€ config.rs            # Configuration parsing
β”‚   β”œβ”€β”€ error.rs             # Error types
β”‚   β”‚
β”‚   β”œβ”€β”€ integrations/        # External service clients
β”‚   β”‚   β”œβ”€β”€ aws.rs           # AWS ECR authentication
β”‚   β”‚   β”œβ”€β”€ docker.rs        # Docker build/push (bollard)
β”‚   β”‚   β”œβ”€β”€ git/             # Git operations (git2)
β”‚   β”‚   β”œβ”€β”€ github.rs        # GitHub releases (octocrab)
β”‚   β”‚   └── kubernetes.rs    # K8s deployments (kube-rs)
β”‚   β”‚
β”‚   β”œβ”€β”€ steps/               # Pipeline steps
β”‚   β”‚   β”œβ”€β”€ mod.rs           # Step trait definition
β”‚   β”‚   β”œβ”€β”€ docker/          # Docker build/push steps
β”‚   β”‚   β”œβ”€β”€ git/             # Git operations steps
β”‚   β”‚   β”œβ”€β”€ github/          # GitHub release step
β”‚   β”‚   β”œβ”€β”€ health/          # Health check step
β”‚   β”‚   β”œβ”€β”€ kubernetes/      # K8s update/rollout steps
β”‚   β”‚   └── notify/          # Notification steps
β”‚   β”‚
β”‚   β”œβ”€β”€ orchestrator/        # Pipeline execution engine
β”‚   β”œβ”€β”€ audit/               # Release history tracking
β”‚   β”œβ”€β”€ output/              # Colored terminal output
β”‚   └── utils/               # Version parsing, templates
β”‚
β”œβ”€β”€ apiforge.toml            # Example configuration
β”œβ”€β”€ Cargo.toml               # Rust dependencies
└── README.md                # This file
```

---

## Contributing

Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) first.

### Development Setup

```bash
# Clone the repository
git clone https://github.com/PrazwalR/Apiforge.git
cd Apiforge

# Build
cargo build

# Run tests
cargo test

# Run lints
cargo clippy

# Format code
cargo fmt
```

### Running Locally

```bash
# Run without installing
cargo run -- doctor
cargo run -- release patch --dry-run
```

---

## License

MIT License - see [LICENSE](LICENSE) for details.

---

## Acknowledgments

Built with:
- [clap]https://github.com/clap-rs/clap - Command line argument parsing
- [bollard]https://github.com/fussybeaver/bollard - Docker API client
- [kube-rs]https://github.com/kube-rs/kube - Kubernetes client
- [octocrab]https://github.com/XAMPPRocky/octocrab - GitHub API client
- [git2]https://github.com/rust-lang/git2-rs - Git operations

---

<p align="center">
  Made with ❀️ for DevOps engineers tired of manual releases
</p>