openclacky 1.0.0 → 1.0.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/README.md +87 -53
- data/lib/clacky/agent/cost_tracker.rb +19 -2
- data/lib/clacky/agent/llm_caller.rb +218 -0
- data/lib/clacky/agent/message_compressor_helper.rb +32 -2
- data/lib/clacky/agent.rb +54 -22
- data/lib/clacky/client.rb +44 -5
- data/lib/clacky/default_parsers/pdf_parser.rb +58 -17
- data/lib/clacky/default_parsers/pdf_parser_ocr.py +103 -0
- data/lib/clacky/default_parsers/pdf_parser_plumber.py +62 -0
- data/lib/clacky/default_skills/deploy/SKILL.md +201 -77
- data/lib/clacky/default_skills/new/SKILL.md +3 -114
- data/lib/clacky/default_skills/onboard/SKILL.md +349 -133
- data/lib/clacky/default_skills/onboard/scripts/import_external_skills.rb +371 -0
- data/lib/clacky/default_skills/onboard/scripts/install_builtin_skills.rb +175 -0
- data/lib/clacky/default_skills/skill-add/scripts/install_from_zip.rb +59 -26
- data/lib/clacky/message_format/anthropic.rb +72 -8
- data/lib/clacky/message_format/bedrock.rb +6 -3
- data/lib/clacky/providers.rb +146 -3
- data/lib/clacky/server/channel/adapters/feishu/adapter.rb +14 -0
- data/lib/clacky/server/channel/adapters/feishu/bot.rb +10 -0
- data/lib/clacky/server/channel/adapters/feishu/message_parser.rb +1 -0
- data/lib/clacky/server/channel/channel_manager.rb +12 -4
- data/lib/clacky/server/channel/channel_ui_controller.rb +8 -2
- data/lib/clacky/server/http_server.rb +746 -13
- data/lib/clacky/server/session_registry.rb +55 -24
- data/lib/clacky/skill.rb +10 -9
- data/lib/clacky/skill_loader.rb +23 -11
- data/lib/clacky/tools/file_reader.rb +232 -127
- data/lib/clacky/tools/security.rb +42 -64
- data/lib/clacky/tools/terminal/persistent_session.rb +15 -4
- data/lib/clacky/tools/terminal/safe_rm.sh +106 -0
- data/lib/clacky/tools/terminal/session_manager.rb +8 -3
- data/lib/clacky/tools/terminal.rb +263 -16
- data/lib/clacky/ui2/layout_manager.rb +8 -1
- data/lib/clacky/ui2/output_buffer.rb +83 -23
- data/lib/clacky/ui2/ui_controller.rb +74 -7
- data/lib/clacky/utils/file_processor.rb +14 -40
- data/lib/clacky/utils/model_pricing.rb +215 -0
- data/lib/clacky/utils/parser_manager.rb +70 -6
- data/lib/clacky/utils/string_matcher.rb +23 -1
- data/lib/clacky/version.rb +1 -1
- data/lib/clacky/web/app.css +673 -9
- data/lib/clacky/web/app.js +40 -1608
- data/lib/clacky/web/i18n.js +209 -0
- data/lib/clacky/web/index.html +166 -2
- data/lib/clacky/web/onboard.js +77 -1
- data/lib/clacky/web/profile.js +442 -0
- data/lib/clacky/web/sessions.js +1034 -2
- data/lib/clacky/web/settings.js +127 -6
- data/lib/clacky/web/sidebar.js +39 -0
- data/lib/clacky/web/skills.js +460 -0
- data/lib/clacky/web/trash.js +343 -0
- data/lib/clacky/web/ws-dispatcher.js +255 -0
- data/lib/clacky.rb +5 -3
- metadata +16 -17
- data/lib/clacky/clacky_auth_client.rb +0 -152
- data/lib/clacky/clacky_cloud_config.rb +0 -123
- data/lib/clacky/cloud_project_client.rb +0 -169
- data/lib/clacky/default_skills/deploy/scripts/rails_deploy.rb +0 -1377
- data/lib/clacky/default_skills/deploy/tools/check_health.rb +0 -116
- data/lib/clacky/default_skills/deploy/tools/create_database_service.rb +0 -341
- data/lib/clacky/default_skills/deploy/tools/execute_deployment.rb +0 -99
- data/lib/clacky/default_skills/deploy/tools/fetch_runtime_logs.rb +0 -77
- data/lib/clacky/default_skills/deploy/tools/list_services.rb +0 -67
- data/lib/clacky/default_skills/deploy/tools/report_deploy_status.rb +0 -67
- data/lib/clacky/default_skills/deploy/tools/set_deploy_variables.rb +0 -189
- data/lib/clacky/default_skills/new/scripts/cloud_project_init.sh +0 -74
- data/lib/clacky/deploy_api_client.rb +0 -484
|
@@ -1,105 +1,229 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deploy
|
|
3
|
-
description: Deploy Rails applications to
|
|
4
|
-
|
|
3
|
+
description: Deploy Rails applications to Railway. Handles first-time setup and re-deploys idempotently using Railway CLI. Trigger on: "deploy", "deploy to railway", "railway deploy", "发布", "部署", "上线".
|
|
4
|
+
user-invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Deploy Rails App to Railway
|
|
8
8
|
|
|
9
|
-
Deploy
|
|
9
|
+
Deploy the current Rails project to Railway using the Railway CLI. Works for both first-time deploys and re-deploys.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Prerequisites Check
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- "deploy", "/deploy", "deploy my app", "push to production"
|
|
15
|
-
- "部署", "上线", "发布"
|
|
13
|
+
Before starting, verify:
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
```bash
|
|
16
|
+
# 1. Railway CLI installed?
|
|
17
|
+
railway --version
|
|
18
|
+
|
|
19
|
+
# 2. Logged in?
|
|
20
|
+
railway whoami
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If not logged in, instruct the user:
|
|
24
|
+
```
|
|
25
|
+
Please run: railway login
|
|
26
|
+
Then retry deployment.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Step 0: Prepare for Linux Build
|
|
30
|
+
|
|
31
|
+
Railway runs on Linux. Ensure Gemfile.lock includes the linux platform:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bundle lock --add-platform x86_64-linux
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If the project uses a `Dockerfile` builder (check `railway.toml` for `builder = "DOCKERFILE"`), no `Procfile` is needed — skip creating one.
|
|
18
38
|
|
|
19
|
-
|
|
39
|
+
Only create a `Procfile` if there is no Dockerfile:
|
|
40
|
+
```
|
|
41
|
+
web: bundle exec puma -C config/puma.rb
|
|
42
|
+
```
|
|
20
43
|
|
|
21
|
-
|
|
44
|
+
## Step 1: Check Link Status → Deploy Immediately if Already Linked
|
|
22
45
|
|
|
46
|
+
**First: check if already linked:**
|
|
23
47
|
```bash
|
|
24
|
-
|
|
48
|
+
railway status 2>&1
|
|
25
49
|
```
|
|
26
50
|
|
|
27
|
-
**
|
|
51
|
+
**If output contains `Project:` → project is already linked.**
|
|
52
|
+
Skip Steps 2–5 entirely and jump to Step 6 (Deploy).
|
|
28
53
|
|
|
29
|
-
|
|
54
|
+
**If output contains "not linked" or an error → not linked yet.**
|
|
55
|
+
Try linking to an existing project first — list available projects:
|
|
56
|
+
```bash
|
|
57
|
+
railway list 2>&1 | grep -i "<app-name>"
|
|
58
|
+
```
|
|
30
59
|
|
|
60
|
+
If a matching project is found, link it:
|
|
61
|
+
```bash
|
|
62
|
+
railway link --project <project-name> --service <service-name> 2>&1
|
|
31
63
|
```
|
|
32
|
-
|
|
33
|
-
|
|
64
|
+
|
|
65
|
+
Only if no existing project is found, init a new one:
|
|
66
|
+
```bash
|
|
67
|
+
railway init -n <app-name>
|
|
34
68
|
```
|
|
69
|
+
The `app-name` should match the current directory name (e.g., `my-rails-app`).
|
|
35
70
|
|
|
36
|
-
|
|
71
|
+
**⚠️ NEVER run `railway init` when already linked or when an existing project exists.**
|
|
72
|
+
It silently creates a brand-new Railway project. If this happens by mistake:
|
|
73
|
+
1. Find the correct project name from `railway list`
|
|
74
|
+
2. Re-link: `railway link --project <project-name> --service <service-name>`
|
|
37
75
|
|
|
38
|
-
|
|
39
|
-
in a code block or verbatim. The output contains step-by-step logs they need
|
|
40
|
-
to see. Do NOT summarise silently — show everything, then add your summary.
|
|
76
|
+
## Step 2: Set Environment Variables
|
|
41
77
|
|
|
42
|
-
|
|
43
|
-
After showing the output, report the deployed URL and any useful links.
|
|
78
|
+
Set required Rails production variables. Use `--skip-deploys` to avoid triggering premature deploys:
|
|
44
79
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
then re-run `/deploy`).
|
|
80
|
+
```bash
|
|
81
|
+
# Generate a secret key base
|
|
82
|
+
SECRET_KEY_BASE=$(bundle exec rails secret)
|
|
49
83
|
|
|
50
|
-
|
|
84
|
+
railway variable set SECRET_KEY_BASE=$SECRET_KEY_BASE --skip-deploys
|
|
85
|
+
railway variable set RAILS_ENV=production --skip-deploys
|
|
86
|
+
railway variable set RAILS_LOG_TO_STDOUT=true --skip-deploys
|
|
87
|
+
railway variable set RAILS_SERVE_STATIC_FILES=true --skip-deploys
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
If the project uses any other env vars (check `.env.example` or `config/application.yml.example` if they exist), prompt the user to provide values and set them too.
|
|
91
|
+
|
|
92
|
+
If the project uses `config/application.yml` (Figaro gem), read it and set all values as Railway variables:
|
|
93
|
+
```bash
|
|
94
|
+
# Read application.yml and set each key=value pair
|
|
95
|
+
ruby -ryaml -e "
|
|
96
|
+
data = YAML.safe_load(File.read('config/application.yml')) || {}
|
|
97
|
+
data.each { |k, v| puts %(railway variable set #{k}=#{v} --skip-deploys) unless v.to_s.empty? }
|
|
98
|
+
" | bash
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Step 3: Ensure PostgreSQL Service (Idempotent)
|
|
102
|
+
|
|
103
|
+
Check if Postgres already exists:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
railway status --json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Parse the JSON output. If a service with type `postgres` or name containing `postgres`/`Postgres` is already found, skip with: `✅ PostgreSQL already provisioned`
|
|
110
|
+
|
|
111
|
+
**⚠️ IMPORTANT: `railway add --database postgres` has a known CLI bug that always returns `Unauthorized`.**
|
|
112
|
+
Do NOT attempt to run this command. Instead, instruct the user to add PostgreSQL manually via the Railway Web UI:
|
|
113
|
+
|
|
114
|
+
1. Open your Railway project: `https://railway.com/project/<project-id>`
|
|
115
|
+
(Get the project ID from the Railway dashboard or `cat .railway/config.json`)
|
|
116
|
+
2. Click **"+ New"** → **"Database"** → **"PostgreSQL"**
|
|
117
|
+
3. Wait for the database to provision
|
|
118
|
+
4. Come back and continue
|
|
119
|
+
|
|
120
|
+
After Postgres is provisioned, set the DATABASE_URL variable:
|
|
121
|
+
```bash
|
|
122
|
+
railway variable set DATABASE_URL='${{Postgres.DATABASE_URL}}' --skip-deploys
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Step 4: Get Domain (Idempotent)
|
|
126
|
+
|
|
127
|
+
Check if a domain is already set:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
railway domain --json
|
|
131
|
+
```
|
|
51
132
|
|
|
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
|
-
|
|
133
|
+
If no domain exists yet:
|
|
134
|
+
```bash
|
|
135
|
+
railway domain
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Capture and display the domain URL to the user. Also set it as PUBLIC_HOST:
|
|
139
|
+
```bash
|
|
140
|
+
railway variable set PUBLIC_HOST=<domain-without-https> --skip-deploys
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Step 5: Configure Storage Bucket (if needed)
|
|
144
|
+
|
|
145
|
+
Check if the project uses S3-compatible storage by reading `config/storage.yml`. If it contains an `amazon` or `s3` service section, storage bucket configuration is required.
|
|
146
|
+
|
|
147
|
+
**⚠️ Storage bucket requires Railway Hobby plan ($5/month minimum). Confirm with the user before proceeding.**
|
|
148
|
+
|
|
149
|
+
Check if bucket env vars are already set:
|
|
150
|
+
```bash
|
|
151
|
+
railway variables --json | grep STORAGE_BUCKET
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
If not set, create a bucket and configure the variables:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Create bucket (choose region: iad=US East, sjc=US West, ams=EU, sin=Asia)
|
|
158
|
+
railway bucket create <app-name>-storage --region iad --json
|
|
159
|
+
|
|
160
|
+
# Get credentials
|
|
161
|
+
railway bucket credentials --bucket <app-name>-storage --json
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The credentials JSON will contain: `accessKeyId`, `secretAccessKey`, `region`, `endpoint`, `bucketName`.
|
|
165
|
+
|
|
166
|
+
Set them as environment variables:
|
|
167
|
+
```bash
|
|
168
|
+
railway variables set \
|
|
169
|
+
STORAGE_BUCKET_ACCESS_KEY_ID=<accessKeyId> \
|
|
170
|
+
STORAGE_BUCKET_SECRET_ACCESS_KEY=<secretAccessKey> \
|
|
171
|
+
STORAGE_BUCKET_REGION=<region> \
|
|
172
|
+
STORAGE_BUCKET_NAME=<bucketName> \
|
|
173
|
+
STORAGE_BUCKET_ENDPOINT=<endpoint> \
|
|
174
|
+
--skip-deploys
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**⚠️ Missing these variables will cause a hard crash at boot (`Aws::Errors::MissingRegionError`) because the AWS SDK initializes at startup, not lazily.**
|
|
178
|
+
|
|
179
|
+
If the project does not use S3 storage, skip this step entirely.
|
|
180
|
+
|
|
181
|
+
## Step 6: Deploy
|
|
182
|
+
|
|
183
|
+
Upload and deploy the project:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
railway up --detach
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Show the user the deployment is in progress and they can monitor it with:
|
|
190
|
+
```bash
|
|
191
|
+
railway logs
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**No manual migration needed.** The `bin/docker-entrypoint` script runs `rails db:prepare` automatically on container startup. Just wait for the deployment to complete.
|
|
195
|
+
|
|
196
|
+
## Step 7: Verify Deployment
|
|
197
|
+
|
|
198
|
+
After deployment completes (wait ~30 seconds), verify the app is running:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Should return 200
|
|
202
|
+
curl -s -o /dev/null -w "%{http_code}" https://<domain>/
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
If it returns `200`, deployment is successful. If not, check logs:
|
|
206
|
+
```bash
|
|
207
|
+
railway logs --tail 50
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Step 8: Done
|
|
211
|
+
|
|
212
|
+
Print a summary:
|
|
213
|
+
```
|
|
214
|
+
✅ Deployment complete!
|
|
215
|
+
🌐 Platform URL: https://<domain>
|
|
216
|
+
📋 Monitor: railway logs
|
|
217
|
+
🔄 Re-deploy: just run deploy again
|
|
218
|
+
```
|
|
95
219
|
|
|
96
220
|
---
|
|
97
221
|
|
|
98
|
-
##
|
|
222
|
+
## Notes
|
|
99
223
|
|
|
100
|
-
- **
|
|
101
|
-
- **
|
|
102
|
-
- **
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
224
|
+
- **Idempotency**: Running this skill multiple times is safe. Each step checks current state before acting.
|
|
225
|
+
- **Link detection**: Use `railway status` to check if already linked — it's more reliable than checking `.railway/config.json` (works across machines and fresh clones).
|
|
226
|
+
- **Re-deploy**: On subsequent runs, Steps 1–5 are all skipped or no-ops. Only Step 6 (upload) actually runs.
|
|
227
|
+
- **Secret key**: Only set `SECRET_KEY_BASE` if not already set (check with `railway variable list`).
|
|
228
|
+
- **Database migrations**: Handled automatically by `bin/docker-entrypoint` via `rails db:prepare` — never run `railway run bundle exec rails db:migrate` as Railway's internal DB IP is not accessible from local machine.
|
|
229
|
+
- **PostgreSQL CLI bug**: `railway add --database postgres` always fails with `Unauthorized` — always use the Web UI instead.
|
|
@@ -75,114 +75,7 @@ The script will automatically:
|
|
|
75
75
|
- Script completes successfully
|
|
76
76
|
- Project is ready to run
|
|
77
77
|
|
|
78
|
-
### 3.
|
|
79
|
-
After the setup script completes, initialize the cloud project binding.
|
|
80
|
-
|
|
81
|
-
**Goal**: Create a cloud project on the Clacky platform, then inject the returned
|
|
82
|
-
`categorized_config` (auth/email/llm/stripe credentials) into the local development
|
|
83
|
-
environment so the app can use platform services out of the box.
|
|
84
|
-
|
|
85
|
-
#### 3.1 Check existing binding
|
|
86
|
-
Check if `.clacky/openclacky.yml` already exists:
|
|
87
|
-
```bash
|
|
88
|
-
ls .clacky/openclacky.yml 2>/dev/null && cat .clacky/openclacky.yml || echo "NOT_FOUND"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
If it exists, ask the user:
|
|
92
|
-
```
|
|
93
|
-
A cloud project binding already exists:
|
|
94
|
-
Project: <project_name> (<project_id>)
|
|
95
|
-
|
|
96
|
-
Do you want to reuse this binding? (y/n)
|
|
97
|
-
```
|
|
98
|
-
- **Yes** → skip to step 3.5 (files already written, no need to re-create)
|
|
99
|
-
- **No** → continue to 3.2
|
|
100
|
-
|
|
101
|
-
#### 3.2 Run the cloud project init script
|
|
102
|
-
Use the `cloud_project_init.sh` script from Supporting Files.
|
|
103
|
-
Run it with `terminal` from the project directory (no arguments needed — it auto-reads `~/.clacky/clacky_cloud.yml`):
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
bash <absolute_path_to_cloud_project_init.sh>
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
The script outputs a single JSON line. Capture the full output.
|
|
110
|
-
|
|
111
|
-
**If the output contains `"success":false`** → soft-fail:
|
|
112
|
-
```
|
|
113
|
-
⚠️ Cloud project creation failed: <error value from JSON>
|
|
114
|
-
Skipping cloud init. You can link a project later with /deploy.
|
|
115
|
-
```
|
|
116
|
-
Then skip to Step 4.
|
|
117
|
-
|
|
118
|
-
**If the output contains `"success":true`** → parse the JSON and extract:
|
|
119
|
-
- `project_id` — the cloud project UUID
|
|
120
|
-
- `project_name` — the project name
|
|
121
|
-
- `categorized_config` — nested object with auth/email/llm/stripe keys
|
|
122
|
-
|
|
123
|
-
The `categorized_config` looks like:
|
|
124
|
-
```json
|
|
125
|
-
{
|
|
126
|
-
"auth": { "CLACKY_AUTH_CLIENT_ID": "...", "CLACKY_AUTH_CLIENT_SECRET": "...", "CLACKY_AUTH_HOST": "..." },
|
|
127
|
-
"email": { "CLACKY_EMAIL_API_KEY": "...", "CLACKY_EMAIL_SMTP_ADDRESS": "...", "CLACKY_EMAIL_SMTP_DOMAIN": "...", "CLACKY_EMAIL_SMTP_PORT": 25, "CLACKY_EMAIL_SMTP_USERNAME": "..." },
|
|
128
|
-
"llm": { "CLACKY_LLM_API_KEY": "...", "CLACKY_LLM_BASE_URL": "..." },
|
|
129
|
-
"stripe": { "CLACKY_STRIPE_PUBLISHABLE_KEY": "...", "CLACKY_STRIPE_SECRET_KEY": "...", "CLACKY_STRIPE_WEBHOOK_SECRET": "..." }
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
#### 3.3 Write `.clacky/openclacky.yml`
|
|
134
|
-
Create the directory and write the binding file (no sensitive data — safe to commit):
|
|
135
|
-
```bash
|
|
136
|
-
mkdir -p .clacky
|
|
137
|
-
```
|
|
138
|
-
Then use the `write` tool to create `.clacky/openclacky.yml`:
|
|
139
|
-
```yaml
|
|
140
|
-
# .clacky/openclacky.yml
|
|
141
|
-
# Committed to git. No sensitive data. Shared across team.
|
|
142
|
-
project_id: "<project_id from JSON>"
|
|
143
|
-
project_name: "<project_name from JSON>"
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
#### 3.4 Update `config/application.yml`
|
|
147
|
-
Read the current `config/application.yml` first, then **prepend** a clearly-marked block at the very top of the file.
|
|
148
|
-
Use the `write` tool to rewrite the file with the cloud config block inserted before the existing content:
|
|
149
|
-
```yaml
|
|
150
|
-
# --- Auto-generated by clacky /new (Cloud project: <project_name>) ---
|
|
151
|
-
CLACKY_AUTH_CLIENT_ID: "<value>"
|
|
152
|
-
CLACKY_AUTH_CLIENT_SECRET: "<value>"
|
|
153
|
-
CLACKY_AUTH_HOST: "<value>"
|
|
154
|
-
CLACKY_EMAIL_API_KEY: "<value>"
|
|
155
|
-
CLACKY_EMAIL_SMTP_ADDRESS: "<value>"
|
|
156
|
-
CLACKY_EMAIL_SMTP_DOMAIN: "<value>"
|
|
157
|
-
CLACKY_EMAIL_SMTP_PORT: "<value>"
|
|
158
|
-
CLACKY_EMAIL_SMTP_USERNAME: "<value>"
|
|
159
|
-
CLACKY_LLM_API_KEY: "<value>"
|
|
160
|
-
CLACKY_LLM_BASE_URL: "<value>"
|
|
161
|
-
CLACKY_STRIPE_PUBLISHABLE_KEY: "<value>"
|
|
162
|
-
CLACKY_STRIPE_SECRET_KEY: "<value>"
|
|
163
|
-
CLACKY_STRIPE_WEBHOOK_SECRET: "<value>"
|
|
164
|
-
|
|
165
|
-
# --- (original content below) ---
|
|
166
|
-
<original file content>
|
|
167
|
-
```
|
|
168
|
-
Only include keys present in the JSON response.
|
|
169
|
-
|
|
170
|
-
#### 3.5 Git commit
|
|
171
|
-
Commit the cloud project binding file.
|
|
172
|
-
Note: `config/application.yml` is gitignored (it contains secrets) — do NOT try to add it.
|
|
173
|
-
```bash
|
|
174
|
-
git add .clacky/openclacky.yml
|
|
175
|
-
git commit -m "Initialize cloud project binding"
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
Print a success summary:
|
|
179
|
-
```
|
|
180
|
-
✅ Cloud project initialized!
|
|
181
|
-
Project: <project_name> (<project_id>)
|
|
182
|
-
Config written to: config/application.yml
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### 4. Start Development Server
|
|
78
|
+
### 3. Start Development Server
|
|
186
79
|
After the script completes, read the `.1024` config file in the project root
|
|
187
80
|
to find the `run_command`, then start it in the background via the terminal tool:
|
|
188
81
|
|
|
@@ -216,8 +109,6 @@ What would you like to develop next?
|
|
|
216
109
|
- Node.js < 22 → Script installs automatically (macOS/Ubuntu)
|
|
217
110
|
- PostgreSQL missing → Script installs automatically (macOS/Ubuntu)
|
|
218
111
|
- bin/setup fails → Show error, suggest running `./bin/setup` manually
|
|
219
|
-
- Cloud project creation fails → Soft-fail with warning, continue to start server
|
|
220
|
-
- workspace_key missing → Ask user interactively; skip cloud init if user declines
|
|
221
112
|
- Dev server fails to start → Poll the terminal session (empty input) to check logs, verify database status
|
|
222
113
|
|
|
223
114
|
## Example Interaction
|
|
@@ -230,7 +121,5 @@ Response:
|
|
|
230
121
|
4. Checking environment dependencies...
|
|
231
122
|
5. Installing project dependencies...
|
|
232
123
|
6. Project setup complete!
|
|
233
|
-
7.
|
|
234
|
-
8.
|
|
235
|
-
9. Starting development server via terminal (background)...
|
|
236
|
-
10. ✨ Server running! Visit http://localhost:3000
|
|
124
|
+
7. Starting development server via terminal (background)...
|
|
125
|
+
8. ✨ Server running! Visit http://localhost:3000
|