mirror of
https://github.com/anthropics/claude-code.git
synced 2026-02-03 15:33:55 +00:00
Compare commits
71 Commits
github-api
...
ashwin/che
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6f98ba837 | ||
|
|
80ddbcd96d | ||
|
|
390f11039c | ||
|
|
5f9dcdb410 | ||
|
|
a8e927ee24 | ||
|
|
21cf5c2293 | ||
|
|
d6503abfd9 | ||
|
|
94bcec8740 | ||
|
|
b6f507833d | ||
|
|
e39df663ca | ||
|
|
820644f291 | ||
|
|
78f98bb6b3 | ||
|
|
c11fc4619b | ||
|
|
885a36faf3 | ||
|
|
eb0b297e11 | ||
|
|
6370398030 | ||
|
|
bb083eea94 | ||
|
|
d9cc2b58a2 | ||
|
|
0c3b9e94e1 | ||
|
|
3cf808d1ec | ||
|
|
e9f7c53b7c | ||
|
|
d1510f5eef | ||
|
|
715ea8ed4a | ||
|
|
0b881fcb4d | ||
|
|
9ca3c81936 | ||
|
|
4f162e6b79 | ||
|
|
e05a423901 | ||
|
|
4c9bd9cd74 | ||
|
|
0d22403ad1 | ||
|
|
931543f95f | ||
|
|
437f92b52e | ||
|
|
14c8c0df32 | ||
|
|
6767546666 | ||
|
|
5e54b4ccc1 | ||
|
|
895ce94465 | ||
|
|
7d0c29fe1a | ||
|
|
51fecc9881 | ||
|
|
8fdc766a16 | ||
|
|
26e9a5d6d3 | ||
|
|
6f27711e04 | ||
|
|
c28e7f1776 | ||
|
|
8811fc10e0 | ||
|
|
e394b39220 | ||
|
|
7b155bd8be | ||
|
|
0af8ef55f8 | ||
|
|
d337047b92 | ||
|
|
c86f797b1d | ||
|
|
beed46987e | ||
|
|
2ebb70f967 | ||
|
|
e15fabed60 | ||
|
|
4adc8a066d | ||
|
|
104ad12efb | ||
|
|
4ae3d84c50 | ||
|
|
1e38c42422 | ||
|
|
da37d85458 | ||
|
|
0e6da1caa1 | ||
|
|
f1dd5997db | ||
|
|
082dc16836 | ||
|
|
aef619b98f | ||
|
|
fdc84e3866 | ||
|
|
a314f1c79e | ||
|
|
b02016430a | ||
|
|
ee5a8f8e9c | ||
|
|
88c28ba09d | ||
|
|
071480a9c6 | ||
|
|
d1bb18a158 | ||
|
|
16c5dff959 | ||
|
|
1183388fdf | ||
|
|
062d4ee6f8 | ||
|
|
5eb232b866 | ||
|
|
ccfdadbd44 |
@@ -54,8 +54,8 @@ USER node
|
||||
ENV NPM_CONFIG_PREFIX=/usr/local/share/npm-global
|
||||
ENV PATH=$PATH:/usr/local/share/npm-global/bin
|
||||
|
||||
# Set the default shell to bash rather than sh
|
||||
ENV SHELL /bin/zsh
|
||||
# Set the default shell to zsh rather than sh
|
||||
ENV SHELL=/bin/zsh
|
||||
|
||||
# Default powerline10k theme
|
||||
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.0/zsh-in-docker.sh)" -- \
|
||||
@@ -69,10 +69,10 @@ RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/
|
||||
# Install Claude
|
||||
RUN npm install -g @anthropic-ai/claude-code
|
||||
|
||||
# Copy and set up scripts
|
||||
COPY init-firewall.sh cache-github-api.sh /usr/local/bin/
|
||||
# Copy and set up firewall script
|
||||
COPY init-firewall.sh /usr/local/bin/
|
||||
USER root
|
||||
RUN chmod +x /usr/local/bin/init-firewall.sh /usr/local/bin/cache-github-api.sh && \
|
||||
RUN chmod +x /usr/local/bin/init-firewall.sh && \
|
||||
echo "node ALL=(root) NOPASSWD: /usr/local/bin/init-firewall.sh" > /etc/sudoers.d/node-firewall && \
|
||||
chmod 0440 /etc/sudoers.d/node-firewall
|
||||
USER node
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Script to cache GitHub API data
|
||||
# Used to prevent rate limiting during container builds
|
||||
|
||||
# Configuration
|
||||
# Store cache in the home directory
|
||||
CACHE_DIR="${HOME}/.github-meta-cache"
|
||||
CACHE_FILE="${CACHE_DIR}/meta.json"
|
||||
TIMESTAMP_FILE="${CACHE_DIR}/meta-timestamp.txt"
|
||||
MAX_AGE_SECONDS=3600 # Cache expires after 1 hour
|
||||
|
||||
# Create cache directory if it doesn't exist
|
||||
mkdir -p "${CACHE_DIR}"
|
||||
|
||||
# Function to get current timestamp
|
||||
get_timestamp() {
|
||||
date +%s
|
||||
}
|
||||
|
||||
# Function to check if cache is valid
|
||||
is_cache_valid() {
|
||||
if [[ ! -f "${CACHE_FILE}" || ! -f "${TIMESTAMP_FILE}" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
local cache_time=$(cat "${TIMESTAMP_FILE}")
|
||||
local current_time=$(get_timestamp)
|
||||
local age=$((current_time - cache_time))
|
||||
|
||||
if [[ ${age} -gt ${MAX_AGE_SECONDS} ]]; then
|
||||
echo "Cache is expired (${age} seconds old)"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Using cached GitHub API data (${age} seconds old)"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Function to fetch data using authenticated gh cli
|
||||
fetch_with_gh() {
|
||||
echo "Attempting to fetch GitHub API data using authenticated gh CLI..."
|
||||
if gh auth status &>/dev/null; then
|
||||
gh api meta > "${CACHE_FILE}" &&
|
||||
get_timestamp > "${TIMESTAMP_FILE}" &&
|
||||
echo "Successfully fetched and cached GitHub API data using gh CLI"
|
||||
return $?
|
||||
else
|
||||
echo "gh CLI not authenticated"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to fetch data using curl
|
||||
fetch_with_curl() {
|
||||
echo "Attempting to fetch GitHub API data using curl..."
|
||||
# First try with GITHUB_TOKEN if available
|
||||
if [[ -n "${GITHUB_TOKEN}" ]]; then
|
||||
echo "Using GITHUB_TOKEN for authentication"
|
||||
curl -s -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/meta > "${CACHE_FILE}" &&
|
||||
get_timestamp > "${TIMESTAMP_FILE}" &&
|
||||
echo "Successfully fetched and cached GitHub API data using curl with token"
|
||||
return $?
|
||||
else
|
||||
# Fall back to unauthenticated request
|
||||
echo "No GITHUB_TOKEN found, making unauthenticated request (may be rate limited)"
|
||||
curl -s https://api.github.com/meta > "${CACHE_FILE}"
|
||||
|
||||
# Check if the response indicates rate limiting
|
||||
if grep -q "API rate limit exceeded" "${CACHE_FILE}"; then
|
||||
echo "Rate limit exceeded for unauthenticated request"
|
||||
return 1
|
||||
else
|
||||
get_timestamp > "${TIMESTAMP_FILE}"
|
||||
echo "Successfully fetched and cached GitHub API data using curl without auth"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Main logic
|
||||
if is_cache_valid; then
|
||||
echo "Using existing cache from $(cat ${TIMESTAMP_FILE})"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Try with gh CLI first
|
||||
if ! fetch_with_gh; then
|
||||
# Fall back to curl
|
||||
if ! fetch_with_curl; then
|
||||
# Both methods failed, check if we have an existing cache file
|
||||
if [[ -f "${CACHE_FILE}" ]]; then
|
||||
echo "Warning: Failed to update cache, using existing cached data (which may be expired)"
|
||||
exit 0
|
||||
else
|
||||
echo "Error: Failed to fetch GitHub API data and no cache exists"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Display a summary of the cached data
|
||||
echo "GitHub API meta data cached successfully. Summary:"
|
||||
jq -r '.domains.actions | length' "${CACHE_FILE}" > /dev/null 2>&1 &&
|
||||
echo "- Actions domains: $(jq -r '.domains.actions | length' "${CACHE_FILE}")" ||
|
||||
echo "- Could not parse actions domains from cache file"
|
||||
|
||||
exit 0
|
||||
@@ -4,9 +4,6 @@
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
"TZ": "${localEnv:TZ:America/Los_Angeles}"
|
||||
},
|
||||
"prebuild": {
|
||||
"command": "bash -c '${localWorkspaceFolder}/.devcontainer/cache-github-api.sh || echo \"Warning: Failed to cache GitHub API data\"'"
|
||||
}
|
||||
},
|
||||
"runArgs": [
|
||||
@@ -42,8 +39,7 @@
|
||||
"remoteUser": "node",
|
||||
"mounts": [
|
||||
"source=claude-code-bashhistory,target=/commandhistory,type=volume",
|
||||
"source=claude-code-config,target=/home/node/.claude,type=volume",
|
||||
"type=bind,source=${localEnv:HOME}/.github-meta-cache,target=/github-meta-cache,consistency=cached"
|
||||
"source=claude-code-config,target=/home/node/.claude,type=volume"
|
||||
],
|
||||
"remoteEnv": {
|
||||
"NODE_OPTIONS": "--max-old-space-size=4096",
|
||||
|
||||
@@ -27,20 +27,16 @@ iptables -A OUTPUT -o lo -j ACCEPT
|
||||
# Create ipset with CIDR support
|
||||
ipset create allowed-domains hash:net
|
||||
|
||||
# Use cached GitHub meta information from mounted volume
|
||||
CACHE_FILE="/github-meta-cache/meta.json"
|
||||
# Fetch GitHub meta information and aggregate + add their IP ranges
|
||||
echo "Fetching GitHub IP ranges..."
|
||||
gh_ranges=$(curl -s https://api.github.com/meta)
|
||||
if [ -z "$gh_ranges" ]; then
|
||||
echo "ERROR: Failed to fetch GitHub IP ranges"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using cached GitHub IP ranges..."
|
||||
if [ -f "${CACHE_FILE}" ]; then
|
||||
gh_ranges=$(cat "${CACHE_FILE}")
|
||||
|
||||
# Verify the cached data is valid
|
||||
if ! echo "$gh_ranges" | jq -e '.web and .api and .git' >/dev/null; then
|
||||
echo "ERROR: Cached GitHub API data is invalid"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "ERROR: No cached GitHub IP ranges found"
|
||||
if ! echo "$gh_ranges" | jq -e '.web and .api and .git' >/dev/null; then
|
||||
echo "ERROR: GitHub API response missing required fields"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -92,7 +88,6 @@ echo "Host network detected as: $HOST_NETWORK"
|
||||
iptables -A INPUT -s "$HOST_NETWORK" -j ACCEPT
|
||||
iptables -A OUTPUT -d "$HOST_NETWORK" -j ACCEPT
|
||||
|
||||
# Set default policies to DROP first
|
||||
# Set default policies to DROP first
|
||||
iptables -P INPUT DROP
|
||||
iptables -P FORWARD DROP
|
||||
|
||||
106
.github/workflows/claude-issue-triage.yml
vendored
Normal file
106
.github/workflows/claude-issue-triage.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
name: Claude Issue Triage
|
||||
description: Automatically triage GitHub issues using Claude Code
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
triage-issue:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create triage prompt
|
||||
run: |
|
||||
mkdir -p /tmp/claude-prompts
|
||||
cat > /tmp/claude-prompts/triage-prompt.txt << 'EOF'
|
||||
You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list.
|
||||
|
||||
IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels.
|
||||
|
||||
Issue Information:
|
||||
- REPO: ${{ github.repository }}
|
||||
- ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
|
||||
TASK OVERVIEW:
|
||||
|
||||
1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else.
|
||||
|
||||
2. Next, use the GitHub tools to get context about the issue:
|
||||
- You have access to these tools:
|
||||
- mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
|
||||
- mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
|
||||
- mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
|
||||
- mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
|
||||
- mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
|
||||
- Start by using mcp__github__get_issue to get the issue details
|
||||
|
||||
3. Analyze the issue content, considering:
|
||||
- The issue title and description
|
||||
- The type of issue (bug report, feature request, question, etc.)
|
||||
- Technical areas mentioned
|
||||
- Severity or priority indicators
|
||||
- User impact
|
||||
- Components affected
|
||||
|
||||
4. Select appropriate labels from the available labels list provided above:
|
||||
- Choose labels that accurately reflect the issue's nature
|
||||
- Be specific but comprehensive
|
||||
- Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority)
|
||||
- Consider platform labels (android, ios) if applicable
|
||||
- If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue.
|
||||
|
||||
5. Apply the selected labels:
|
||||
- Use mcp__github__update_issue to apply your selected labels
|
||||
- DO NOT post any comments explaining your decision
|
||||
- DO NOT communicate directly with users
|
||||
- If no labels are clearly applicable, do not apply any labels
|
||||
|
||||
IMPORTANT GUIDELINES:
|
||||
- Be thorough in your analysis
|
||||
- Only select labels from the provided list above
|
||||
- DO NOT post any comments to the issue
|
||||
- Your ONLY action should be to apply labels using mcp__github__update_issue
|
||||
- It's okay to not add any labels if none are clearly applicable
|
||||
EOF
|
||||
|
||||
- name: Setup GitHub MCP Server
|
||||
run: |
|
||||
mkdir -p /tmp/mcp-config
|
||||
cat > /tmp/mcp-config/mcp-servers.json << 'EOF'
|
||||
{
|
||||
"mcpServers": {
|
||||
"github": {
|
||||
"command": "docker",
|
||||
"args": [
|
||||
"run",
|
||||
"-i",
|
||||
"--rm",
|
||||
"-e",
|
||||
"GITHUB_PERSONAL_ACCESS_TOKEN",
|
||||
"ghcr.io/github/github-mcp-server:sha-7aced2b"
|
||||
],
|
||||
"env": {
|
||||
"GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.GITHUB_TOKEN }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Run Claude Code for Issue Triage
|
||||
uses: anthropics/claude-code-base-action@beta
|
||||
with:
|
||||
prompt_file: /tmp/claude-prompts/triage-prompt.txt
|
||||
allowed_tools: "Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__search_issues,mcp__github__list_issues"
|
||||
timeout_minutes: "5"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
mcp_config: /tmp/mcp-config/mcp-servers.json
|
||||
claude_env: |
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
37
.github/workflows/claude.yml
vendored
Normal file
37
.github/workflows/claude.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Claude Code
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
issues:
|
||||
types: [opened, assigned]
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
jobs:
|
||||
claude:
|
||||
if: |
|
||||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
||||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run Claude Code
|
||||
id: claude
|
||||
uses: anthropics/claude-code-action@beta
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
|
||||
355
CHANGELOG.md
Normal file
355
CHANGELOG.md
Normal file
@@ -0,0 +1,355 @@
|
||||
# Changelog
|
||||
|
||||
## 1.0.38
|
||||
|
||||
- Released [hooks](https://docs.anthropic.com/en/docs/claude-code/hooks). Special thanks to community input in [Github Issues](https://github.com/anthropics/claude-code/issues/712)
|
||||
|
||||
## 1.0.37
|
||||
|
||||
- Remove ability to set `Proxy-Authorization` header via ANTHROPIC_AUTH_TOKEN or apiKeyHelper
|
||||
|
||||
## 1.0.36
|
||||
|
||||
- Web search now takes today's date into context
|
||||
- Fixed a bug where stdio MCP servers were not terminating properly on exit
|
||||
|
||||
## 1.0.35
|
||||
|
||||
- Added support for MCP OAuth Authorization Server discovery
|
||||
|
||||
## 1.0.34
|
||||
|
||||
- Fixed a memory leak causing a MaxListenersExceededWarning message to appear
|
||||
|
||||
## 1.0.33
|
||||
|
||||
- Improved logging functionality with session ID support
|
||||
- Added undo functionality (Ctrl+Z and vim 'u' command)
|
||||
- Improvements to plan mode
|
||||
|
||||
## 1.0.32
|
||||
|
||||
- Updated loopback config for litellm
|
||||
- Added forceLoginMethod setting to bypass login selection screen
|
||||
|
||||
## 1.0.31
|
||||
|
||||
- Fixed a bug where ~/.claude.json would get reset when file contained invalid JSON
|
||||
|
||||
## 1.0.30
|
||||
|
||||
- Custom slash commands: Run bash output, @-mention files, enable thinking with thinking keywords
|
||||
- Improved file path autocomplete with filename matching
|
||||
- Added timestamps in Ctrl-r mode and fixed Ctrl-c handling
|
||||
- Enhanced jq regex support for complex filters with pipes and select
|
||||
|
||||
## 1.0.29
|
||||
|
||||
- Improved CJK character support in cursor navigation and rendering
|
||||
|
||||
## 1.0.28
|
||||
|
||||
- Slash commands: Fix selector display during history navigation
|
||||
- Resizes images before upload to prevent API size limit errors
|
||||
- Added XDG_CONFIG_HOME support to configuration directory
|
||||
- Performance optimizations for memory usage
|
||||
- New attributes (terminal.type, language) in OpenTelemetry logging
|
||||
|
||||
## 1.0.27
|
||||
|
||||
- Streamable HTTP MCP servers are now supported
|
||||
- Remote MCP servers (SSE and HTTP) now support OAuth
|
||||
- MCP resources can now be @-mentioned
|
||||
- /resume slash command to switch conversations within Claude Code
|
||||
|
||||
## 1.0.25
|
||||
|
||||
- Slash commands: moved "project" and "user" prefixes to descriptions
|
||||
- Slash commands: improved reliability for command discovery
|
||||
- Improved support for Ghostty
|
||||
- Improved web search reliability
|
||||
|
||||
## 1.0.24
|
||||
|
||||
- Improved /mcp output
|
||||
- Fixed a bug where settings arrays got overwritten instead of merged
|
||||
|
||||
## 1.0.23
|
||||
|
||||
- Released TypeScript SDK: import @anthropic-ai/claude-code to get started
|
||||
- Released Python SDK: pip install claude-code-sdk to get started
|
||||
|
||||
## 1.0.22
|
||||
|
||||
- SDK: Renamed `total_cost` to `total_cost_usd`
|
||||
|
||||
## 1.0.21
|
||||
|
||||
- Improved editing of files with tab-based indentation
|
||||
- Fix for tool_use without matching tool_result errors
|
||||
- Fixed a bug where stdio MCP server processes would linger after quitting Claude Code
|
||||
|
||||
## 1.0.18
|
||||
|
||||
- Added --add-dir CLI argument for specifying additional working directories
|
||||
- Added streaming input support without require -p flag
|
||||
- Improved startup performance and session storage performance
|
||||
- Added CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR environment variable to freeze working directory for bash commands
|
||||
- Added detailed MCP server tools display (/mcp)
|
||||
- MCP authentication and permission improvements
|
||||
- Added auto-reconnection for MCP SSE connections on disconnect
|
||||
- Fixed issue where pasted content was lost when dialogs appeared
|
||||
|
||||
## 1.0.17
|
||||
|
||||
- We now emit messages from sub-tasks in -p mode (look for the parent_tool_use_id property)
|
||||
- Fixed crashes when the VS Code diff tool is invoked multiple times quickly
|
||||
- MCP server list UI improvements
|
||||
- Update Claude Code process title to display "claude" instead of "node"
|
||||
|
||||
## 1.0.11
|
||||
|
||||
- Claude Code can now also be used with a Claude Pro subscription
|
||||
- Added /upgrade for smoother switching to Claude Max plans
|
||||
- Improved UI for authentication from API keys and Bedrock/Vertex/external auth tokens
|
||||
- Improved shell configuration error handling
|
||||
- Improved todo list handling during compaction
|
||||
|
||||
## 1.0.10
|
||||
|
||||
- Added markdown table support
|
||||
- Improved streaming performance
|
||||
|
||||
## 1.0.8
|
||||
|
||||
- Fixed Vertex AI region fallback when using CLOUD_ML_REGION
|
||||
- Increased default otel interval from 1s -> 5s
|
||||
- Fixed edge cases where MCP_TIMEOUT and MCP_TOOL_TIMEOUT weren't being respected
|
||||
- Fixed a regression where search tools unnecessarily asked for permissions
|
||||
- Added support for triggering thinking non-English languages
|
||||
- Improved compacting UI
|
||||
|
||||
## 1.0.7
|
||||
|
||||
- Renamed /allowed-tools -> /permissions
|
||||
- Migrated allowedTools and ignorePatterns from .claude.json -> settings.json
|
||||
- Deprecated claude config commands in favor of editing settings.json
|
||||
- Fixed a bug where --dangerously-skip-permissions sometimes didn't work in --print mode
|
||||
- Improved error handling for /install-github-app
|
||||
- Bugfixes, UI polish, and tool reliability improvements
|
||||
|
||||
## 1.0.6
|
||||
|
||||
- Improved edit reliability for tab-indented files
|
||||
- Respect CLAUDE_CONFIG_DIR everywhere
|
||||
- Reduced unnecessary tool permission prompts
|
||||
- Added support for symlinks in @file typeahead
|
||||
- Bugfixes, UI polish, and tool reliability improvements
|
||||
|
||||
## 1.0.4
|
||||
|
||||
- Fixed a bug where MCP tool errors weren't being parsed correctly
|
||||
|
||||
## 1.0.1
|
||||
|
||||
- Added `DISABLE_INTERLEAVED_THINKING` to give users the option to opt out of interleaved thinking.
|
||||
- Improved model references to show provider-specific names (Sonnet 3.7 for Bedrock, Sonnet 4 for Console)
|
||||
- Updated documentation links and OAuth process descriptions
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Claude Code is now generally available
|
||||
- Introducing Sonnet 4 and Opus 4 models
|
||||
|
||||
## 0.2.125
|
||||
|
||||
- Breaking change: Bedrock ARN passed to `ANTHROPIC_MODEL` or `ANTHROPIC_SMALL_FAST_MODEL` should no longer contain an escaped slash (specify `/` instead of `%2F`)
|
||||
- Removed `DEBUG=true` in favor of `ANTHROPIC_LOG=debug`, to log all requests
|
||||
|
||||
## 0.2.117
|
||||
|
||||
- Breaking change: --print JSON output now returns nested message objects, for forwards-compatibility as we introduce new metadata fields
|
||||
- Introduced settings.cleanupPeriodDays
|
||||
- Introduced CLAUDE_CODE_API_KEY_HELPER_TTL_MS env var
|
||||
- Introduced --debug mode
|
||||
|
||||
## 0.2.108
|
||||
|
||||
- You can now send messages to Claude while it works to steer Claude in real-time
|
||||
- Introduced BASH_DEFAULT_TIMEOUT_MS and BASH_MAX_TIMEOUT_MS env vars
|
||||
- Fixed a bug where thinking was not working in -p mode
|
||||
- Fixed a regression in /cost reporting
|
||||
- Deprecated MCP wizard interface in favor of other MCP commands
|
||||
- Lots of other bugfixes and improvements
|
||||
|
||||
## 0.2.107
|
||||
|
||||
- CLAUDE.md files can now import other files. Add @path/to/file.md to ./CLAUDE.md to load additional files on launch
|
||||
|
||||
## 0.2.106
|
||||
|
||||
- MCP SSE server configs can now specify custom headers
|
||||
- Fixed a bug where MCP permission prompt didn't always show correctly
|
||||
|
||||
## 0.2.105
|
||||
|
||||
- Claude can now search the web
|
||||
- Moved system & account status to /status
|
||||
- Added word movement keybindings for Vim
|
||||
- Improved latency for startup, todo tool, and file edits
|
||||
|
||||
## 0.2.102
|
||||
|
||||
- Improved thinking triggering reliability
|
||||
- Improved @mention reliability for images and folders
|
||||
- You can now paste multiple large chunks into one prompt
|
||||
|
||||
## 0.2.100
|
||||
|
||||
- Fixed a crash caused by a stack overflow error
|
||||
- Made db storage optional; missing db support disables --continue and --resume
|
||||
|
||||
## 0.2.98
|
||||
|
||||
- Fixed an issue where auto-compact was running twice
|
||||
|
||||
## 0.2.96
|
||||
|
||||
- Claude Code can now also be used with a Claude Max subscription (https://claude.ai/upgrade)
|
||||
|
||||
## 0.2.93
|
||||
|
||||
- Resume conversations from where you left off from with "claude --continue" and "claude --resume"
|
||||
- Claude now has access to a Todo list that helps it stay on track and be more organized
|
||||
|
||||
## 0.2.82
|
||||
|
||||
- Added support for --disallowedTools
|
||||
- Renamed tools for consistency: LSTool -> LS, View -> Read, etc.
|
||||
|
||||
## 0.2.75
|
||||
|
||||
- Hit Enter to queue up additional messages while Claude is working
|
||||
- Drag in or copy/paste image files directly into the prompt
|
||||
- @-mention files to directly add them to context
|
||||
- Run one-off MCP servers with `claude --mcp-config <path-to-file>`
|
||||
- Improved performance for filename auto-complete
|
||||
|
||||
## 0.2.74
|
||||
|
||||
- Added support for refreshing dynamically generated API keys (via apiKeyHelper), with a 5 minute TTL
|
||||
- Task tool can now perform writes and run bash commands
|
||||
|
||||
## 0.2.72
|
||||
|
||||
- Updated spinner to indicate tokens loaded and tool usage
|
||||
|
||||
## 0.2.70
|
||||
|
||||
- Network commands like curl are now available for Claude to use
|
||||
- Claude can now run multiple web queries in parallel
|
||||
- Pressing ESC once immediately interrupts Claude in Auto-accept mode
|
||||
|
||||
## 0.2.69
|
||||
|
||||
- Fixed UI glitches with improved Select component behavior
|
||||
- Enhanced terminal output display with better text truncation logic
|
||||
|
||||
## 0.2.67
|
||||
|
||||
- Shared project permission rules can be saved in .claude/settings.json
|
||||
|
||||
## 0.2.66
|
||||
|
||||
- Print mode (-p) now supports streaming output via --output-format=stream-json
|
||||
- Fixed issue where pasting could trigger memory or bash mode unexpectedly
|
||||
|
||||
## 0.2.63
|
||||
|
||||
- Fixed an issue where MCP tools were loaded twice, which caused tool call errors
|
||||
|
||||
## 0.2.61
|
||||
|
||||
- Navigate menus with vim-style keys (j/k) or bash/emacs shortcuts (Ctrl+n/p) for faster interaction
|
||||
- Enhanced image detection for more reliable clipboard paste functionality
|
||||
- Fixed an issue where ESC key could crash the conversation history selector
|
||||
|
||||
## 0.2.59
|
||||
|
||||
- Copy+paste images directly into your prompt
|
||||
- Improved progress indicators for bash and fetch tools
|
||||
- Bugfixes for non-interactive mode (-p)
|
||||
|
||||
## 0.2.54
|
||||
|
||||
- Quickly add to Memory by starting your message with '#'
|
||||
- Press ctrl+r to see full output for long tool results
|
||||
- Added support for MCP SSE transport
|
||||
|
||||
## 0.2.53
|
||||
|
||||
- New web fetch tool lets Claude view URLs that you paste in
|
||||
- Fixed a bug with JPEG detection
|
||||
|
||||
## 0.2.50
|
||||
|
||||
- New MCP "project" scope now allows you to add MCP servers to .mcp.json files and commit them to your repository
|
||||
|
||||
## 0.2.49
|
||||
|
||||
- Previous MCP server scopes have been renamed: previous "project" scope is now "local" and "global" scope is now "user"
|
||||
|
||||
## 0.2.47
|
||||
|
||||
- Press Tab to auto-complete file and folder names
|
||||
- Press Shift + Tab to toggle auto-accept for file edits
|
||||
- Automatic conversation compaction for infinite conversation length (toggle with /config)
|
||||
|
||||
## 0.2.44
|
||||
|
||||
- Ask Claude to make a plan with thinking mode: just say 'think' or 'think harder' or even 'ultrathink'
|
||||
|
||||
## 0.2.41
|
||||
|
||||
- MCP server startup timeout can now be configured via MCP_TIMEOUT environment variable
|
||||
- MCP server startup no longer blocks the app from starting up
|
||||
|
||||
## 0.2.37
|
||||
|
||||
- New /release-notes command lets you view release notes at any time
|
||||
- `claude config add/remove` commands now accept multiple values separated by commas or spaces
|
||||
|
||||
## 0.2.36
|
||||
|
||||
- Import MCP servers from Claude Desktop with `claude mcp add-from-claude-desktop`
|
||||
- Add MCP servers as JSON strings with `claude mcp add-json <n> <json>`
|
||||
|
||||
## 0.2.34
|
||||
|
||||
- Vim bindings for text input - enable with /vim or /config
|
||||
|
||||
## 0.2.32
|
||||
|
||||
- Interactive MCP setup wizard: Run "claude mcp add" to add MCP servers with a step-by-step interface
|
||||
- Fix for some PersistentShell issues
|
||||
|
||||
## 0.2.31
|
||||
|
||||
- Custom slash commands: Markdown files in .claude/commands/ directories now appear as custom slash commands to insert prompts into your conversation
|
||||
- MCP debug mode: Run with --mcp-debug flag to get more information about MCP server errors
|
||||
|
||||
## 0.2.30
|
||||
|
||||
- Added ANSI color theme for better terminal compatibility
|
||||
- Fixed issue where slash command arguments weren't being sent properly
|
||||
- (Mac-only) API keys are now stored in macOS Keychain
|
||||
|
||||
## 0.2.26
|
||||
|
||||
- New /approved-tools command for managing tool permissions
|
||||
- Word-level diff display for improved code readability
|
||||
- Fuzzy matching for slash commands
|
||||
|
||||
## 0.2.21
|
||||
|
||||
- Fuzzy matching for /commands
|
||||
@@ -1,3 +1 @@
|
||||
Claude Code is a Beta research preview per our [Commercial Terms of Service](https://www.anthropic.com/legal/commercial-terms). When you use Claude Code, we collect Feedback, which includes usage data such as code acceptance or rejections, as well as associated conversation data. We may use this Feedback to improve our products, although we will not train models using your Feedback from Claude Code.
|
||||
|
||||
© Anthropic PBC. All rights reserved. Use is subject to Anthropic's [Commercial Terms of Service](https://www.anthropic.com/legal/commercial-terms).
|
||||
|
||||
45
README.md
45
README.md
@@ -1,53 +1,34 @@
|
||||
# Claude Code (Research Preview)
|
||||
# Claude Code
|
||||
|
||||
 [![npm]](https://www.npmjs.com/package/@anthropic-ai/claude-code)
|
||||
|
||||
[npm]: https://img.shields.io/npm/v/@anthropic-ai/claude-code.svg?style=flat-square
|
||||
|
||||
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
|
||||
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows -- all through natural language commands. Use it in your terminal, IDE, or tag @claude on Github.
|
||||
|
||||
Some of its key capabilities include:
|
||||
**Learn more in the [official documentation](https://docs.anthropic.com/en/docs/claude-code/overview)**.
|
||||
|
||||
- Edit files and fix bugs across your codebase
|
||||
- Answer questions about your code's architecture and logic
|
||||
- Execute and fix tests, lint, and other commands
|
||||
- Search through git history, resolve merge conflicts, and create commits and PRs
|
||||
|
||||
**Learn more in the [official documentation](https://docs.anthropic.com/en/docs/agents/claude-code/introduction)**.
|
||||
<img src="./demo.gif" />
|
||||
|
||||
## Get started
|
||||
|
||||
1. If you are new to Node.js and Node Package Manager (`npm`), then it is recommended that you configure an NPM prefix for your user.
|
||||
Instructions on how to do this can be found [here](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#recommended-create-a-new-user-writable-npm-prefix).
|
||||
1. Install Claude Code:
|
||||
|
||||
*Important* We recommend installing this package as a non-privileged user, not as an administrative user like `root`.
|
||||
Installing as a non-privileged user helps maintain your system's security and stability.
|
||||
```sh
|
||||
npm install -g @anthropic-ai/claude-code
|
||||
```
|
||||
|
||||
2. Install Claude Code:
|
||||
|
||||
```sh
|
||||
npm install -g @anthropic-ai/claude-code
|
||||
```
|
||||
2. Navigate to your project directory and run `claude`.
|
||||
|
||||
3. Navigate to your project directory and run <code>claude</code>.
|
||||
## Reporting Bugs
|
||||
|
||||
4. Complete the one-time OAuth process with your Anthropic Console account.
|
||||
We welcome your feedback. Use the `/bug` command to report issues directly within Claude Code, or file a [GitHub issue](https://github.com/anthropics/claude-code/issues).
|
||||
|
||||
### Research Preview
|
||||
|
||||
We're launching Claude Code as a beta product in research preview to learn directly from developers about their experiences collaborating with AI agents. Our aim is to learn more about how developers prefer to collaborate with AI tools, which development workflows benefit most from working with the agent, and how we can make the agent experience more intuitive.
|
||||
|
||||
This is an early version of the product experience, and it's likely to evolve as we learn more about developer preferences. Claude Code is an early look into what's possible with agentic coding, and we know there are areas to improve. We plan to enhance tool execution reliability, support for long-running commands, terminal rendering, and Claude's self-knowledge of its capabilities -- as well as many other product experiences -- over the coming weeks.
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
We welcome feedback during this beta period. Use the `/bug` command to report issues directly within Claude Code, or file a [GitHub issue](https://github.com/anthropics/claude-code/issues).
|
||||
|
||||
### Data collection, usage, and retention
|
||||
## Data collection, usage, and retention
|
||||
|
||||
When you use Claude Code, we collect feedback, which includes usage data (such as code acceptance or rejections), associated conversation data, and user feedback submitted via the `/bug` command.
|
||||
|
||||
#### How we use your data
|
||||
### How we use your data
|
||||
|
||||
We may use feedback to improve our products and services, but we will not train generative models using your feedback from Claude Code. Given their potentially sensitive nature, we store user feedback transcripts for only 30 days.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user