mirror of
https://github.com/Dasemu/chatgpt-imagegen-mcp.git
synced 2026-11-27 07:46:33 +00:00
chore: bootstrap Claude setup
Add .claude/settings.json hooks (typecheck on edited .ts files, guard on package-lock.json edits, Stop runs typecheck + test), CI workflow (typecheck + test on PRs/pushes to development/main), and a version bump workflow keyed off package.json. Restructure CLAUDE.md to match the standard section order (Overview, Commands, Architecture, Conventions, Workflow quirks, Deployment, Gotchas); docs/, LESSONS.md and .env.example were already present and in sync. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
722ea15f36
commit
bba3fee23a
5 files changed
+139
-1
No files matched your search
@@ -1,5 +1,7 @@
|
||||
# CLAUDE.md
|
||||
|
||||
## Overview
|
||||
|
||||
MCP server (TypeScript, ESM, Express 5, `@modelcontextprotocol/sdk`) that generates images by driving chatgpt.com with Playwright. Mirrors the MCP contract of ZenvairoMediaGenerator-MCP (submit + poll, signed public URLs).
|
||||
|
||||
## Commands
|
||||
@@ -12,7 +14,9 @@ MCP server (TypeScript, ESM, Express 5, `@modelcontextprotocol/sdk`) that genera
|
||||
- `npm run selfheal` (`SELFHEAL_DRY_RUN=true`): codex repair of the scraper in a throwaway clone; live smoke test, auto-merge and deploy (docs/selfheal.md)
|
||||
- `npm run smoke`: generate one real image on chatgpt.com with the current code (uses quota; service stopped)
|
||||
|
||||
## Layout
|
||||
## Architecture
|
||||
|
||||
See [docs/architecture.md](docs/architecture.md) for the generation flow and lineage. Layout:
|
||||
|
||||
- `src/index.ts`: HTTP app, auth, media routes, update routes
|
||||
- `src/tools.ts`: MCP tools
|
||||
@@ -29,3 +33,17 @@ MCP server (TypeScript, ESM, Express 5, `@modelcontextprotocol/sdk`) that genera
|
||||
- Never log prompts, reference images, tokens or profile contents.
|
||||
- Never commit `profiles/`, `diagnostics/`, `media/` or `.env`.
|
||||
- Read `LESSONS.md` before changing the browser automation.
|
||||
|
||||
## Workflow quirks
|
||||
|
||||
- No linter or formatter is configured; `npm run typecheck` is the only static check. The `.claude/settings.json` hooks run it on edited `.ts` files and, together with `npm test`, on Stop.
|
||||
- Edit `.env.example` whenever the code gains or loses an environment variable.
|
||||
|
||||
## Deployment
|
||||
|
||||
Standalone on Debian/Ubuntu under systemd (no Docker), with an authenticated self-update endpoint. See [docs/deployment.md](docs/deployment.md) and [docs/update.md](docs/update.md). Unit and nginx files live in `deploy/`.
|
||||
|
||||
## Gotchas
|
||||
|
||||
- `scripts/update.sh` restarts the service via `sudo -n systemctl restart`; the systemd unit deliberately omits `NoNewPrivileges=true` to keep that working (see `deploy/sudoers.chatgpt-imagegen-mcp`).
|
||||
- `npm run selfheal` needs a `codex` binary and pushes/merges/deploys on success when `SELFHEAL_AUTO_MERGE`/`SELFHEAL_AUTO_UPDATE` are enabled — never run it casually against `main`.
|
||||
Reference in new issue
Block a user