moonclaude 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moonclaude-2.0.0/PKG-INFO +110 -0
- moonclaude-2.0.0/README.md +98 -0
- moonclaude-2.0.0/moonclaude/__init__.py +4 -0
- moonclaude-2.0.0/moonclaude/__main__.py +6 -0
- moonclaude-2.0.0/moonclaude/branding.py +18 -0
- moonclaude-2.0.0/moonclaude/commands.py +1210 -0
- moonclaude-2.0.0/moonclaude/config.py +532 -0
- moonclaude-2.0.0/moonclaude/main.py +142 -0
- moonclaude-2.0.0/moonclaude/memory.py +595 -0
- moonclaude-2.0.0/moonclaude/models.py +328 -0
- moonclaude-2.0.0/moonclaude/proxy_logging.py +309 -0
- moonclaude-2.0.0/moonclaude/shells.py +185 -0
- moonclaude-2.0.0/moonclaude/ui.py +154 -0
- moonclaude-2.0.0/moonclaude/wizard.py +215 -0
- moonclaude-2.0.0/moonclaude.egg-info/PKG-INFO +110 -0
- moonclaude-2.0.0/moonclaude.egg-info/SOURCES.txt +20 -0
- moonclaude-2.0.0/moonclaude.egg-info/dependency_links.txt +1 -0
- moonclaude-2.0.0/moonclaude.egg-info/entry_points.txt +3 -0
- moonclaude-2.0.0/moonclaude.egg-info/requires.txt +3 -0
- moonclaude-2.0.0/moonclaude.egg-info/top_level.txt +1 -0
- moonclaude-2.0.0/pyproject.toml +25 -0
- moonclaude-2.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: moonclaude
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Moon for Claude: run Claude Code on external LLMs via LiteLLM
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: moonclaude,claude,llm,openrouter,litellm,cli
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: pyyaml>=6.0
|
|
10
|
+
Requires-Dist: litellm[proxy]>=1.40.0
|
|
11
|
+
Requires-Dist: rich>=13.0.0
|
|
12
|
+
|
|
13
|
+
# MoonClaude 🌙
|
|
14
|
+
|
|
15
|
+
**Moon for Claude**: Run [Claude Code](https://github.com/anthropics/claude-code) fully autonomously on external LLMs (e.g. Qwen, Gemini, MiniMax, OpenAI) through a LiteLLM proxy, while enjoying **zero-downtime hot reloading** and an **Antigravity-grade persistent AI memory** engine.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🚀 Features
|
|
20
|
+
|
|
21
|
+
- **Free OpenRouter Models**: Interactively fetch and route your prompts through any of the 25+ completely free models on OpenRouter, or configure your own premium API keys (Gemini, Groq, OpenAI).
|
|
22
|
+
- **True Zero-Downtime Hot Reloading**: Press `Alt+M` directly in the proxy terminal to instantaneously swap the active model. MoonClaude dynamically intercepts the routing under the hood—no proxy restarts, no lost context in the CLI, no downtime.
|
|
23
|
+
- **Antigravity-Grade Project Memory**:
|
|
24
|
+
- Auto-discovers and enforces `MOONCLAUDE.md` global project instructions into Claude Code's system prompts.
|
|
25
|
+
- Generates cross-session, highly structured summarization context representing your recent AI coding sessions, intelligently managing your AI's working context without maxing out open files.
|
|
26
|
+
- Easily browse transcripts natively with `moon history`.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 📦 Installation & Setup
|
|
31
|
+
|
|
32
|
+
### 1. Prerequisites
|
|
33
|
+
If you haven't already, you need `Node.js` installed to run Anthropic's official Claude Code CLI.
|
|
34
|
+
```bash
|
|
35
|
+
# Install Claude Code globally via npm
|
|
36
|
+
npm install -g @anthropic-ai/claude-code
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Install MoonClaude
|
|
40
|
+
MoonClaude is available directly on PyPI!
|
|
41
|
+
```bash
|
|
42
|
+
pip install moonclaude
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 3. Initialize Settings
|
|
46
|
+
Run the interactive setup wizard to map your API keys (OpenRouter, Gemini, Groq) and select your preferred chat models.
|
|
47
|
+
```bash
|
|
48
|
+
moon setup
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 🏃 Quick Start
|
|
54
|
+
|
|
55
|
+
The easiest way to launch the proxy and jump straight into Claude Code is a single command. Open your project folder and run:
|
|
56
|
+
```bash
|
|
57
|
+
moon launch
|
|
58
|
+
```
|
|
59
|
+
*(If you haven't run setup yet, it will guide you through it first!)*
|
|
60
|
+
|
|
61
|
+
**Manual Control:**
|
|
62
|
+
If you prefer running the Proxy and Claude independently, open two terminals:
|
|
63
|
+
- **Terminal 1**: Run `moon start` (Starts the LiteLLM routing proxy)
|
|
64
|
+
- **Terminal 2**: Run `moon chat` (Launches Claude Code seamlessly attached to the proxy)
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 🎛️ Core Commands
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
moon setup Interactive wizard for API keys and preferred models
|
|
72
|
+
moon launch Quick launch (starts proxy in background, then launches Claude)
|
|
73
|
+
moon chat Launch Claude connected to the proxy
|
|
74
|
+
moon start Start LiteLLM proxy in the foreground with live token monitoring
|
|
75
|
+
moon switch Fast CLI model switcher
|
|
76
|
+
moon history Interactive rich browser for your past conversation logs
|
|
77
|
+
moon memory Detailed control over the project memory context engine
|
|
78
|
+
moon status Display system health, active models, and paths
|
|
79
|
+
moon Show CLI help and commands
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
> **Compatibility**: MoonClaude preserves the old `claude-ext ...` legacy command aliases. Your legacy `~/.claude-ext` config will automatically migrate to `~/.moonclaude/` at launch!
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## ♻️ Zero-Downtime Hot Reloading
|
|
87
|
+
|
|
88
|
+
When you are deep in a Claude Code debug session, discovering your chosen model is failing can be frustrating.
|
|
89
|
+
|
|
90
|
+
Instead of dropping context:
|
|
91
|
+
1. Keep the proxy running in the foreground (`moon start`).
|
|
92
|
+
2. Press `Alt+M`.
|
|
93
|
+
3. Select a new LLM from your interactive UI overlay.
|
|
94
|
+
4. MoonClaude dynamically pre-warms its internal router injection without dropping the proxy connection. Your next prompt in the Claude Code terminal instantly bridges over to the new model!
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 🧠 Memory Engine
|
|
99
|
+
|
|
100
|
+
MoonClaude injects long-term memory into Claude Code.
|
|
101
|
+
|
|
102
|
+
1. **`MOONCLAUDE.md`**: Place this file in your project root. MoonClaude automatically reads it and appends it to your AI's persistent context across all sessions.
|
|
103
|
+
2. **Context Compression**: When you boot `moon chat`, MoonClaude evaluates your last 20 sessions and constructs an elegant, compressed timeline of files you've modified, goals you've accomplished, and context you shouldn't forget.
|
|
104
|
+
3. **Session Replay**: Type `moon history` to explore Rich-formatted logs of all of your previous AI code iterations.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# MoonClaude 🌙
|
|
2
|
+
|
|
3
|
+
**Moon for Claude**: Run [Claude Code](https://github.com/anthropics/claude-code) fully autonomously on external LLMs (e.g. Qwen, Gemini, MiniMax, OpenAI) through a LiteLLM proxy, while enjoying **zero-downtime hot reloading** and an **Antigravity-grade persistent AI memory** engine.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🚀 Features
|
|
8
|
+
|
|
9
|
+
- **Free OpenRouter Models**: Interactively fetch and route your prompts through any of the 25+ completely free models on OpenRouter, or configure your own premium API keys (Gemini, Groq, OpenAI).
|
|
10
|
+
- **True Zero-Downtime Hot Reloading**: Press `Alt+M` directly in the proxy terminal to instantaneously swap the active model. MoonClaude dynamically intercepts the routing under the hood—no proxy restarts, no lost context in the CLI, no downtime.
|
|
11
|
+
- **Antigravity-Grade Project Memory**:
|
|
12
|
+
- Auto-discovers and enforces `MOONCLAUDE.md` global project instructions into Claude Code's system prompts.
|
|
13
|
+
- Generates cross-session, highly structured summarization context representing your recent AI coding sessions, intelligently managing your AI's working context without maxing out open files.
|
|
14
|
+
- Easily browse transcripts natively with `moon history`.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 📦 Installation & Setup
|
|
19
|
+
|
|
20
|
+
### 1. Prerequisites
|
|
21
|
+
If you haven't already, you need `Node.js` installed to run Anthropic's official Claude Code CLI.
|
|
22
|
+
```bash
|
|
23
|
+
# Install Claude Code globally via npm
|
|
24
|
+
npm install -g @anthropic-ai/claude-code
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 2. Install MoonClaude
|
|
28
|
+
MoonClaude is available directly on PyPI!
|
|
29
|
+
```bash
|
|
30
|
+
pip install moonclaude
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 3. Initialize Settings
|
|
34
|
+
Run the interactive setup wizard to map your API keys (OpenRouter, Gemini, Groq) and select your preferred chat models.
|
|
35
|
+
```bash
|
|
36
|
+
moon setup
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🏃 Quick Start
|
|
42
|
+
|
|
43
|
+
The easiest way to launch the proxy and jump straight into Claude Code is a single command. Open your project folder and run:
|
|
44
|
+
```bash
|
|
45
|
+
moon launch
|
|
46
|
+
```
|
|
47
|
+
*(If you haven't run setup yet, it will guide you through it first!)*
|
|
48
|
+
|
|
49
|
+
**Manual Control:**
|
|
50
|
+
If you prefer running the Proxy and Claude independently, open two terminals:
|
|
51
|
+
- **Terminal 1**: Run `moon start` (Starts the LiteLLM routing proxy)
|
|
52
|
+
- **Terminal 2**: Run `moon chat` (Launches Claude Code seamlessly attached to the proxy)
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 🎛️ Core Commands
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
moon setup Interactive wizard for API keys and preferred models
|
|
60
|
+
moon launch Quick launch (starts proxy in background, then launches Claude)
|
|
61
|
+
moon chat Launch Claude connected to the proxy
|
|
62
|
+
moon start Start LiteLLM proxy in the foreground with live token monitoring
|
|
63
|
+
moon switch Fast CLI model switcher
|
|
64
|
+
moon history Interactive rich browser for your past conversation logs
|
|
65
|
+
moon memory Detailed control over the project memory context engine
|
|
66
|
+
moon status Display system health, active models, and paths
|
|
67
|
+
moon Show CLI help and commands
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
> **Compatibility**: MoonClaude preserves the old `claude-ext ...` legacy command aliases. Your legacy `~/.claude-ext` config will automatically migrate to `~/.moonclaude/` at launch!
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## ♻️ Zero-Downtime Hot Reloading
|
|
75
|
+
|
|
76
|
+
When you are deep in a Claude Code debug session, discovering your chosen model is failing can be frustrating.
|
|
77
|
+
|
|
78
|
+
Instead of dropping context:
|
|
79
|
+
1. Keep the proxy running in the foreground (`moon start`).
|
|
80
|
+
2. Press `Alt+M`.
|
|
81
|
+
3. Select a new LLM from your interactive UI overlay.
|
|
82
|
+
4. MoonClaude dynamically pre-warms its internal router injection without dropping the proxy connection. Your next prompt in the Claude Code terminal instantly bridges over to the new model!
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 🧠 Memory Engine
|
|
87
|
+
|
|
88
|
+
MoonClaude injects long-term memory into Claude Code.
|
|
89
|
+
|
|
90
|
+
1. **`MOONCLAUDE.md`**: Place this file in your project root. MoonClaude automatically reads it and appends it to your AI's persistent context across all sessions.
|
|
91
|
+
2. **Context Compression**: When you boot `moon chat`, MoonClaude evaluates your last 20 sessions and constructs an elegant, compressed timeline of files you've modified, goals you've accomplished, and context you shouldn't forget.
|
|
92
|
+
3. **Session Replay**: Type `moon history` to explore Rich-formatted logs of all of your previous AI code iterations.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Branding constants shared across MoonClaude modules.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
APP_NAME = "moonclaude"
|
|
10
|
+
APP_TITLE = "MoonClaude"
|
|
11
|
+
CLI_NAME = "moonclaude"
|
|
12
|
+
CLI_ALIAS = "moon"
|
|
13
|
+
LEGACY_CLI_NAME = "claude-ext"
|
|
14
|
+
|
|
15
|
+
CONFIG_DIR = Path(os.environ.get("MOONCLAUDE_HOME", Path.home() / ".moonclaude")).expanduser()
|
|
16
|
+
LEGACY_CONFIG_DIR = Path(os.environ.get("MOONCLAUDE_LEGACY_HOME", Path.home() / ".claude-ext")).expanduser()
|
|
17
|
+
|
|
18
|
+
DEFAULT_PORT = 4000
|