codeforge-dev 1.4.0 → 1.5.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/.devcontainer/.env +4 -1
- package/.devcontainer/CHANGELOG.md +117 -0
- package/.devcontainer/README.md +7 -3
- package/.devcontainer/config/main-system-prompt.md +10 -0
- package/.devcontainer/config/settings.json +9 -5
- package/.devcontainer/connect-external-terminal.ps1 +86 -0
- package/.devcontainer/connect-external-terminal.sh +78 -0
- package/.devcontainer/devcontainer.json +9 -4
- package/.devcontainer/features/agent-browser/install.sh +5 -5
- package/.devcontainer/features/biome/devcontainer-feature.json +16 -0
- package/.devcontainer/features/biome/install.sh +19 -0
- package/.devcontainer/features/tmux/README.md +75 -0
- package/.devcontainer/features/tmux/devcontainer-feature.json +17 -0
- package/.devcontainer/features/tmux/install.sh +52 -0
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/.claude-plugin/plugin.json +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/hooks/hooks.json +5 -5
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-on-stop.py +177 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/hooks/hooks.json +2 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/.claude-plugin/commands/debug.md +86 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/.claude-plugin/plugin.json +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/debug-logs.md +149 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +46 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/collect-edited-files.py +44 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +229 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/syntax-validator.py +141 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/debugging/SKILL.md +165 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/debugging/references/error-patterns.md +530 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/debugging/references/log-locations.md +430 -0
- package/.devcontainer/scripts/setup-update-claude.sh +123 -0
- package/.devcontainer/scripts/setup.sh +13 -1
- package/README.md +13 -9
- package/package.json +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-file.py +0 -101
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/claude-code-headless/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/claude-code-headless/references/cli-flags-and-output.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/claude-code-headless/references/sdk-and-mcp.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/docker/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/docker/references/compose-services.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/docker/references/dockerfile-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/docker-py/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/docker-py/references/container-lifecycle.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/docker-py/references/resources-and-security.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/fastapi/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/fastapi/references/middleware-and-lifespan.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/fastapi/references/pydantic-models.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/fastapi/references/routing-and-dependencies.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/fastapi/references/sse-and-streaming.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/pydantic-ai/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/pydantic-ai/references/agents-and-tools.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/pydantic-ai/references/models-and-streaming.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/skill-building/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/skill-building/references/cross-vendor-principles.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/skill-building/references/patterns-and-antipatterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/skill-building/references/skill-authoring-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/sqlite/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/sqlite/references/advanced-queries.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/sqlite/references/javascript-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/sqlite/references/python-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/sqlite/references/schema-and-pragmas.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/svelte5/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/svelte5/references/ai-sdk-svelte.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/svelte5/references/component-patterns.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/svelte5/references/layercake.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/svelte5/references/migration-guide.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/svelte5/references/runes-and-reactivity.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/svelte5/references/spa-and-routing.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/svelte5/references/svelte-dnd-action.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/testing/SKILL.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/testing/references/fastapi-testing.md +0 -0
- /package/.devcontainer/plugins/devs-marketplace/plugins/{codedirective-skills → code-directive}/skills/testing/references/svelte-testing.md +0 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
# Log Locations Reference
|
|
2
|
+
|
|
3
|
+
Comprehensive reference of log file locations organized by system, runtime, and application framework.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Linux System Logs
|
|
8
|
+
|
|
9
|
+
### Syslog
|
|
10
|
+
|
|
11
|
+
The traditional Unix system log. Most distributions write to one of:
|
|
12
|
+
|
|
13
|
+
| Distribution | Path | Format |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Debian / Ubuntu | `/var/log/syslog` | BSD syslog |
|
|
16
|
+
| RHEL / CentOS / Fedora | `/var/log/messages` | BSD syslog |
|
|
17
|
+
| Alpine | `/var/log/messages` | BSD syslog |
|
|
18
|
+
|
|
19
|
+
Syslog captures messages from system services, cron, mail, and applications that use the syslog facility. Each line follows the format:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
<timestamp> <hostname> <program>[<pid>]: <message>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Useful filters:**
|
|
26
|
+
```bash
|
|
27
|
+
# Recent errors
|
|
28
|
+
grep -i "error\|fail\|crit" /var/log/syslog | tail -50
|
|
29
|
+
|
|
30
|
+
# Specific service
|
|
31
|
+
grep "nginx" /var/log/syslog | tail -20
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Systemd Journal (journald)
|
|
35
|
+
|
|
36
|
+
Modern Linux distributions use systemd's binary journal as the primary log store. The journal captures structured metadata (unit name, priority, PID, UID) alongside the message.
|
|
37
|
+
|
|
38
|
+
**Key commands:**
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# All logs from the last hour
|
|
42
|
+
journalctl --no-pager -n 200 --since "1 hour ago"
|
|
43
|
+
|
|
44
|
+
# Specific systemd unit
|
|
45
|
+
journalctl --no-pager -n 100 -u nginx.service --since "1 hour ago"
|
|
46
|
+
|
|
47
|
+
# Kernel messages only (OOM killer, hardware, drivers)
|
|
48
|
+
journalctl --no-pager -n 100 -k --since "1 hour ago"
|
|
49
|
+
|
|
50
|
+
# Priority filtering (0=emerg through 7=debug)
|
|
51
|
+
journalctl --no-pager -p err --since "1 hour ago"
|
|
52
|
+
|
|
53
|
+
# Follow mode (like tail -f)
|
|
54
|
+
journalctl -f -u myservice.service
|
|
55
|
+
|
|
56
|
+
# Output as JSON for structured parsing
|
|
57
|
+
journalctl --no-pager -o json -n 50 -u myservice.service
|
|
58
|
+
|
|
59
|
+
# Disk usage of journal
|
|
60
|
+
journalctl --disk-usage
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Kernel Log
|
|
64
|
+
|
|
65
|
+
Kernel messages are critical for diagnosing:
|
|
66
|
+
- **OOM killer** events (`Out of memory: Killed process`)
|
|
67
|
+
- **Segmentation faults** (`segfault at`)
|
|
68
|
+
- **Hardware errors** (`I/O error`, `EXT4-fs error`)
|
|
69
|
+
- **Network stack** issues (`nf_conntrack: table full`)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Kernel ring buffer (dmesg)
|
|
73
|
+
dmesg --time-format iso | tail -50
|
|
74
|
+
|
|
75
|
+
# Via journal
|
|
76
|
+
journalctl -k --no-pager -n 50 --since "1 hour ago"
|
|
77
|
+
|
|
78
|
+
# File-based (if available)
|
|
79
|
+
# /var/log/kern.log (Debian/Ubuntu)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Authentication Log
|
|
83
|
+
|
|
84
|
+
Records login attempts, sudo usage, SSH sessions, and PAM events.
|
|
85
|
+
|
|
86
|
+
| Distribution | Path |
|
|
87
|
+
|---|---|
|
|
88
|
+
| Debian / Ubuntu | `/var/log/auth.log` |
|
|
89
|
+
| RHEL / CentOS / Fedora | `/var/log/secure` |
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Failed login attempts
|
|
93
|
+
grep "Failed password\|authentication failure" /var/log/auth.log | tail -20
|
|
94
|
+
|
|
95
|
+
# Sudo commands
|
|
96
|
+
grep "sudo:" /var/log/auth.log | tail -20
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Other System Logs
|
|
100
|
+
|
|
101
|
+
| Log | Path | Contents |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| Boot log | `/var/log/boot.log` | Service startup messages |
|
|
104
|
+
| Cron log | `/var/log/cron` or in syslog | Scheduled task execution |
|
|
105
|
+
| Package manager | `/var/log/dpkg.log` (Debian) or `/var/log/yum.log` (RHEL) | Package install/remove |
|
|
106
|
+
| Filesystem | `/var/log/fsck/` | Filesystem check results |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Docker
|
|
111
|
+
|
|
112
|
+
### Container Logs
|
|
113
|
+
|
|
114
|
+
Docker captures stdout and stderr from the container's PID 1 process. This is the primary log source for containerized applications.
|
|
115
|
+
|
|
116
|
+
**Storage location** (default json-file driver):
|
|
117
|
+
```
|
|
118
|
+
/var/lib/docker/containers/<container-id>/<container-id>-json.log
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Access methods:**
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# By container name or ID
|
|
125
|
+
docker logs <container>
|
|
126
|
+
|
|
127
|
+
# With timestamps
|
|
128
|
+
docker logs --timestamps <container>
|
|
129
|
+
|
|
130
|
+
# Tail last N lines
|
|
131
|
+
docker logs --tail 100 <container>
|
|
132
|
+
|
|
133
|
+
# Time window
|
|
134
|
+
docker logs --since "2025-01-15T10:00:00" --until "2025-01-15T11:00:00" <container>
|
|
135
|
+
|
|
136
|
+
# Follow (real-time)
|
|
137
|
+
docker logs -f <container>
|
|
138
|
+
|
|
139
|
+
# Separate stdout and stderr
|
|
140
|
+
docker logs <container> 2>/dev/null # stdout only
|
|
141
|
+
docker logs <container> 1>/dev/null # stderr only
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Log Drivers
|
|
145
|
+
|
|
146
|
+
Docker supports pluggable log drivers. The default is `json-file`, but others redirect logs elsewhere:
|
|
147
|
+
|
|
148
|
+
| Driver | Destination | `docker logs` Works? |
|
|
149
|
+
|---|---|---|
|
|
150
|
+
| `json-file` (default) | Local JSON files | Yes |
|
|
151
|
+
| `local` | Optimized local storage | Yes |
|
|
152
|
+
| `journald` | systemd journal | Yes |
|
|
153
|
+
| `syslog` | Syslog daemon | No |
|
|
154
|
+
| `fluentd` | Fluentd collector | No |
|
|
155
|
+
| `awslogs` | CloudWatch | No |
|
|
156
|
+
| `none` | Discarded | No |
|
|
157
|
+
|
|
158
|
+
Check which driver a container uses:
|
|
159
|
+
```bash
|
|
160
|
+
docker inspect --format '{{.HostConfig.LogConfig.Type}}' <container>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
If `docker logs` returns nothing, the log driver may not support it. Check the driver and look for logs at the configured destination.
|
|
164
|
+
|
|
165
|
+
### Docker Daemon Logs
|
|
166
|
+
|
|
167
|
+
The Docker daemon itself logs operational events:
|
|
168
|
+
|
|
169
|
+
| System | Location |
|
|
170
|
+
|---|---|
|
|
171
|
+
| systemd-based | `journalctl -u docker.service` |
|
|
172
|
+
| Non-systemd | `/var/log/docker.log` |
|
|
173
|
+
| macOS (Docker Desktop) | `~/Library/Containers/com.docker.docker/Data/log/` |
|
|
174
|
+
|
|
175
|
+
### Docker Compose Aggregation
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# All services
|
|
179
|
+
docker compose logs --tail 100
|
|
180
|
+
|
|
181
|
+
# Specific service
|
|
182
|
+
docker compose logs --tail 100 <service_name>
|
|
183
|
+
|
|
184
|
+
# With timestamps for cross-service correlation
|
|
185
|
+
docker compose logs --timestamps --tail 200
|
|
186
|
+
|
|
187
|
+
# Follow all services
|
|
188
|
+
docker compose logs -f
|
|
189
|
+
|
|
190
|
+
# Service status overview
|
|
191
|
+
docker compose ps -a
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Docker Events
|
|
195
|
+
|
|
196
|
+
System-level events (container create/start/stop/die, image pull, network connect):
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Recent events
|
|
200
|
+
docker events --since "1h" --until "now"
|
|
201
|
+
|
|
202
|
+
# Filtered by type
|
|
203
|
+
docker events --filter 'type=container' --filter 'event=die' --since "1h"
|
|
204
|
+
|
|
205
|
+
# Formatted output
|
|
206
|
+
docker events --since "1h" --format '{{.Time}} {{.Type}} {{.Action}} {{.Actor.Attributes.name}}'
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Docker Health Checks
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Health status
|
|
213
|
+
docker inspect --format '{{.State.Health.Status}}' <container>
|
|
214
|
+
|
|
215
|
+
# Health check log (last 5 results)
|
|
216
|
+
docker inspect --format '{{json .State.Health}}' <container> | python3 -m json.tool
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Python Frameworks
|
|
222
|
+
|
|
223
|
+
### FastAPI / Uvicorn
|
|
224
|
+
|
|
225
|
+
Uvicorn writes to stderr by default. Log level is controlled by `--log-level` flag or `UVICORN_LOG_LEVEL` env var.
|
|
226
|
+
|
|
227
|
+
| Source | Location |
|
|
228
|
+
|---|---|
|
|
229
|
+
| Uvicorn access log | stderr (or `--access-log` file) |
|
|
230
|
+
| Uvicorn error log | stderr |
|
|
231
|
+
| Application logger | Depends on `logging` config; defaults to stderr |
|
|
232
|
+
| In Docker | `docker logs <container>` |
|
|
233
|
+
|
|
234
|
+
**Uvicorn log format:**
|
|
235
|
+
```
|
|
236
|
+
INFO: <client_ip>:<port> - "<method> <path> HTTP/1.1" <status_code>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Common configuration patterns:**
|
|
240
|
+
```python
|
|
241
|
+
# logging.conf or logging.yaml referenced by app
|
|
242
|
+
# Check for: logging.config.dictConfig(), logging.config.fileConfig()
|
|
243
|
+
# Environment variables: LOG_LEVEL, UVICORN_LOG_LEVEL
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Django
|
|
247
|
+
|
|
248
|
+
| Source | Default Location |
|
|
249
|
+
|---|---|
|
|
250
|
+
| Django server log | stderr (runserver) |
|
|
251
|
+
| Application logs | Configured in `settings.LOGGING` |
|
|
252
|
+
| Debug log | Often `./debug.log` when `DEBUG=True` |
|
|
253
|
+
|
|
254
|
+
Check `settings.py` for `LOGGING` dict — it defines handlers, formatters, and file paths.
|
|
255
|
+
|
|
256
|
+
### Flask
|
|
257
|
+
|
|
258
|
+
| Source | Default Location |
|
|
259
|
+
|---|---|
|
|
260
|
+
| Flask dev server | stderr |
|
|
261
|
+
| Application logger | `app.logger` → stderr by default |
|
|
262
|
+
| Gunicorn | `--error-logfile`, `--access-logfile` flags |
|
|
263
|
+
|
|
264
|
+
### Gunicorn
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
# Default: stderr
|
|
268
|
+
# Common flag overrides:
|
|
269
|
+
# --error-logfile /var/log/gunicorn/error.log
|
|
270
|
+
# --access-logfile /var/log/gunicorn/access.log
|
|
271
|
+
# --log-level info
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Gunicorn prefork model means each worker process logs independently. Worker crashes appear in the error log as:
|
|
275
|
+
```
|
|
276
|
+
[CRITICAL] WORKER TIMEOUT (pid:1234)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Node.js
|
|
282
|
+
|
|
283
|
+
### Express / Generic Node
|
|
284
|
+
|
|
285
|
+
Node.js applications typically log to stdout/stderr. No default file logging.
|
|
286
|
+
|
|
287
|
+
| Source | Location |
|
|
288
|
+
|---|---|
|
|
289
|
+
| `console.log` / `console.error` | stdout / stderr |
|
|
290
|
+
| Winston | Configured in app (`transports` define file paths) |
|
|
291
|
+
| Bunyan | Configured in app (commonly `./logs/`) |
|
|
292
|
+
| Pino | stdout (designed for pipe-based logging) |
|
|
293
|
+
|
|
294
|
+
**Common file locations when file transport is configured:**
|
|
295
|
+
- `./logs/combined.log`
|
|
296
|
+
- `./logs/error.log`
|
|
297
|
+
- `./logs/app.log`
|
|
298
|
+
- `/var/log/<app-name>/`
|
|
299
|
+
|
|
300
|
+
### PM2
|
|
301
|
+
|
|
302
|
+
PM2 manages Node processes and captures their output:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
# Log file locations
|
|
306
|
+
~/.pm2/logs/<app-name>-out.log # stdout
|
|
307
|
+
~/.pm2/logs/<app-name>-error.log # stderr
|
|
308
|
+
|
|
309
|
+
# View logs
|
|
310
|
+
pm2 logs # all apps, follow mode
|
|
311
|
+
pm2 logs <app-name> --lines 100 # specific app
|
|
312
|
+
|
|
313
|
+
# Flush logs
|
|
314
|
+
pm2 flush
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Databases
|
|
320
|
+
|
|
321
|
+
### PostgreSQL
|
|
322
|
+
|
|
323
|
+
| Distribution | Default Log Location |
|
|
324
|
+
|---|---|
|
|
325
|
+
| Debian / Ubuntu (apt) | `/var/log/postgresql/postgresql-<version>-main.log` |
|
|
326
|
+
| RHEL (yum/dnf) | `/var/lib/pgsql/<version>/data/log/` |
|
|
327
|
+
| Docker (official image) | stderr → `docker logs` |
|
|
328
|
+
| Custom | Check `log_directory` in `postgresql.conf` |
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
# Find log config
|
|
332
|
+
psql -c "SHOW log_directory; SHOW log_filename; SHOW logging_collector;"
|
|
333
|
+
|
|
334
|
+
# Check for slow queries if log_min_duration_statement is set
|
|
335
|
+
psql -c "SHOW log_min_duration_statement;"
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Key log entries:**
|
|
339
|
+
- `FATAL:` — Connection failures, authentication errors, startup failures
|
|
340
|
+
- `ERROR:` — Query errors, constraint violations
|
|
341
|
+
- `LOG: checkpoint` — Checkpoint activity (performance indicator)
|
|
342
|
+
- `LOG: connection` — Connection open/close events
|
|
343
|
+
|
|
344
|
+
### MySQL / MariaDB
|
|
345
|
+
|
|
346
|
+
| Log Type | Default Path | Config Variable |
|
|
347
|
+
|---|---|---|
|
|
348
|
+
| Error log | `/var/log/mysql/error.log` | `log_error` |
|
|
349
|
+
| General query log | Off by default | `general_log_file` |
|
|
350
|
+
| Slow query log | Off by default | `slow_query_log_file` |
|
|
351
|
+
| Binary log | `/var/lib/mysql/binlog.*` | `log_bin` |
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
# Check what's enabled
|
|
355
|
+
mysql -e "SHOW VARIABLES LIKE '%log%';"
|
|
356
|
+
|
|
357
|
+
# Docker
|
|
358
|
+
docker logs <mysql-container>
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### Redis
|
|
362
|
+
|
|
363
|
+
| Installation | Log Location |
|
|
364
|
+
|---|---|
|
|
365
|
+
| Package manager | `/var/log/redis/redis-server.log` |
|
|
366
|
+
| Docker (official) | stderr → `docker logs` |
|
|
367
|
+
| Custom | Check `logfile` directive in `redis.conf` |
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
# Check config
|
|
371
|
+
redis-cli CONFIG GET logfile
|
|
372
|
+
redis-cli CONFIG GET loglevel
|
|
373
|
+
|
|
374
|
+
# In Docker
|
|
375
|
+
docker logs <redis-container>
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
Key log patterns:
|
|
379
|
+
- `# WARNING overcommit_memory` — Memory configuration warning
|
|
380
|
+
- `* Ready to accept connections` — Successful startup
|
|
381
|
+
- `# oO0OoO0OoO0Oo Redis is starting` — Boot sequence
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Web Servers
|
|
386
|
+
|
|
387
|
+
### Nginx
|
|
388
|
+
|
|
389
|
+
| Log Type | Default Path |
|
|
390
|
+
|---|---|
|
|
391
|
+
| Access log | `/var/log/nginx/access.log` |
|
|
392
|
+
| Error log | `/var/log/nginx/error.log` |
|
|
393
|
+
| Docker | stdout (access) / stderr (error) → `docker logs` |
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
# Check configured paths
|
|
397
|
+
nginx -T 2>/dev/null | grep -E "access_log|error_log"
|
|
398
|
+
|
|
399
|
+
# Error levels (in order): debug, info, notice, warn, error, crit, alert, emerg
|
|
400
|
+
# Default error_log level: error
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Common error log patterns:**
|
|
404
|
+
- `connect() failed (111: Connection refused)` — Upstream/proxy target is down
|
|
405
|
+
- `no live upstreams` — All backends in upstream block are unhealthy
|
|
406
|
+
- `client intended to send too large body` — `client_max_body_size` exceeded
|
|
407
|
+
|
|
408
|
+
### Apache (httpd)
|
|
409
|
+
|
|
410
|
+
| Log Type | Default Path |
|
|
411
|
+
|---|---|
|
|
412
|
+
| Access log | `/var/log/apache2/access.log` (Debian) or `/var/log/httpd/access_log` (RHEL) |
|
|
413
|
+
| Error log | `/var/log/apache2/error.log` (Debian) or `/var/log/httpd/error_log` (RHEL) |
|
|
414
|
+
| Docker | Varies by image configuration |
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
# Check configured paths
|
|
418
|
+
apachectl -S 2>/dev/null | grep -i log
|
|
419
|
+
grep -r "ErrorLog\|CustomLog" /etc/apache2/ /etc/httpd/ 2>/dev/null
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### Caddy
|
|
423
|
+
|
|
424
|
+
| Installation | Log Location |
|
|
425
|
+
|---|---|
|
|
426
|
+
| Package | `journalctl -u caddy` |
|
|
427
|
+
| Docker | stderr → `docker logs` |
|
|
428
|
+
| File | Configured in Caddyfile with `log` directive |
|
|
429
|
+
|
|
430
|
+
Caddy uses structured JSON logging by default (v2). Access logs require explicit `log` directive in the Caddyfile.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Update Claude Code CLI to the latest version (native binary only)
|
|
3
|
+
# Runs non-blocking in background by default via setup.sh
|
|
4
|
+
# All failures are warnings — this script never blocks container startup
|
|
5
|
+
|
|
6
|
+
echo "[update-claude] Checking for Claude Code updates..."
|
|
7
|
+
|
|
8
|
+
# === CLEANUP TRAP ===
|
|
9
|
+
cleanup() {
|
|
10
|
+
rm -f /tmp/claude-update 2>/dev/null || true
|
|
11
|
+
rm -f /tmp/claude-update-manifest.json 2>/dev/null || true
|
|
12
|
+
}
|
|
13
|
+
trap cleanup EXIT
|
|
14
|
+
|
|
15
|
+
# === VERIFY CLAUDE IS INSTALLED ===
|
|
16
|
+
if ! command -v claude &>/dev/null; then
|
|
17
|
+
echo "[update-claude] Claude Code not found, skipping update"
|
|
18
|
+
exit 0
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
# === DETECT INSTALL METHOD ===
|
|
22
|
+
CLAUDE_PATH=$(command -v claude)
|
|
23
|
+
if [[ "$CLAUDE_PATH" != "/usr/local/bin/claude" ]]; then
|
|
24
|
+
echo "[update-claude] Non-native install detected ($CLAUDE_PATH), skipping"
|
|
25
|
+
exit 0
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# === VALIDATE DEPENDENCIES ===
|
|
29
|
+
for dep in curl jq sha256sum sudo; do
|
|
30
|
+
if ! command -v "$dep" &>/dev/null; then
|
|
31
|
+
echo "[update-claude] WARNING: $dep not available, skipping update"
|
|
32
|
+
exit 0
|
|
33
|
+
fi
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
# === GET CURRENT VERSION ===
|
|
37
|
+
CURRENT_VERSION=$(claude --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo "unknown")
|
|
38
|
+
echo "[update-claude] Current version: ${CURRENT_VERSION}"
|
|
39
|
+
|
|
40
|
+
# === FETCH LATEST VERSION ===
|
|
41
|
+
BASE_URL="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases"
|
|
42
|
+
|
|
43
|
+
LATEST_VERSION=$(curl -fsSL "${BASE_URL}/stable" 2>/dev/null)
|
|
44
|
+
if [ -z "$LATEST_VERSION" ]; then
|
|
45
|
+
echo "[update-claude] WARNING: Failed to fetch latest version, skipping"
|
|
46
|
+
exit 0
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
echo "[update-claude] Latest version: ${LATEST_VERSION}"
|
|
50
|
+
|
|
51
|
+
# === COMPARE VERSIONS ===
|
|
52
|
+
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
|
|
53
|
+
echo "[update-claude] Already up to date (${CURRENT_VERSION})"
|
|
54
|
+
exit 0
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
echo "[update-claude] Updating from ${CURRENT_VERSION} to ${LATEST_VERSION}..."
|
|
58
|
+
|
|
59
|
+
# === DETECT PLATFORM ===
|
|
60
|
+
ARCH=$(uname -m)
|
|
61
|
+
case "${ARCH}" in
|
|
62
|
+
x86_64)
|
|
63
|
+
PLATFORM="linux-x64"
|
|
64
|
+
;;
|
|
65
|
+
aarch64|arm64)
|
|
66
|
+
PLATFORM="linux-arm64"
|
|
67
|
+
;;
|
|
68
|
+
*)
|
|
69
|
+
echo "[update-claude] WARNING: Unsupported architecture: ${ARCH}, skipping"
|
|
70
|
+
exit 0
|
|
71
|
+
;;
|
|
72
|
+
esac
|
|
73
|
+
|
|
74
|
+
# Detect musl (Alpine Linux)
|
|
75
|
+
if ldd --version 2>&1 | grep -qi musl; then
|
|
76
|
+
PLATFORM="${PLATFORM}-musl"
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
echo "[update-claude] Platform: ${PLATFORM}"
|
|
80
|
+
|
|
81
|
+
# === DOWNLOAD MANIFEST ===
|
|
82
|
+
MANIFEST_URL="${BASE_URL}/${LATEST_VERSION}/manifest.json"
|
|
83
|
+
|
|
84
|
+
if ! curl -fsSL "${MANIFEST_URL}" -o /tmp/claude-update-manifest.json 2>/dev/null; then
|
|
85
|
+
echo "[update-claude] WARNING: Failed to download manifest, skipping"
|
|
86
|
+
exit 0
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
# === EXTRACT AND VERIFY CHECKSUM ===
|
|
90
|
+
EXPECTED_CHECKSUM=$(jq -r ".platforms.\"${PLATFORM}\".checksum" /tmp/claude-update-manifest.json)
|
|
91
|
+
if [ -z "${EXPECTED_CHECKSUM}" ] || [ "${EXPECTED_CHECKSUM}" = "null" ]; then
|
|
92
|
+
echo "[update-claude] WARNING: Platform ${PLATFORM} not found in manifest, skipping"
|
|
93
|
+
exit 0
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
# === DOWNLOAD BINARY ===
|
|
97
|
+
BINARY_URL="${BASE_URL}/${LATEST_VERSION}/${PLATFORM}/claude"
|
|
98
|
+
|
|
99
|
+
if ! curl -fsSL "${BINARY_URL}" -o /tmp/claude-update 2>/dev/null; then
|
|
100
|
+
echo "[update-claude] WARNING: Failed to download binary, skipping"
|
|
101
|
+
exit 0
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
# === VERIFY CHECKSUM ===
|
|
105
|
+
ACTUAL_CHECKSUM=$(sha256sum /tmp/claude-update | cut -d' ' -f1)
|
|
106
|
+
|
|
107
|
+
if [ "${ACTUAL_CHECKSUM}" != "${EXPECTED_CHECKSUM}" ]; then
|
|
108
|
+
echo "[update-claude] WARNING: Checksum verification failed, skipping"
|
|
109
|
+
echo "[update-claude] Expected: ${EXPECTED_CHECKSUM}"
|
|
110
|
+
echo "[update-claude] Actual: ${ACTUAL_CHECKSUM}"
|
|
111
|
+
exit 0
|
|
112
|
+
fi
|
|
113
|
+
|
|
114
|
+
# === INSTALL (atomic replace) ===
|
|
115
|
+
chmod +x /tmp/claude-update
|
|
116
|
+
if ! sudo mv /tmp/claude-update /usr/local/bin/claude; then
|
|
117
|
+
echo "[update-claude] WARNING: Failed to install update (sudo mv failed), skipping"
|
|
118
|
+
exit 0
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
# === VERIFY UPDATE ===
|
|
122
|
+
INSTALLED_VERSION=$(claude --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo "unknown")
|
|
123
|
+
echo "[update-claude] Updated Claude Code: ${CURRENT_VERSION} → ${INSTALLED_VERSION}"
|
|
@@ -21,8 +21,9 @@ fi
|
|
|
21
21
|
: "${SETUP_ALIASES:=true}"
|
|
22
22
|
: "${OVERWRITE_CONFIG:=false}"
|
|
23
23
|
: "${SETUP_PLUGINS:=true}"
|
|
24
|
+
: "${SETUP_UPDATE_CLAUDE:=true}"
|
|
24
25
|
|
|
25
|
-
export CLAUDE_CONFIG_DIR CONFIG_SOURCE_DIR SETUP_CONFIG SETUP_ALIASES OVERWRITE_CONFIG SETUP_PLUGINS
|
|
26
|
+
export CLAUDE_CONFIG_DIR CONFIG_SOURCE_DIR SETUP_CONFIG SETUP_ALIASES OVERWRITE_CONFIG SETUP_PLUGINS SETUP_UPDATE_CLAUDE
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
@@ -53,6 +54,17 @@ run_script "$SCRIPT_DIR/setup-aliases.sh" "$SETUP_ALIASES"
|
|
|
53
54
|
run_script "$SCRIPT_DIR/setup-plugins.sh" "$SETUP_PLUGINS"
|
|
54
55
|
run_script "$SCRIPT_DIR/setup-irie-claude.sh" "true"
|
|
55
56
|
|
|
57
|
+
# Non-blocking: check for Claude Code updates in background
|
|
58
|
+
if [ "$SETUP_UPDATE_CLAUDE" = "true" ]; then
|
|
59
|
+
if [ -f "$SCRIPT_DIR/setup-update-claude.sh" ]; then
|
|
60
|
+
echo "Running setup-update-claude (background)..."
|
|
61
|
+
bash "$SCRIPT_DIR/setup-update-claude.sh" &
|
|
62
|
+
disown
|
|
63
|
+
fi
|
|
64
|
+
else
|
|
65
|
+
echo "Skipping setup-update-claude (disabled)"
|
|
66
|
+
fi
|
|
67
|
+
|
|
56
68
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
57
69
|
echo " Setup Complete"
|
|
58
70
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# CodeForge DevContainer
|
|
2
2
|
|
|
3
3
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
4
|
-
[](https://www.npmjs.com/package/codeforge)
|
|
4
|
+
[](https://www.npmjs.com/package/codeforge-dev)
|
|
5
5
|
|
|
6
6
|
A curated development environment optimized for AI-powered coding with Claude Code. CodeForge comes pre-configured with language servers, code intelligence tools, and official Anthropic plugins to streamline your development workflow.
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ A curated development environment optimized for AI-powered coding with Claude Co
|
|
|
10
10
|
Add CodeForge to any project:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npx codeforge
|
|
13
|
+
npx codeforge-dev
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
This copies the `.devcontainer/` directory to your project. Then open in VS Code and select "Reopen in Container".
|
|
@@ -18,19 +18,19 @@ This copies the `.devcontainer/` directory to your project. Then open in VS Code
|
|
|
18
18
|
### Options
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npx codeforge --force # Overwrite existing .devcontainer directory
|
|
22
|
-
npx codeforge -f # Short form
|
|
21
|
+
npx codeforge-dev --force # Overwrite existing .devcontainer directory
|
|
22
|
+
npx codeforge-dev -f # Short form
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### Alternative Install Methods
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
# Install globally
|
|
29
|
-
npm install -g codeforge
|
|
30
|
-
codeforge
|
|
29
|
+
npm install -g codeforge-dev
|
|
30
|
+
codeforge-dev
|
|
31
31
|
|
|
32
32
|
# Run specific version
|
|
33
|
-
npx codeforge@1.2.3
|
|
33
|
+
npx codeforge-dev@1.2.3
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Prerequisites
|
|
@@ -152,6 +152,8 @@ GitHub CLI credentials are automatically persisted across container rebuilds. Th
|
|
|
152
152
|
| `git` | Version control |
|
|
153
153
|
| `jq` | JSON processor |
|
|
154
154
|
| `curl` | HTTP client |
|
|
155
|
+
| `tmux` | Terminal multiplexer for Agent Teams split-pane sessions |
|
|
156
|
+
| `biome` | Fast JS/TS/JSON/CSS formatter |
|
|
155
157
|
| `agent-browser` | Headless browser automation for AI agents |
|
|
156
158
|
|
|
157
159
|
### Code Intelligence
|
|
@@ -214,9 +216,9 @@ Edit `.devcontainer/.env` to customize behavior:
|
|
|
214
216
|
Default settings are in `.devcontainer/config/settings.json`. These are copied to `/workspaces/.claude/settings.json` on first run.
|
|
215
217
|
|
|
216
218
|
Key defaults:
|
|
217
|
-
- **Model**: Claude Opus 4
|
|
219
|
+
- **Model**: Claude Opus 4-6
|
|
218
220
|
- **Default mode**: Plan (prompts before executing)
|
|
219
|
-
- **Max output tokens**:
|
|
221
|
+
- **Max output tokens**: 128,000
|
|
220
222
|
|
|
221
223
|
### System Prompt
|
|
222
224
|
|
|
@@ -235,6 +237,8 @@ CodeForge includes several custom devcontainer features:
|
|
|
235
237
|
| `tree-sitter` | Parser with JS/TS/Python grammars |
|
|
236
238
|
| `lsp-servers` | Pyright and TypeScript language servers |
|
|
237
239
|
| `agent-browser` | Browser automation with accessibility snapshots and screenshots |
|
|
240
|
+
| `tmux` | Terminal multiplexer with Catppuccin theme for Agent Teams |
|
|
241
|
+
| `biome` | Fast JS/TS/JSON/CSS formatter (global install) |
|
|
238
242
|
|
|
239
243
|
## Essential Gotchas
|
|
240
244
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeforge-dev",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Complete development container that sets up Claude Code with modular devcontainer features, modern dev tools, and persistent configurations. Drop it into any project and get a production-ready AI development environment in minutes.",
|
|
5
5
|
"main": "setup.js",
|
|
6
6
|
"bin": {
|