❯ docker run \
--tmpfs /tmp/claude:rw,nosuid,size=1m \
-e CREDS=$(security find-generic-password -a $USER -w -s "Claude Code-credentials") \
-e HOME=/home/node \
claude-code:latest sh -c '
echo "$CREDS" > /tmp/claude/.credentials.json
chmod 600 /tmp/claude/.credentials.json
ln -s /tmp/claude/.credentials.json ~/.claude/.credentials.json
claude -p hi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:22 | |
ARG TZ | |
ENV TZ="$TZ" | |
# Install basic development tools and iptables/ipset | |
RUN apt update && apt install -y less \ | |
git \ | |
procps \ | |
sudo \ |
This project creates a custom code generation tool API for AI editors (VS Code, Cursor). The main purpose is to override Tool Use functionality in AI editors and implement custom code generation logic, while maintaining full compatibility with Chat Completions API and Ollama API so existing editor configurations can be used as-is.
The supported environment includes VS Code and Cursor editors, with deployment capability on Cloudflare Workers. The API must support streaming=true for real-time responses. Tool Call detailed tracking and log output are provided for debugging purposes.
This code was created with reference to the Vercel V0 API design. https://vercel.com/docs/v0/api
npm create cloudflare@latest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Claude Code | |
on: | |
workflow_dispatch: | |
inputs: | |
test_prompt: | |
description: "Test prompt for Claude" | |
required: false | |
default: "List the files in the current directory starting with 'package'" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { McpAgent } from "agents/mcp"; | |
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; | |
import { z } from "zod"; | |
import { GoogleGenerativeAI } from "@google/generative-ai"; | |
import { Readability } from '@mozilla/readability'; | |
import { parseHTML } from 'linkedom'; | |
type Env = { | |
MyMCP: DurableObjectNamespace<MyMCP>; | |
GEMINI_API_KEY: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM denoland/deno:latest | |
# Create the application directory | |
WORKDIR /app | |
# Copy dependency files first for caching | |
COPY deno.json deno.lock* ./ | |
# Copy the rest of the application code | |
COPY . . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import re | |
import urllib.request | |
import io | |
import zipfile | |
import string | |
from typing import List, Optional | |
from mcp.server.fastmcp import FastMCP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM my-app:latest AS my-app | |
FROM ubuntu:22.04 AS goose | |
WORKDIR /root/workspace | |
COPY --from=my-app:latest /app /root/workspace | |
ENV GOOSE_VERSION=v1.0.14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function listNotebooks() { | |
const authParams = await getAuthParams(); | |
const { url: n, headers: r, body: o } = await createBatchExecuteRequest(authParams); | |
const response = await fetch(n.toString(), { | |
method: "POST", | |
headers: r, | |
body: o | |
}); | |
const text = await response.text(); |
NewerOlder