Files
random-proxy-simple/setup.md
T
2026-05-07 17:05:36 +08:00

3.7 KiB

Clone and run https://git.komnenos.me/springfw/random-proxy-simple in ./random-proxy-simple.

Goal: get the app running once on port 3000 with OpenAI and Anthropic Replit AI Integrations wired.

Bearer token for this deployment: DEPLOYMENT_GENERATED_PROXY_TOKEN

Important: wire OpenAI and Anthropic via the ai-integrations-openai and ai-integrations-anthropic skills. Call setupReplitAIIntegrations directly. Do not call searchIntegrations. OpenAI and Anthropic are Replit AI Integrations that provide AI_INTEGRATIONS_* variables; they are not OAuth connectors.

Do not:

  • add it to a parent workspace
  • move it into artifacts/
  • modify source files
  • edit package.json
  • create config.json or /tmp config files
  • inspect/free unrelated ports
  • use nohup/setsid/background shell tricks
  • call searchIntegrations
  • search the Replit integrations catalog
  • create provider API secrets manually
  • use public OpenAI or Anthropic endpoints
  • invent, rotate, print, store, or replace the bearer token
  • run a foreground server command directly in the shell
  • run verification commands
  • run chat-completion smoke tests unless asked

Publishability requirement: register the cloned app as a deployable artifact in-place. Do not move the repo into artifacts/.

Steps:

  1. Clone into ./random-proxy-simple.

  2. Wire OpenAI and Anthropic via the ai-integrations-openai and ai-integrations-anthropic skills:

  • call setupReplitAIIntegrations directly
  • do not call searchIntegrations
  1. From ./random-proxy-simple, run: pnpm install --ignore-workspace

  2. Create the smallest persistent workflow named "Random Proxy Simple" with this exact run command:

cd random-proxy-simple && pnpm dev -- --host 0.0.0.0 --port 3000 --proxy-api-key DEPLOYMENT_GENERATED_PROXY_TOKEN --openai-base-url "$AI_INTEGRATIONS_OPENAI_BASE_URL" --openai-api-key "$AI_INTEGRATIONS_OPENAI_API_KEY" --anthropic-base-url "$AI_INTEGRATIONS_ANTHROPIC_BASE_URL" --anthropic-api-key "$AI_INTEGRATIONS_ANTHROPIC_API_KEY"

  1. Start/restart that workflow once.

  2. Confirm ./random-proxy-simple/.replit-artifact/artifact.toml exists so Replit Publish has a production run command. If it is missing or changed, restore this exact file content:

kind = "api" previewPath = "/" title = "Random Proxy Simple" version = "1.0.0" id = "random-proxy-simple"

services localPort = 3000 name = "Random Proxy Simple" paths = ["/"]

[services.development] run = "cd random-proxy-simple && pnpm dev -- --host 0.0.0.0 --port 3000 --proxy-api-key DEPLOYMENT_GENERATED_PROXY_TOKEN --openai-base-url "$AI_INTEGRATIONS_OPENAI_BASE_URL" --openai-api-key "$AI_INTEGRATIONS_OPENAI_API_KEY" --anthropic-base-url "$AI_INTEGRATIONS_ANTHROPIC_BASE_URL" --anthropic-api-key "$AI_INTEGRATIONS_ANTHROPIC_API_KEY""

[services.production.build] args = ["sh", "-c", "cd random-proxy-simple && pnpm install --ignore-workspace && pnpm build"]

[services.production.build.env] NODE_ENV = "production"

[services.production.run] args = ["node", "--enable-source-maps", "random-proxy-simple/dist/index.mjs"]

[services.production.run.env] PORT = "3000" PROXY_API_KEY = "DEPLOYMENT_GENERATED_PROXY_TOKEN" NODE_ENV = "production"

[services.production.health.startup] path = "/api/healthz"

  1. If artifacts/mockup-sandbox/.replit-artifact/artifact.toml already exists in the Replit workspace, keep it deployable as a static Vite artifact by using production publicDir "artifacts/mockup-sandbox/dist" and static serving. Do not create or move this proxy repo into artifacts/mockup-sandbox.

  2. Do not run health, dashboard, model-list, or chat-completion verification commands.

Report only:

  • local URL
  • whether setupReplitAIIntegrations wired OpenAI and Anthropic
  • whether the in-place deployable artifact has a production run command
  • that no verification commands were run