Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

A long-running autonomous coding agent powered by the Claude Agent SDK. This tool can build complete applications over multiple sessions using a two-agent pattern (initializer + coding agent). Includes a React-based UI for monitoring progress in real-time.

> [!WARNING]
> **Authentication:** Anthropic's policy states that third-party developers may not offer `claude.ai` login or subscription-based rate limits for their products (including agents built on the Claude Agent SDK) unless previously approved. Using your Claude subscription with AutoForge may risk account suspension. We recommend using an API key from [console.anthropic.com](https://console.anthropic.com/) instead.

> [!NOTE]
> **This repository is no longer actively maintained.** Most agent coding tools now ship their own long-running harnesses, making this project less necessary. Feel free to fork and continue development on your own!

## Video Tutorial

[![Watch the tutorial](https://img.youtube.com/vi/nKiPOxDpcJY/hqdefault.jpg)](https://youtu.be/nKiPOxDpcJY)
Expand Down Expand Up @@ -34,8 +40,8 @@ irm https://claude.ai/install.ps1 | iex

You need one of the following:

- **Claude Pro/Max Subscription** - Use `claude login` to authenticate (recommended)
- **Anthropic API Key** - Pay-per-use from https://console.anthropic.com/
- **Anthropic API Key** (recommended) - Pay-per-use from https://console.anthropic.com/
- **Claude Pro/Max Subscription** - Use `claude login` to authenticate (see warning above)

---

Expand Down Expand Up @@ -101,7 +107,7 @@ This launches the React-based web UI at `http://localhost:5173` with:

The start script will:
1. Check if Claude CLI is installed
2. Check if you're authenticated (prompt to run `claude login` if not)
2. Check if you're authenticated (prompt to configure authentication if not)
3. Create a Python virtual environment
4. Install dependencies
5. Launch the main menu
Expand Down Expand Up @@ -371,7 +377,7 @@ Edit `security.py` to add or remove commands from `ALLOWED_COMMANDS`.
Install the Claude Code CLI using the instructions in the Prerequisites section.

**"Not authenticated with Claude"**
Run `claude login` to authenticate. The start script will prompt you to do this automatically.
Set your API key via `ANTHROPIC_API_KEY` environment variable or the Settings UI. Alternatively, run `claude login` to use subscription credentials, but note that Anthropic's policy may not permit subscription-based auth for third-party agents.

**"Appears to hang on first run"**
This is normal. The initializer agent is generating detailed test cases, which takes significant time. Watch for `[Tool: ...]` output to confirm the agent is working.
Expand Down
22 changes: 16 additions & 6 deletions auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@ def is_auth_error(text: str) -> bool:

Claude CLI requires authentication to work.

To fix this, run:
Option 1 (Recommended): Set an API key
export ANTHROPIC_API_KEY=your-key-here
Get a key at: https://console.anthropic.com/

Option 2: Use subscription login
claude login

This will open a browser window to sign in.
After logging in, try running this command again.
Note: Anthropic's policy may not permit using
subscription auth with third-party agents.
API key authentication is recommended.
==================================================
"""

Expand All @@ -69,11 +74,16 @@ def is_auth_error(text: str) -> bool:

Claude CLI requires authentication to work.

To fix this, run:
Option 1 (Recommended): Set an API key
export ANTHROPIC_API_KEY=your-key-here
Get a key at: https://console.anthropic.com/

Option 2: Use subscription login
claude login

This will open a browser window to sign in.
After logging in, try starting the agent again.
Note: Anthropic's policy may not permit using
subscription auth with third-party agents.
API key authentication is recommended.
================================================================================
"""

Expand Down
4 changes: 2 additions & 2 deletions autonomous_agent_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def parse_args() -> argparse.Namespace:
python autonomous_agent_demo.py --project-dir my-app --testing-ratio 0

Authentication:
Uses Claude CLI authentication (run 'claude login' if not logged in)
Authentication is handled by start.bat/start.sh before this runs
Uses Claude CLI authentication. API key (ANTHROPIC_API_KEY) is recommended.
Alternatively run 'claude login', but note Anthropic's policy may restrict subscription auth.
""",
)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "autoforge-ai",
"version": "0.1.18",
"version": "0.1.19",
"description": "Autonomous coding agent with web UI - build complete apps with AI",
"license": "AGPL-3.0",
"bin": {
Expand Down
5 changes: 3 additions & 2 deletions start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ REM verify the CLI is installed and remind the user to login if needed
set "CLAUDE_DIR=%USERPROFILE%\.claude"
if exist "%CLAUDE_DIR%\" (
echo [OK] Claude CLI directory found
echo ^(If you're not logged in, run: claude login^)
echo ^(Set ANTHROPIC_API_KEY or run: claude login^)
) else (
echo [!] Claude CLI not configured
echo.
echo Please run 'claude login' to authenticate before continuing.
echo Please set ANTHROPIC_API_KEY or run 'claude login' to authenticate.
echo Note: API key auth is recommended. See README for details.
echo.
pause
)
Expand Down
4 changes: 2 additions & 2 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def run_spec_creation(project_dir: Path) -> bool:
print(f"Please ensure app_spec.txt exists in: {get_project_prompts_dir(project_dir)}")
# If failed with non-zero exit and no spec, might be auth issue
if result.returncode != 0:
print("\nIf you're having authentication issues, try running: claude login")
print("\nIf you're having authentication issues, set ANTHROPIC_API_KEY or try: claude login")
return False

except FileNotFoundError:
Expand Down Expand Up @@ -416,7 +416,7 @@ def run_agent(project_name: str, project_dir: Path) -> None:
print(f"\nAgent error:\n{stderr_output.strip()}")
# Still hint about auth if exit was unexpected
if "error" in stderr_output.lower() or "exception" in stderr_output.lower():
print("\nIf this is an authentication issue, try running: claude login")
print("\nIf this is an authentication issue, set ANTHROPIC_API_KEY or try: claude login")

except KeyboardInterrupt:
print("\n\nAgent interrupted. Run again to resume.")
Expand Down
5 changes: 3 additions & 2 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ echo "[OK] Claude CLI found"
# verify the CLI is installed and remind the user to login if needed
if [ -d "$HOME/.claude" ]; then
echo "[OK] Claude CLI directory found"
echo " (If you're not logged in, run: claude login)"
echo " (Set ANTHROPIC_API_KEY or run: claude login)"
else
echo "[!] Claude CLI not configured"
echo ""
echo "Please run 'claude login' to authenticate before continuing."
echo "Please set ANTHROPIC_API_KEY or run 'claude login' to authenticate."
echo "Note: API key auth is recommended. See README for details."
echo ""
read -p "Press Enter to continue anyway, or Ctrl+C to exit..."
fi
Expand Down
6 changes: 3 additions & 3 deletions start_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ if ! command -v claude &> /dev/null; then
echo " The agent requires Claude CLI to work."
echo " Install it from: https://claude.ai/download"
echo ""
echo " After installing, run: claude login"
echo " After installing, set ANTHROPIC_API_KEY or run: claude login"
echo ""
else
echo "[OK] Claude CLI found"
# Note: Claude CLI no longer stores credentials in ~/.claude/.credentials.json
# We can't reliably check auth status without making an API call
if [ -d "$HOME/.claude" ]; then
echo " (If you're not logged in, run: claude login)"
echo " (Set ANTHROPIC_API_KEY or run: claude login)"
else
echo "[!] Claude CLI not configured - run 'claude login' first"
echo "[!] Claude CLI not configured - set ANTHROPIC_API_KEY or run 'claude login'"
fi
fi
echo ""
Expand Down
2 changes: 1 addition & 1 deletion ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions ui/src/components/SettingsModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react'
import { Loader2, AlertCircle, Check, Moon, Sun, Eye, EyeOff, ShieldCheck } from 'lucide-react'
import { Loader2, AlertCircle, AlertTriangle, Check, Moon, Sun, Eye, EyeOff, ShieldCheck } from 'lucide-react'
import { useSettings, useUpdateSettings, useAvailableModels, useAvailableProviders } from '../hooks/useProjects'
import { useTheme, THEMES } from '../hooks/useTheme'
import type { ProviderInfo } from '../lib/types'
Expand All @@ -21,7 +21,7 @@ interface SettingsModalProps {
}

const PROVIDER_INFO_TEXT: Record<string, string> = {
claude: 'Default provider. Uses your Claude CLI credentials.',
claude: 'Default provider. Uses Claude CLI credentials. API key auth is recommended.',
kimi: 'Get an API key at kimi.com',
glm: 'Get an API key at open.bigmodel.cn',
ollama: 'Run models locally. Install from ollama.com',
Expand Down Expand Up @@ -245,6 +245,15 @@ export function SettingsModal({ isOpen, onClose }: SettingsModalProps) {
{PROVIDER_INFO_TEXT[currentProvider] ?? ''}
</p>

{currentProvider === 'claude' && (
<Alert className="border-amber-500/50 bg-amber-50 dark:bg-amber-950/20 mt-2">
<AlertTriangle className="h-4 w-4 text-amber-600" />
<AlertDescription className="text-xs text-amber-700 dark:text-amber-300">
Anthropic's policy may not permit using subscription-based auth (<code className="text-xs">claude login</code>) with third-party agents. Consider using an API key provider or setting the <code className="text-xs">ANTHROPIC_API_KEY</code> environment variable to avoid potential account issues.
</AlertDescription>
</Alert>
)}

{/* Auth Token Field */}
{showAuthField && (
<div className="space-y-2 pt-1">
Expand Down
Loading