From e377c65244702545c9e16d24a864c273f27d3174 Mon Sep 17 00:00:00 2001 From: Sofer Athlan-Guyot Date: Thu, 26 Feb 2026 01:12:52 +0100 Subject: [PATCH] Add documentation about the AOuth Anthropic authentication --- README.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.org b/README.org index 753701fe..3fc6a48c 100644 --- a/README.org +++ b/README.org @@ -245,6 +245,19 @@ For API key authentication: :api-key (lambda () (auth-source-pass-get "secret" "anthropic-api-key")))) #+end_src +For OAuth token authentication (the =CLAUDE_CODE_OAUTH_TOKEN= we get from =claude setup-token=): + +#+begin_src emacs-lisp +;; With string +(setq agent-shell-anthropic-authentication + (agent-shell-anthropic-make-authentication :oauth "your-oauth-token-here")) + +;; With function +(setq agent-shell-anthropic-authentication + (agent-shell-anthropic-make-authentication + :oauth (lambda () (auth-source-pass-get "secret" "anthropic-oauth-token")))) +#+end_src + For alternative Anthropic-compatible API endpoints, configure via environment variables: #+begin_src emacs-lisp