for item in $(docker exec redis ls /path/uploads); do
docker cp redis:/path/uploads ./uploads
done
效果视频:
https://kr.yetoc.lol/s/w9fB
仓库:
https://github.com/abi/screenshot-to-code
https://kr.yetoc.lol/s/JbCv
gif:
https://kr.yetoc.lol/s/BoSO
https://kr.yetoc.lol/api/v3/share/preview/BoSO
部署方法: 使用poetry包管理工具。
如果用Claude, 添加ANTHROPIC_API_KEY 到 backend/.env 文件中
cd backend
echo "OPENAI_API_KEY=sk-your-key" > .env
poetry install
poetry shell
poetry run uvicorn main:app --reload --port 7001
后端装好后启动前端页面:
cd frontend
yarn
yarn dev
其他Misc:
如果要改端口:
VITE_WS_BACKEND_URL in frontend/.env.local
MOCK=true poetry run uvicorn main:app –reload –port 7001
可以用挡板模式
echo “OPENAI_API_KEY=sk-your-key” > .env
docker-compose up -d –build
可以用docker