Skip to content

feat: add claude-code template#354

Merged
Marvin-Cypher merged 1 commit into
Phala-Network:mainfrom
phala-agent:feat/template-claude-code
May 27, 2026
Merged

feat: add claude-code template#354
Marvin-Cypher merged 1 commit into
Phala-Network:mainfrom
phala-agent:feat/template-claude-code

Conversation

@phala-agent
Copy link
Copy Markdown
Contributor

Summary

  • Add a claude-code prebuilt template for Anthropic Claude Code.
  • Provide a CPU-safe Node.js HTTP verifier that installs @anthropic-ai/claude-code@2.1.150, runs claude --version, and exposes /healthz, /demo, and /v1/models without Anthropic credentials or hosted model calls.
  • Add templates/icons/claude-code.svg and route the template config repo through the Phala prebuilt template path.

Upstream

Template files

  • templates/prebuilt/claude-code/docker-compose.yml
  • templates/prebuilt/claude-code/README.md
  • templates/icons/claude-code.svg
  • templates/config.json

Environment variables

  • CLAUDE_CODE_VERSION: optional, default 2.1.150.
  • ANTHROPIC_API_KEY: optional for later real Claude Code use; the default verifier endpoints do not use it.

Validation

  • python3 sdks/templates/validate.py
  • git -C sdks diff --check origin/main...HEAD
  • docker compose -f sdks/templates/prebuilt/claude-code/docker-compose.yml config >/tmp/claude-code-compose-config-postcommit.out
  • Static audit ✅
    • config ID unique
    • exact Phala prebuilt repo URL
    • icon file exists
    • README covers deploy, usage, verification, security, and attribution
    • no env_file, host bind mount, external build context, privileged mode, GPU requirement, or real secret literal

Phala Cloud smoke

  • Profile/workspace: hermes-admin-cvm-check / h4x's projects
  • Deploy name: auto-template-test-claude-code-0526-202640
  • CVM UUID: 7650ad8c-9a5d-4337-a1b4-02fe20983f00
  • App ID: 6f3e7dc24aa66897eb72ef3a0ad87dc8a8f4d186
  • phala ps --json: /dstack-app-1 running and healthy
  • Endpoint: https://6f3e7dc24aa66897eb72ef3a0ad87dc8a8f4d186-8080.dstack-pha-prod6.phala.network
  • GET /healthz: HTTP 200, package @anthropic-ai/claude-code, installed version 2.1.150
  • GET /demo: HTTP 200, credentials_required_for_health=false, hosted_llm_calls_performed=false
  • GET /v1/models: HTTP 200, includes claude-code/local-verifier, cli_version_output="2.1.150 (Claude Code)"

Cleanup

  • Temporary CVM deletion succeeded.
  • Follow-up lookup returned The requested CVM was not found.

cc @Marvin-Cypher for review.

@phala-agent
Copy link
Copy Markdown
Contributor Author

cc @Marvin-Cypher for review.

@Marvin-Cypher Marvin-Cypher force-pushed the feat/template-claude-code branch from 7a18f4e to 8a82a7e Compare May 27, 2026 17:31
Copy link
Copy Markdown
Contributor

@Marvin-Cypher Marvin-Cypher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed template files, normalized tags, compose config, config validation, stale path cleanup, and compose safety scan. Checks are passing.

@Marvin-Cypher Marvin-Cypher merged commit c4c2195 into Phala-Network:main May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants