ai-deploy-cli
v0.1.1
Published
Command-line client for AI Deploy projects and deployments.
Readme
AI Deploy CLI
ai-deploy is the Node.js command-line client for AI Deploy. It does not upload local source archives. It submits the project key, target, runtime, Yunxiao Codeup repository, Git ref, and root directory to deploy-api; ACK Build Jobs clone Codeup, build artifacts, and start runtime services.
Install
npm install -g ai-deploy-cli
ai-deploy --helpFor local development in this repository:
npm install
npm run build -w ai-deploy-cli
npm link -w ai-deploy-cliAuthentication
Use environment variables for automation. Do not commit passwords to .ai-deploy/project.json.
export AI_DEPLOY_API_URL=http://deploy.cuidmm.cn
export AI_DEPLOY_USERNAME=<admin-or-tenant-user>
export AI_DEPLOY_PASSWORD=<password>Admin users can create projects and manage tenants. Tenant users can only see and operate projects assigned in Dashboard → Tenants. Codeup Git credentials are not tenant credentials; cloud clone credentials stay in ACK Secret ai-deploy-secret as GIT_USERNAME / GIT_PASSWORD.
End-to-End Production Deploy
ai-deploy init \
--api http://deploy.cuidmm.cn \
--name my-next-app \
--framework nextjs \
--build-command "npm run build" \
--output-dir .next \
--root-directory .
git push origin main
ai-deploy deploy --ssr --prod --wait --logs \
--git https://codeup.aliyun.com/<org>/<group>/<repo>.git \
--ref main
ai-deploy inspectCommon Commands
| Command | Purpose |
|---------|---------|
| ai-deploy init | Create or link a project and write .ai-deploy/project.json. |
| ai-deploy deploy --git ... --ref ... | Create a Preview deployment from Codeup Git. |
| ai-deploy deploy --prod --wait --logs --git ... | Create a Production deployment and wait until ready. |
| ai-deploy project | Show local project config and platform Git binding. |
| ai-deploy list / ai-deploy ls | List immutable deployments for the current project. |
| ai-deploy inspect [deploymentId] --logs | Show deployment details and optional logs. |
| ai-deploy logs <deploymentId> --build\|--runtime | Read build/runtime pod logs. |
| ai-deploy rollback [deploymentId] | Repoint production alias to a ready deployment without rebuilding. |
| ai-deploy pause/resume <deploymentId> | Scale non-production dynamic runtime down/up without rebuilding. |
| ai-deploy release/start <deploymentId> | Delete and recreate non-production runtime resources from the original artifact. |
| ai-deploy stop / ai-deploy start | Stop or restore the current production service without rebuilding. |
| ai-deploy env list/add/remove/pull | Manage project env vars and secrets. |
Runtime Recipes
Static:
ai-deploy deploy --wait --logs \
--git https://codeup.aliyun.com/<org>/<group>/<repo>.git \
--ref feature/demoNext.js SSR:
ai-deploy deploy --ssr --prod --wait --logs \
--git https://codeup.aliyun.com/<org>/<group>/<repo>.git \
--ref mainSpring Boot:
ai-deploy deploy --java --prod --wait --logs \
--git https://codeup.aliyun.com/<org>/<group>/<repo>.git \
--ref main \
--root-directory services/apiPython ASGI:
ai-deploy init --framework python \
--build-command "python -m pip install -r requirements.txt -t .python_packages" \
--output-dir . \
--start-command "python -m uvicorn app:app --host 0.0.0.0 --port 3000"
ai-deploy deploy --python --wait --logs \
--git https://codeup.aliyun.com/<org>/<group>/<repo>.git \
--ref mainBuild Mirrors
ACK Build Jobs receive China mirror environment variables from ai-deploy-config:
- npm:
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com - pip:
PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple - Maven:
MAVEN_MIRROR_URL=https://maven.aliyun.com/repository/public
The Java build script writes a Maven settings.xml using MAVEN_MIRROR_URL.
Skill
The matching Agent Skill is maintained in skills/ai-deploy-cli/SKILL.md and is downloadable from:
http://ai-deploy-architecture-site.prod.cuidmm.cn/quickstartUse it when asking an Agent to publish, inspect, roll back, pause/resume/release/start deployments, or troubleshoot AI Deploy.
