Create New AI Sandbox Project
Create a new project named $ARGUMENTS.name in the ai-sandbox monorepo.
Steps
Validate the project name
- Ensure the name is kebab-case (lowercase with hyphens)
- Check that a project with this name doesn't already exist in
~/Code/ai-sandbox/apps/
Copy the template
cp -r ~/Code/ai-sandbox/apps/_template ~/Code/ai-sandbox/apps/$ARGUMENTS.nameUpdate package.json
- Change the
namefield from_templateto$ARGUMENTS.name
- Change the
Install dependencies
cd ~/Code/ai-sandbox && pnpm installBuild the shared packages (if not already built)
cd ~/Code/ai-sandbox && pnpm build --filter=@ai-sandbox/ai --filter=@ai-sandbox/uiReport success
- Tell the user the project is ready
- Remind them to:
- Copy
.env.exampleto.envand add their API keys - Run
pnpm dev --filter=$ARGUMENTS.nameto start the dev server
- Copy
Notes
- The new project will have access to all shared packages (
@ai-sandbox/ai,@ai-sandbox/ui) - The default page includes a chat interface connected to GPT-4o
- To change the model, edit
src/app/api/chat/route.ts