Skip to content

Commit 0e8928b

Browse files
committed
update README
1 parent b760a6a commit 0e8928b

File tree

11 files changed

+191
-150
lines changed

11 files changed

+191
-150
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
<div align="center">
22

3-
<img src="docs/resource/dspy-code.png" alt="DSPy Code Logo" width="200"/>
3+
<img src="docs/resource/dspy-code.png" alt="DSPy Code Logo" width="140"/>
44

5-
# DSPy Code
5+
<br/>
66

7-
### 🚀 AI-Powered Interactive Development Environment for DSPy
7+
<img src="docs/resource/dspy-code-banner.png" alt="DSPy Code" width="600"/>
88

9-
**Build, Optimize, and Deploy DSPy Applications with Natural Language**
9+
<br/>
10+
11+
<img src="docs/resource/dspy-code-text.svg" alt="DSPy Code" width="400"/>
12+
13+
<br/>
14+
15+
### 🚀 Your AI-Powered DSPy Development Assistant
16+
17+
**Build, Optimize, and Deploy DSPy Applications with Natural Language. Think of it as Claude Code for DSPy**
1018

1119
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
1220
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -23,7 +31,7 @@
2331

2432
---
2533

26-
### ⚡ Claude Code for DSPy
34+
### ⚡ Claude Code for DSPy
2735

2836
```bash
2937
pip install dspy-code
@@ -34,6 +42,8 @@ dspy-code
3442

3543
</div>
3644

45+
> **💡 Note:** DSPy Code is in its **initial release** and under **active development**. The quality and effectiveness of generated code depends on several factors: the **language model** you connect, **MCP (Model Context Protocol) servers** you integrate, and the **context** you provide to DSPy Code. We're continuously improving based on community feedback.
46+
3747
---
3848

3949
## ✨ What is DSPy Code?

docs/index.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ hide:
1313
</div>
1414
<div class="hero-content">
1515
<div class="hero-top">
16+
<div style="text-align: center; margin-bottom: 2em;">
17+
<img src="resource/dspy-code.png" alt="DSPy Code Logo" style="width: 140px; margin-bottom: 1em;">
18+
<br/>
19+
<img src="resource/dspy-code-banner.png" alt="DSPy Code Banner" style="width: 600px; max-width: 90%; margin: 0 auto 1em;">
20+
<br/>
21+
<img src="resource/dspy-code-text.svg" alt="DSPy Code" style="width: 400px; max-width: 80%; margin: 0 auto;">
22+
</div>
23+
1624
<h1 class="hero-title gradient-text-purple-pink-orange">
1725
Welcome to DSPy Code
1826
</h1>
1927

20-
<div class="hero-logo">
21-
<img src="resource/dspy-code.png" alt="DSPy Code Logo" class="animated-logo">
22-
</div>
23-
2428
<h2 class="hero-subtitle gradient-text-purple-pink-orange">
2529
Comprehensive CLI to Optimize Your DSPy Code
2630
</h2>
@@ -69,6 +73,17 @@ hide:
6973

7074
---
7175

76+
<div style="background: rgba(147, 51, 234, 0.1); border-left: 4px solid #9333ea; padding: 1em 1.5em; margin: 2em 0; border-radius: 8px; font-size: 0.95em; line-height: 1.6;">
77+
<p style="margin: 0; color: var(--md-default-fg-color--light);">
78+
<strong style="color: var(--md-default-fg-color);">💡 Note:</strong> DSPy Code is in its <strong>initial release</strong> and under <strong>active development</strong>.
79+
The quality and effectiveness of generated code depends on several factors: the <strong>language model</strong> you connect,
80+
<strong>MCP (Model Context Protocol) servers</strong> you integrate, and the <strong>context</strong> you provide to DSPy Code.
81+
We're continuously improving based on community feedback.
82+
</p>
83+
</div>
84+
85+
---
86+
7287
## 🎯 What is DSPy Code?
7388

7489
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 2em; border-radius: 10px; color: white; margin: 2em 0;">
55.9 KB
Loading

docs/resource/dspy-code-banner.png

29 KB
Loading

docs/resource/dspy-code-text.svg

Lines changed: 16 additions & 0 deletions
Loading

docs/stylesheets/extra.css

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@
194194
margin-left: 0.4rem;
195195
}
196196

197-
/* Theme Toggle Button - Visible and styled */
197+
/* Theme Toggle Buttons - Show both light and dark mode toggles */
198+
/* Style all palette toggles */
198199
.md-header__button[for^="__palette"] {
199200
display: flex !important;
200201
align-items: center !important;
@@ -205,22 +206,21 @@
205206
margin: 0 0.2rem !important;
206207
border-radius: 0.25rem !important;
207208
transition: all 0.2s ease !important;
209+
cursor: pointer !important;
210+
z-index: 10 !important;
211+
pointer-events: auto !important;
208212
visibility: visible !important;
209213
opacity: 1 !important;
210214
}
211215

212-
/* Show ONLY the first theme toggle button - hide all others */
213-
.md-header__button[for^="__palette"] {
216+
/* Show both palette toggles (light and dark) */
217+
.md-header__button[for="__palette_0"],
218+
.md-header__button[for="__palette_1"] {
214219
display: flex !important;
215220
visibility: visible !important;
216221
opacity: 1 !important;
217222
}
218223

219-
/* Hide the second palette toggle (Material creates one per palette) */
220-
.md-header__button[for="__palette_1"] {
221-
display: none !important;
222-
}
223-
224224
/* Hide theme toggle in drawer/sidebar only (not in header) */
225225
.md-drawer .md-header__button[for^="__palette"],
226226
.md-sidebar .md-header__button[for^="__palette"],
@@ -965,23 +965,30 @@
965965
-webkit-background-clip: text;
966966
-webkit-text-fill-color: transparent;
967967
background-clip: text;
968-
display: inline-block;
968+
display: block;
969969
font-weight: 800;
970970
letter-spacing: -0.02em;
971971
text-align: center;
972+
width: 100%;
972973
}
973974

974975
.hero-title {
975976
font-size: 5.5em;
976-
margin: 0 0 0.5em 0;
977+
margin: 0.5em 0;
977978
line-height: 1.1;
979+
display: block;
980+
width: 100%;
981+
clear: both;
978982
}
979983

980984
.hero-subtitle {
981985
font-size: 4.5em;
982986
margin: 0.5em 0 0.3em 0;
983987
line-height: 1.2;
984988
font-weight: 700;
989+
display: block;
990+
width: 100%;
991+
clear: both;
985992
}
986993

987994
.hero-description {

dspy_code/commands/interactive_command.py

Lines changed: 53 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -3127,155 +3127,83 @@ def _save_generated_code(self, command: str):
31273127

31283128

31293129
def _show_welcome_screen(console, context, config_manager):
3130-
"""Show enhanced welcome screen with colorful ASCII art and feature overview."""
3130+
"""Show simple welcome screen with ASCII art."""
31313131
from rich.align import Align
31323132
from rich.box import DOUBLE
31333133
from rich.panel import Panel
31343134
from rich.text import Text
31353135

31363136
from ..core.version_checker import display_version_info
3137+
from ..ui.welcome import DSPY_ASCII_ART, create_gradient_text
31373138

31383139
console.print()
31393140

31403141
# Display DSPy version info with warnings if needed
31413142
display_version_info(console, show_warning=True)
31423143
console.print()
31433144

3144-
# Colorful ASCII Art Banner with Gradient (from ui/welcome.py)
3145-
DSPY_ASCII_ART = """
3146-
██████╗ ███████╗██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗
3147-
██╔══██╗██╔════╝██╔══██╗╚██╗ ██╔╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝
3148-
██║ ██║███████╗██████╔╝ ╚████╔╝ ██║ ██║ ██║██║ ██║█████╗
3149-
██║ ██║╚════██║██╔═══╝ ╚██╔╝ ██║ ██║ ██║██║ ██║██╔══╝
3150-
██████╔╝███████║██║ ██║ ╚██████╗╚██████╔╝██████╔╝███████╗
3151-
╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
3152-
"""
3153-
3154-
# Create gradient colors (rainbow effect)
3145+
# Create beautiful gradient colors for the ASCII art (purple → pink → orange)
3146+
# Using exact RGB colors matching the SVG gradient
31553147
gradient_colors = [
3156-
"cyan",
3157-
"bright_cyan",
3158-
"blue",
3159-
"bright_blue",
3160-
"magenta",
3161-
"bright_magenta",
3162-
"red",
3163-
"bright_red",
3164-
"yellow",
3165-
"bright_yellow",
3148+
(217, 70, 239), # #d946ef - Deep purple - "DSPY" starts here
3149+
(217, 70, 239), # #d946ef - Purple
3150+
(192, 38, 211), # #c026d3 - Purple
3151+
(168, 85, 247), # #a855f7 - Bright purple
3152+
(168, 85, 247), # #a855f7 - Purple transitioning to pink
3153+
(236, 72, 153), # #ec4899 - Pink
3154+
(236, 72, 153), # #ec4899 - Bright pink - middle section
3155+
(244, 63, 94), # #f43f5e - Pink
3156+
(244, 63, 94), # #f43f5e - Pink transitioning to orange
3157+
(251, 146, 60), # #fb923c - Orange - "CODE" section
3158+
(251, 146, 60), # #fb923c - Bright orange
3159+
(251, 146, 60), # #fb923c - Orange end
31663160
]
31673161

3168-
# Apply gradient to ASCII art
3169-
ascii_text = Text()
3170-
all_chars = [c for c in DSPY_ASCII_ART if c not in ("\n", " ")]
3171-
total_chars = len(all_chars)
3172-
char_index = 0
3173-
3174-
for char in DSPY_ASCII_ART:
3175-
if char == "\n":
3176-
ascii_text.append("\n")
3177-
elif char == " ":
3178-
ascii_text.append(" ")
3179-
else:
3180-
position = char_index / max(total_chars - 1, 1)
3181-
color_float = position * (len(gradient_colors) - 1)
3182-
color_index = int(color_float)
3183-
color = gradient_colors[min(color_index, len(gradient_colors) - 1)]
3184-
ascii_text.append(char, style=f"bold {color}")
3185-
char_index += 1
3186-
3187-
# Show colorful ASCII art in a panel
3162+
# Show ASCII art with gradient in a panel
3163+
ascii_text = create_gradient_text(DSPY_ASCII_ART, gradient_colors)
31883164
ascii_panel = Panel(
3189-
Align.center(ascii_text), border_style="bright_cyan", box=DOUBLE, padding=(1, 4)
3165+
Align.center(ascii_text), border_style="bright_magenta", box=DOUBLE, padding=(1, 4)
31903166
)
31913167
console.print(ascii_panel)
31923168

3193-
# Colorful subtitle (matching original gradient style)
3194-
subtitle = Text()
3195-
subtitle.append("✨ ", style="bright_yellow")
3196-
subtitle.append("Your ", style="white")
3197-
subtitle.append("A", style="bright_cyan")
3198-
subtitle.append("I", style="bright_blue")
3199-
subtitle.append("-", style="white")
3200-
subtitle.append("P", style="bright_magenta")
3201-
subtitle.append("o", style="bright_red")
3202-
subtitle.append("w", style="bright_yellow")
3203-
subtitle.append("e", style="bright_green")
3204-
subtitle.append("r", style="bright_cyan")
3205-
subtitle.append("e", style="bright_blue")
3206-
subtitle.append("d", style="bright_magenta")
3207-
subtitle.append(" DSPy Development ", style="white")
3208-
subtitle.append("A", style="bright_red")
3209-
subtitle.append("s", style="bright_yellow")
3210-
subtitle.append("s", style="bright_green")
3211-
subtitle.append("i", style="bright_cyan")
3212-
subtitle.append("s", style="bright_blue")
3213-
subtitle.append("t", style="bright_magenta")
3214-
subtitle.append("a", style="bright_red")
3215-
subtitle.append("n", style="bright_yellow")
3216-
subtitle.append("t", style="bright_green")
3217-
subtitle.append(": ", style="white")
3218-
subtitle.append("C", style="bright_cyan")
3219-
subtitle.append("l", style="bright_blue")
3220-
subtitle.append("a", style="bright_magenta")
3221-
subtitle.append("u", style="bright_red")
3222-
subtitle.append("d", style="bright_yellow")
3223-
subtitle.append("e", style="bright_green")
3224-
subtitle.append(" ", style="white")
3225-
subtitle.append("C", style="bright_cyan")
3226-
subtitle.append("o", style="bright_blue")
3227-
subtitle.append("d", style="bright_magenta")
3228-
subtitle.append("e", style="bright_red")
3229-
subtitle.append(" ", style="white")
3230-
subtitle.append("f", style="bright_yellow")
3231-
subtitle.append("o", style="bright_green")
3232-
subtitle.append("r", style="bright_cyan")
3233-
subtitle.append(" ", style="white")
3234-
subtitle.append("D", style="bright_blue")
3235-
subtitle.append("S", style="bright_magenta")
3236-
subtitle.append("P", style="bright_red")
3237-
subtitle.append("y", style="bright_yellow")
3238-
subtitle.append(" ✨", style="bright_yellow")
3239-
console.print(Align.center(subtitle))
3169+
# Simple welcome message with purple-pink-orange gradient
3170+
welcome_text = Text()
3171+
welcome_text.append("✨ ", style="bright_magenta")
3172+
welcome_text.append("Welcome to ", style="white")
3173+
welcome_text.append("D", style="magenta")
3174+
welcome_text.append("S", style="bright_magenta")
3175+
welcome_text.append("P", style="red")
3176+
welcome_text.append("y", style="bright_red")
3177+
welcome_text.append(" ", style="white")
3178+
welcome_text.append("C", style="yellow")
3179+
welcome_text.append("o", style="bright_yellow")
3180+
welcome_text.append("d", style="yellow")
3181+
welcome_text.append("e", style="bright_red")
3182+
welcome_text.append(" ✨", style="bright_magenta")
3183+
3184+
console.print(Align.center(welcome_text))
32403185
console.print()
32413186

3242-
# Project Context (if initialized)
3243-
if context and context.is_initialized:
3244-
console.print(
3245-
f"[bold green]📁[/bold green] Project: [bold cyan]{context.name}[/bold cyan] | Use Case: [yellow]{context.use_case}[/yellow]"
3246-
)
3247-
console.print()
3248-
3249-
# Minimal Key Commands
3250-
console.print("[bold yellow]⚡ Get Started:[/bold yellow]")
3251-
console.print()
3252-
console.print(" [cyan]/intro[/cyan] - Complete guide & all features")
3253-
console.print(" [cyan]/init[/cyan] - Initialize your project")
3254-
console.print(" [cyan]/demo[/cyan] - See it in action")
3255-
console.print(" [cyan]/help[/cyan] - View all commands")
3256-
console.print()
3257-
console.print("[dim]💬 Or just describe what you want to build in natural language![/dim]")
3258-
console.print()
3259-
3260-
# Status tip
3261-
if not config_manager.is_project_initialized():
3262-
console.print(
3263-
"[yellow]💡[/yellow] New here? Try [cyan]/demo[/cyan] or [cyan]/init[/cyan] to get started"
3264-
)
3265-
elif not config_manager.config.default_model:
3266-
console.print(
3267-
"[yellow]💡[/yellow] Tip: Connect a model with [cyan]/connect ollama llama3.1:8b[/cyan]"
3268-
)
3187+
# Model info
3188+
model_name = "Not configured"
3189+
if config_manager:
3190+
try:
3191+
config = config_manager.get_config()
3192+
if config and "model" in config:
3193+
model_name = config.get("model", {}).get("name", "Not configured")
3194+
except Exception:
3195+
pass
3196+
3197+
model_info = Text()
3198+
model_info.append("🤖 Model: ", style="dim")
3199+
model_info.append(
3200+
model_name, style="bold green" if model_name != "Not configured" else "bold yellow"
3201+
)
3202+
console.print(Align.center(model_info))
32693203
console.print()
32703204

3271-
# Ready prompt
3272-
ready = Text()
3273-
ready.append("🚀 ", style="bold")
3274-
ready.append("Ready! ", style="bold green")
3275-
ready.append("New here? Try ", style="dim")
3276-
ready.append("/intro", style="bold cyan")
3277-
ready.append(" for the complete guide!", style="dim")
3278-
console.print(ready)
3205+
# Minimal help
3206+
console.print("[dim]Type /help for commands or describe what you want to build[/dim]")
32793207
console.print()
32803208

32813209

0 commit comments

Comments
 (0)