flowchart TD
%% Main Entry Point and Initialization
Start([Application Start]) --> ParseArgs[Parse Command Line Arguments]
ParseArgs --> CheckStdin{Check stdin}
CheckStdin -->|Input Piped| ProcessPiped[Process Piped Input]
CheckStdin -->|Interactive Mode| CheckAuth{Authentication Status}
%% Authentication Flow
CheckAuth -->|Not Authenticated| OAuthFlow[OAuth Authentication]
This file contains 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 boto3 | |
import json | |
client = boto3.client('bedrock-runtime', region_name='us-east-1') | |
response = client.invoke_model( | |
modelId='us.anthropic.claude-3-7-sonnet-2025-0219-v1:0', | |
body=json.dumps({ | |
"anthropic_version": "bedrock-2023-05-31", | |
"messages": [ |
This file contains 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
var c9 = !!process.env.CLAUDE_CODE_USE_BEDROCK, | |
p9 = !!process.env.CLAUDE_CODE_USE_VERTEX, | |
Tl1 = { | |
bedrock: 'us.anthropic.claude-3-7-sonnet-20250219-v1:0', | |
vertex: 'claude-3-7-sonnet@20250219', | |
firstParty: 'claude-3-7-sonnet-20250219', | |
}, | |
PB = c9 | |
? 'us.anthropic.claude-3-5-haiku-20241022-v1:0' | |
: p9 |
This file contains 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 OX9(I, G) { | |
let Z = | |
G.type === 'sse' | |
? new jN1(new URL(G.url)) | |
: new MN1({ | |
command: G.command, | |
args: G.args, | |
env: { ...process.env, ...G.env }, | |
stderr: 'pipe', | |
}), |
This file contains 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 Lu(I) { | |
if (await ug.isEnabled()) | |
return ( | |
s1('tengu_thinking', { | |
method: 'scratchpad', | |
tokenCount: '0', | |
messageId: QZ(I), | |
provider: c9 ? 'bedrock' : p9 ? 'vertex' : '1p', | |
}), | |
0 |
This file contains 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
function CQ2() { | |
return `You are ${w4}, Anthropic's official CLI for Claude.` | |
} | |
async function fR() { | |
return [ | |
`You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user. | |
IMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse. | |
IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code). |
This file contains 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
var FD2 = _((AQ3, HD2) => { | |
function M99(I) { | |
return { | |
name: 'OCaml', | |
aliases: ['ml'], | |
keywords: { | |
$pattern: '[a-z_]\\w*!?', | |
keyword: | |
'and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value', | |
built_in: |
This file contains 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
var SE2 = 'Sends the user swag stickers with love from Anthropic.', | |
LE2 = `This tool should be used whenever a user expresses interest in receiving Anthropic or Claude stickers, swag, or merchandise. When triggered, it will display a shipping form for the user to enter their mailing address and contact details. Once submitted, Anthropic will process the request and ship stickers to the provided address. | |
Common trigger phrases to watch for: | |
- "Can I get some Anthropic stickers please?" | |
- "How do I get Anthropic swag?" | |
- "I'd love some Claude stickers" | |
- "Where can I get merchandise?" | |
- Any mention of wanting stickers or swag |
This file has been truncated, but you can view the full file.
This file contains 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
#!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps | |
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service. | |
// By using Claude Code, you agree that all code acceptance or rejection decisions you make, | |
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms, | |
// and may be used to improve Anthropic's products, including training models. | |
// You are responsible for reviewing any code suggestions before use. | |
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms). |
This file contains 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
fail_fast: true | |
default_language_version: | |
python: python3.10 | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.4.0 | |
hooks: | |
- id: trailing-whitespace |
NewerOlder