Skip to content

Commit 6225282

Browse files
authored
Merge pull request #265 from hud-evals/docs/improve-cursor-quickstart
docs: add Cursor command for environment creation quickstart HUD-575
2 parents a5d1038 + 2b61d56 commit 6225282

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/llm-quickstart.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ icon: "sparkles"
1313
</Card>
1414

1515
<Card title="Cursor" >
16+
**1. Install HUD Docs MCP Server**
17+
1618
Add to MCP settings:
1719
```json
1820
"docs-hud": {
@@ -23,6 +25,14 @@ icon: "sparkles"
2325
Or use one-click install:
2426

2527
[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=docs-hud-so&config=eyJ1cmwiOiJodHRwczovL2RvY3MuaHVkLmFpL21jcCJ9)
28+
29+
---
30+
31+
**2. Create Your First Environment**
32+
33+
Get step-by-step guidance with an interactive Cursor command:
34+
35+
[![Create Environment](https://cursor.com/deeplink/mcp-install-dark.svg)](cursor://anysphere.cursor-deeplink/command?name=create-hud-environment&text=%23+Create+Your+First+HUD+Environment%0A%0ASet+up+everything+from+scratch%3A+prerequisites+and+a+working+environment.%0A%0A%23%23+Important%0A%0A-+Ask+for+confirmation+before+running+install+commands%0A-+Use+%60inference.hud.ai%60+as+the+gateway+%28one+HUD_API_KEY+for+all+models%29%0A-+Run+all+commands+in+the+user%27s+current+directory%0A-+Use+emojis+generously+and+celebrate+success+moments%21%0A-+**EXPLAIN+everything+as+you+go**+-+this+is+a+learning+experience%0A-+**API+key+setup+comes+LAST%2C+right+before+testing**%0A-+**NEVER+ask+user+to+paste+their+API+key+in+chat**%0A%0A%23%23+Instructions%0A%0A%23%23%23+Step+1%3A+Check+and+Install+uv%0A%0AExplain%3A+%60%F0%9F%93%A6+Checking+for+uv...+uv+is+a+modern+Python+package+manager+%28like+pip%2C+but+faster%29.%60%0A%0ACheck%3A+%60uv+--version%60%0A%0AIf+missing%2C+ask+confirmation%3A+%60uv+is+not+installed.+Shall+I+install+it%3F%60%0A%0AInstall%3A+%60curl+-LsSf+https%3A%2F%2Fastral.sh%2Fuv%2Finstall.sh+%7C+sh%60%0A%0AOutput%3A+%60%E2%9C%85+uv+installed+%28vX.X.X%29%60%0A%0A%23%23%23+Step+2%3A+Check+and+Install+hud-python%0A%0AExplain%3A+%60%F0%9F%A4%96+Checking+for+hud-python...+HUD+is+an+SDK+for+building+AI+agent+environments.%60%0A%0ACheck%3A+%60hud+--version%60%0A%0AIf+PermissionError%3A+%60hud-python+is+installed%2C+but+needs+an+API+key.+We%27ll+set+that+up+later+-+for+now%2C+you%27re+good%21+%E2%9C%85%60%0A%0AIf+not+installed%2C+ask+confirmation+then+install%3A+%60uv+tool+install+hud-python+--python+3.12%60%0A%0AOutput%3A+%60%E2%9C%85+hud-python+installed%60%0A%0A%23%23%23+Step+3%3A+Check+Docker+%28warn+only%29%0A%0AExplain%3A+%60%F0%9F%90%B3+Checking+for+Docker...+Optional+for+local+development%2C+but+needed+for+production.%60%0A%0ACheck%3A+%60docker+--version%60%0A%0AOutput%3A+If+found%3A+%60%E2%9C%85+Docker+installed%60+If+missing%3A+%60%E2%9A%A0%EF%B8%8F+Docker+not+found+-+You+can+still+develop+locally%2C+but+you%27ll+need+it+later.%60%0A%0A%23%23%23+Step+4%3A+Initialize+Environment%0A%0AExplain%3A+%60Creating+your+HUD+environment...+hud+init+creates%3A+env.py%2C+Dockerfile.hud%2C+pyproject.toml%60%0A%0ARun%3A+%60hud+init%60%0A%0A%23%23%23+Step+5%3A+Celebrate+and+Explain+What+Was+Created%0A%0AAfter+hud+init%3A+%60%F0%9F%8E%89%F0%9F%8E%89%F0%9F%8E%89+ENVIRONMENT+CREATED%21+%F0%9F%8E%89%F0%9F%8E%89%F0%9F%8E%89%60%0A%0ARead+env.py+and+explain%3A%0A%0A**Environment%3A**+%60%F0%9F%8F%A0+env+%3D+Environment%28%22your_env_name%22%29+creates+environment+container.%60%0A%0A**Tools%3A**+%60%F0%9F%94%A7+%40env.tool%28%29+exposes+functions+to+agents.+Docstring+%3D+tool+description.%60%0A%0A**Scenarios%3A**+%60%F0%9F%8E%AF+%40env.scenario%28%22count%22%29%3A+1%29+PROMPT+%28first+yield%29%2C+2%29+EVALUATION+%28second+yield%29+scores+agent.%60%0A%0A**Test+function%3A**+%60Connects+to+gateway%2C+creates+task%2C+runs+LLM%2C+evaluates.%60%0A%0A%23%23%23+Step+6%3A+Setup+API+Key%0A%0AExplain%3A+%60%F0%9F%94%91+Setting+Up+Your+API+Key+-+HUD+uses+a+single+API+key+for+everything%3A+Claude%2C+GPT-4o%2C+Gemini%2C+Grok%2C+and+more.%60%0A%0AGuide+user+to+get+key+at+hud.ai%2Fproject%2Fapi-keys+and+set+HUD_API_KEY+environment+variable.%0A%0AWait+for+confirmation.%0A%0A%23%23%23+Step+7%3A+Test+the+Environment%0A%0AAfter+confirmation%2C+explain%3A+%60Running+test+-+1%29+Load+environment%2C+2%29+Create+task%2C+3%29+Run+LLM%2C+4%29+Evaluate.%60%0A%0ARun%3A+%60uv+run+env.py%60%0A%0AExplain+the+output+as+it+runs.+If+there+are+variants%2C+explain+what+they+test.%0A%0A%23%23%23+Step+8%3A+Celebrate+Test+Success%21%0A%0A**%F0%9F%8E%8A+CRITICAL%3A+You+MUST+show+this+exact+celebration+if+test+passed%21+%F0%9F%8E%8A**%0A%0A**ONLY+show+if+test+PASSED+successfully%3A**%0A%0A%60%60%60%0A%F0%9F%8E%8A%F0%9F%8E%8A%F0%9F%8E%8A+TEST+PASSED%21+%F0%9F%8E%8A%F0%9F%8E%8A%F0%9F%8E%8A%0A%0A%E2%9C%85+Environment+loaded+successfully%0A%E2%9C%85+Tools+are+callable+by+agents%0A%E2%9C%85+Scenarios+evaluate+correctly%0A%E2%9C%85+Connected+to+inference.hud.ai%0A%0AYou+just+built+your+first+AI+evaluation+environment%21%0A%60%60%60%0A%0AIf+job+URL%3A+%60%F0%9F%93%8A+View+detailed+results%3A+%5Bjob+link%5D%60%0A%0AIf+variants%3A+%60%F0%9F%93%88+With+tools%3A+Agent+used+count_letter%28%29+%E2%86%92+%E2%9C%85+%E2%80%A2+Without+tools%3A+Agent+tried+manually+%E2%86%92+%5Bresult%5D%60%0A%0A%23%23%23+Step+9%3A+Next+Steps+-+HUD+CLI+Workflow%0A%0A**%F0%9F%92%A1+Now+use+the+real+HUD+development+tools%3A**%0A%0A%60%60%60bash%0A%23+Build+Docker+image%0Ahud+build%0A%0A%23+Iterate+with+hot-reload%0Ahud+dev%0A%60%60%60%0A%0A**Your+workflow%3A**+Edit+env.py+%E2%86%92+%60uv+run+env.py%60+%28quick+test%29+%E2%86%92+%60hud+build%60+%E2%86%92+%60hud+dev%60+%28iterate%29%0A%0A%23%23%23+Step+10%3A+Deploy+Your+Environment%0A%0A**%F0%9F%9A%80+When+ready+to+deploy%3A**%0A%0A1.+Go+to+hud.ai+%E2%86%92+New+%E2%86%92+Environment%0A2.+Connect+your+GitHub+repo+and+name+your+environment%0A3.+Push+changes+and+it+rebuilds+automatically+%28like+Vercel%29%0A%0AYour+environment+is+now+live%21+Connect+from+anywhere%3A%0A%0A%60%60%60python%0Aenv.connect_hub%28%22my-env%22%29%0A%60%60%60%0A%0A%23%23%23+Step+11%3A+Connect+Your+Stack%0A%0A**BEFORE+showing+this%2C+verify+test+passed+in+Step+8%21**%0A%0A%60%60%60%0A%F0%9F%94%8C+CONNECT+YOUR+STACK%0A%0A%F0%9F%93%A1+FastAPI%3A+++++++++++env.connect_fastapi%28app%29%0A%F0%9F%93%8B+OpenAPI+Spec%3A++++++env.connect_openapi%28%22https%3A%2F%2Fapi.example.com%2Fopenapi.json%22%29%0A%F0%9F%94%97+Local+Services%3A++++env.connect_url%28%22http%3A%2F%2Flocalhost%3A8080%2Fmcp%22%29%0A%F0%9F%90%B3+Docker+Images%3A+++++env.connect_image%28%22my-mcp-service%3Av1%22%29%0A%F0%9F%8C%90+HUD+Hub%3A+++++++++++env.connect_hub%28%22my-org%2Fmy-env%22%29%0A%0ACompose+multiple+sources%3A%0A+++env+%3D+Environment%28%22my-env%22%29%0A+++env.connect_fastapi%28my_api%29%0A+++env.connect_openapi%28%22https%3A%2F%2F...%22%29%0A+++%23+Agents+see+ALL+tools+as+one+unified+interface%21%0A%0A%F0%9F%8E%89+Congratulations%21+You%27ve+built+your+first+HUD+environment.%0A%0A%F0%9F%93%96+Resources%3A%0A-+https%3A%2F%2Fdocs.hud.so%0A-+https%3A%2F%2Fgithub.com%2Fhud-evals%2Fhud-python%2Ftree%2Fmain%2Fexamples%0A-+https%3A%2F%2Fdiscord.gg%2FwkjtmHYYjm%0A%0AWelcome+to+HUD%21%0A%60%60%60%0A%0A%23%23+Output+Style+Guide%0A%0A-+**EXPLAIN+concepts+as+you+go**%0A-+Make+URLs+clickable%3A+%5Btext%5D%28url%29%0A-+**NEVER+ask+user+to+paste+API+keys+in+chat**%0A-+Be+enthusiastic+and+encouraging%21%0A%0A)
2636
</Card>
2737

2838
<Card title="Full Documentation" href="https://docs.hud.ai/llms-full.txt">

0 commit comments

Comments
 (0)