Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Postman CLI, installed system-wide (/usr/local/bin) while still root
RUN curl -fsSL https://dl-cli.pstmn.io/install/unix.sh | sh \
&& postman --version

USER node

ENV PATH="/home/node/.local/bin:${PATH}"

RUN curl -fsSL https://claude.ai/install.sh | bash -s stable \
&& claude --version
12 changes: 12 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Intergalactic Banking Platform",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "node",
"containerEnv": {
"DISABLE_AUTOUPDATER": "1"
},
"forwardPorts": [3000, 3100, 3200, 8080, 8090],
"postCreateCommand": "bash .devcontainer/post-create.sh"
}
36 changes: 36 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
# Runs once after the Codespace container is created. Failures are non-fatal.

claude plugin marketplace add anthropics/claude-plugins-official \
&& claude plugin install postman@claude-plugins-official \
|| echo "Postman plugin install failed; run: claude plugin install postman@claude-plugins-official"

# Claude Code: if ANTHROPIC_API_KEY is set, pre-approve it and skip onboarding
# so users can open `claude` and start prompting without logging in.
if [ -n "${ANTHROPIC_API_KEY:-}" ]; then
node -e '
const fs = require("fs");
const p = process.env.HOME + "/.claude.json";
let c = {};
try { c = JSON.parse(fs.readFileSync(p, "utf8")); } catch {}
c.hasCompletedOnboarding = true;
c.customApiKeyResponses = c.customApiKeyResponses || {};
const approved = new Set(c.customApiKeyResponses.approved || []);
approved.add(process.env.ANTHROPIC_API_KEY.slice(-20));
c.customApiKeyResponses.approved = [...approved];
c.customApiKeyResponses.rejected = c.customApiKeyResponses.rejected || [];
fs.writeFileSync(p, JSON.stringify(c, null, 2));
' && echo "Claude Code configured to use ANTHROPIC_API_KEY" \
|| echo "Claude Code key setup failed; run claude and log in manually"
else
echo "ANTHROPIC_API_KEY not set; add it as a Codespaces secret, or run: claude and log in"
fi

# Postman CLI: if POSTMAN_API_KEY is set, log in so `postman` commands work immediately.
if [ -n "${POSTMAN_API_KEY:-}" ]; then
postman login --with-api-key "$POSTMAN_API_KEY" >/dev/null \
&& echo "Postman CLI logged in" \
|| echo "Postman login failed; run: postman login"
else
echo "POSTMAN_API_KEY not set; add it as a Codespaces secret, or run: postman login"
fi
Loading