Skip to content

Commit 44ddd43

Browse files
committed
Added AutoInstall_Web
1 parent 0a36ab4 commit 44ddd43

34 files changed

Lines changed: 22549 additions & 28 deletions
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"enabled": true,
3+
"name": "Auto Deploy on Code Change",
4+
"description": "Automatically deploys the SDK app to the router after Kiro finishes making code changes. Uses make.py deploy.",
5+
"version": "1",
6+
"when": {
7+
"type": "agentStop"
8+
},
9+
"then": {
10+
"type": "askAgent",
11+
"prompt": "If you just created or modified any SDK app Python files during this session, deploy the app now by running: python3 make.py deploy {app_name} (substitute the actual app name). If no app code was changed, do nothing."
12+
}
13+
}

.kiro/hooks/deploy-app.kiro.hook

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"enabled": true,
33
"name": "Deploy App",
4-
"description": "One-click deploy of the current SDK app to the router via deploy.sh. Verifies the app started successfully by reviewing log timestamps.",
4+
"description": "One-click deploy of the current SDK app to the router via make.py deploy. Verifies the app started successfully by reviewing log timestamps.",
55
"version": "1",
66
"when": {
77
"type": "userTriggered"
88
},
99
"then": {
1010
"type": "askAgent",
11-
"prompt": "Read sdk_settings.ini to get the app_name, then run: bash deploy.sh <app_name>. After the command completes, review the output for errors. Check that log timestamps are AFTER the deploy started. If logs show the app started successfully, report success briefly. If there are errors, diagnose and suggest fixes."
11+
"prompt": "Read sdk_settings.ini to get the app_name, then run: python3 make.py deploy <app_name>. After the command completes, review the output for errors. Check that log timestamps are AFTER the deploy started. If logs show the app started successfully, report success briefly. If there are errors, diagnose and suggest fixes."
1212
}
1313
}

.kiro/hooks/setup-dev-env.kiro.hook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
},
88
"then": {
99
"type": "runCommand",
10-
"command": "bash setup_env.sh"
10+
"command": "python3 make.py setup"
1111
}
1212
}

.kiro/steering/deploy.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
---
22
inclusion: manual
3-
description: "Deploy SDK app to Cradlepoint router via deploy.sh"
3+
description: "Deploy SDK app to Cradlepoint router via make.py deploy (cross-platform)"
44
---
55
# Deploy SDK App
66

7-
Deploy the SDK app to the router using deploy.sh:
7+
Deploy the SDK app to the router:
88

99
```bash
10-
bash deploy.sh {app_name}
10+
python3 make.py deploy {app_name}
1111
```
1212

1313
This will:
14-
1. Update app_name in sdk_settings.ini to match the app being deployed
15-
2. Purge all apps from router
16-
3. Build the app package
17-
4. Install to router
18-
5. Show recent logs filtered by app name
14+
1. Purge all apps from router
15+
2. Build the app package
16+
3. Install to router
17+
4. Show recent logs filtered by app name
1918

2019
After deployment, verify the app started successfully by checking the logs.
2120

.kiro/steering/workflow.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ Use `python3` for all commands.
2424
- **When user says "learn"** - Load `.kiro/steering/learn.md` (Update rules and docs based on what was learned)
2525
- **When user says "deploy"** - Load `.kiro/steering/deploy.md` (Deploy app to router workflow)
2626

27+
## Auto-Deploy
28+
29+
**ALWAYS deploy after creating or modifying an app.** After any code change to an app's Python files, automatically run:
30+
31+
```bash
32+
python3 make.py deploy {app_name}
33+
```
34+
35+
Do NOT ask the user if they want to deploy — just do it.
36+
2737
## Configuration Files
2838

2939
- **NEVER make up configuration formats** - always reference actual files like @sdk_settings.ini
@@ -80,27 +90,26 @@ This generates all required files from app_template (package.ini, start.sh, cp.p
8090

8191
**NEVER overwrite package.ini, start.sh, or cp.py after creation** - these are auto-generated and correct.
8292

83-
**ALWAYS deploy after creating or modifying an app** - use `bash deploy.sh {app_name}` immediately after code changes.
93+
**ALWAYS deploy after creating or modifying an app** - use `python3 make.py deploy {app_name}` immediately after code changes.
8494

8595
## Deploy to Router
8696

87-
**ALWAYS use deploy.sh script** - `bash deploy.sh {app_name}`
97+
**ALWAYS use make.py deploy** - `python3 make.py deploy {app_name}`
8898

89-
This script handles:
90-
- Cleaning old build artifacts
99+
This handles:
100+
- Purging old apps
91101
- Building the app package
92-
- Stopping the old version
93102
- Installing the new version
94-
- Starting the app
103+
- Starting the app (auto_start=true in package.ini)
95104
- Showing status and logs
96105

97-
**Just run `bash deploy.sh {app_name}`** - no need to run `make.py clean` or remove old tar.gz files first. deploy.sh handles everything. The app auto-starts after install (auto_start=true in package.ini), so there's no need to run `make.py start` either.
106+
**Just run `python3 make.py deploy {app_name}`** - no need to run `make.py clean` or remove old tar.gz files first. It handles everything. The app auto-starts after install, so there's no need to run `make.py start` either.
98107

99-
**NEVER use make.py install directly** - always use deploy.sh for deployment.
108+
**NEVER use make.py install directly** - always use `make.py deploy` for deployment.
100109

101-
**deploy.sh output is sufficient** - if logs show app started successfully (e.g., "Starting app_name", "Web server started"), DO NOT run status or logs commands again. The deployment verification is already complete.
110+
**deploy output is sufficient** - if logs show app started successfully (e.g., "Starting app_name", "Web server started"), DO NOT run status or logs commands again. The deployment verification is already complete.
102111

103-
**ALWAYS check log timestamps after deploy** - deploy.sh shows timestamps (HH:MM:SS) on each log line. Only trust logs with timestamps AFTER you ran the deploy. The router log buffer contains old entries from previous deploys — if you see logs without recent timestamps, they are stale and do not reflect the current deploy.
112+
**ALWAYS check log timestamps after deploy** - deploy shows timestamps (HH:MM:SS) on each log line. Only trust logs with timestamps AFTER you ran the deploy. The router log buffer contains old entries from previous deploys — if you see logs without recent timestamps, they are stale and do not reflect the current deploy.
104113

105114
## Other Commands
106115

0 commit comments

Comments
 (0)