Skip to content

Commit 10added

Browse files
author
Aegis Stack
committed
Full Aegis CLI Update For Mandarin
1 parent 4dee42a commit 10added

11 files changed

Lines changed: 55 additions & 29 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Each generated project includes:
3232

3333
## Installation
3434

35-
**Current Version**: 0.6.5
35+
**Current Version**: 0.6.6rc1
3636

3737
```bash
3838
pip install aegis-stack

aegis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Aegis Stack CLI - Component generation and project management tools.
33
"""
44

5-
__version__ = "0.6.5"
5+
__version__ = "0.6.6rc1"

aegis/commands/deploy.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ def deploy_init_command(
373373
_save_deploy_config(config)
374374

375375
typer.secho(f"\n{t('deploy.init_saved', file=DEPLOY_CONFIG_FILE)}", fg="green")
376-
typer.echo(f" Host: {host}")
377-
typer.echo(f" User: {user}")
378-
typer.echo(f" Path: {path}")
379-
typer.echo(f" Docker Context: {project_name}-remote")
376+
typer.echo(t("deploy.init_host", host=host))
377+
typer.echo(t("deploy.init_user", user=user))
378+
typer.echo(t("deploy.init_path", path=path))
379+
typer.echo(t("deploy.init_docker_context", context=f"{project_name}-remote"))
380380

381381
# Check if .aegis is in .gitignore
382382
gitignore_path = project_root / ".gitignore"
@@ -488,6 +488,18 @@ def deploy_setup_command(
488488
typer.secho(t("deploy.setup_failed"), fg="red", err=True)
489489
raise typer.Exit(1)
490490

491+
# Verify installation on remote server
492+
deploy_path = config["server"]["path"]
493+
typer.echo("")
494+
typer.echo(t("deploy.setup_verify"))
495+
docker_ver = _run_remote_capture(host, user, "docker --version")
496+
typer.echo(t("deploy.setup_verify_docker", version=docker_ver.stdout.strip()))
497+
compose_ver = _run_remote_capture(host, user, "docker compose version")
498+
typer.echo(t("deploy.setup_verify_compose", version=compose_ver.stdout.strip()))
499+
uv_ver = _run_remote_capture(host, user, "PATH=$HOME/.local/bin:$PATH uv --version")
500+
typer.echo(t("deploy.setup_verify_uv", version=uv_ver.stdout.strip()))
501+
typer.echo(t("deploy.setup_verify_app_dir", path=deploy_path))
502+
491503
typer.secho(f"\n{t('deploy.setup_complete')}", fg="green", bold=True)
492504
typer.echo(t("deploy.setup_next"))
493505

@@ -776,7 +788,10 @@ def deploy_backups_command(
776788
fg="blue",
777789
bold=True,
778790
)
779-
typer.echo(f" {'Timestamp':<24} {'Size':<12} {'Database'}")
791+
ts = t("deploy.col_timestamp")
792+
sz = t("deploy.col_size")
793+
db = t("deploy.col_database")
794+
typer.echo(f" {ts:<24} {sz:<12} {db}")
780795
typer.echo(f" {'─' * 24} {'─' * 12} {'─' * 10}")
781796

782797
for backup_name in backups:

aegis/commands/ingress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,4 @@ def ingress_enable_command(
189189
typer.echo(t("ingress.next_ports"))
190190
if domain:
191191
typer.echo(t("ingress.next_dns", domain=domain))
192-
typer.echo(t("ingress.next_certs", step="3" if not domain else "4"))
192+
typer.echo(t("ingress.next_certs"))

aegis/core/copier_updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def validate_clean_git_tree(project_path: Path) -> tuple[bool, str]:
506506
if result.stdout.strip():
507507
return False, t("update.dirty_tree")
508508

509-
return True, "Git tree is clean"
509+
return True, t("update.git_clean")
510510

511511
except subprocess.CalledProcessError as e:
512512
return False, f"Failed to check git status: {e}"

aegis/i18n/locales/en.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,10 @@
663663
"No deploy configuration found. Run 'aegis deploy-init' first."
664664
),
665665
"deploy.init_saved": ("Deploy configuration saved to {file}"),
666+
"deploy.init_host": " Host: {host}",
667+
"deploy.init_user": " User: {user}",
668+
"deploy.init_path": " Path: {path}",
669+
"deploy.init_docker_context": " Docker Context: {context}",
666670
"deploy.prompt_host": "Server IP or hostname",
667671
"deploy.init_gitignore": (
668672
"Note: Consider adding .aegis/ to .gitignore to avoid committing deploy config"
@@ -681,6 +685,11 @@
681685
"Make sure your project was created with the ingress component."
682686
),
683687
"deploy.setup_complete": "Server setup complete!",
688+
"deploy.setup_verify": "Verifying installation:",
689+
"deploy.setup_verify_docker": " Docker: {version}",
690+
"deploy.setup_verify_compose": " Docker Compose: {version}",
691+
"deploy.setup_verify_uv": " uv: {version}",
692+
"deploy.setup_verify_app_dir": " App Directory: {path}",
684693
"deploy.setup_next": ("Next: Run 'aegis deploy' to deploy your application"),
685694
"deploy.deploying": "Deploying to {host}...",
686695
"deploy.creating_backup": "Creating backup {timestamp}...",
@@ -720,6 +729,9 @@
720729
"deploy.creating_backup_on": "Creating backup on {host}...",
721730
"deploy.no_backups": "No backups found.",
722731
"deploy.backups_header": ("Backups on {host} ({count} total):"),
732+
"deploy.col_timestamp": "Timestamp",
733+
"deploy.col_size": "Size",
734+
"deploy.col_database": "Database",
723735
"deploy.rollback_hint": (
724736
"Rollback with: aegis deploy-rollback --backup <timestamp>"
725737
),

aegis/i18n/locales/zh.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,11 +507,15 @@
507507
# ── deploy 命令 ─────────────────────────────────────────────────────
508508
"deploy.no_config": ("未找到部署配置,请先执行 aegis deploy-init。"),
509509
"deploy.init_saved": "部署配置已保存至 {file}",
510+
"deploy.init_host": " 主机:{host}",
511+
"deploy.init_user": " 用户:{user}",
512+
"deploy.init_path": " 路径:{path}",
513+
"deploy.init_docker_context": " Docker 上下文:{context}",
510514
"deploy.prompt_host": "服务器 IP 或主机名",
511515
"deploy.init_gitignore": (
512516
"提示:建议将 .aegis/ 添加到 .gitignore,避免提交部署配置"
513517
),
514-
"deploy.setup_title": "正在初始化服务器 {target}……",
518+
"deploy.setup_title": "正在初始化服务器{target}……",
515519
"deploy.checking_ssh": "正在检查 SSH 连接……",
516520
"deploy.adding_host_key": "正在添加服务器到 known_hosts……",
517521
"deploy.ssh_keyscan_failed": "SSH 主机密钥扫描失败:{error}",
@@ -523,6 +527,11 @@
523527
"deploy.setup_script_missing": "未找到服务器安装脚本:{path}",
524528
"deploy.setup_script_hint": "请确保项目已添加 ingress 组件。",
525529
"deploy.setup_complete": "服务器初始化完成",
530+
"deploy.setup_verify": "安装验证:",
531+
"deploy.setup_verify_docker": " Docker:{version}",
532+
"deploy.setup_verify_compose": " Docker Compose:{version}",
533+
"deploy.setup_verify_uv": " uv:{version}",
534+
"deploy.setup_verify_app_dir": " 应用目录:{path}",
526535
"deploy.setup_next": "接下来执行 aegis deploy 部署应用",
527536
"deploy.deploying": "正在部署到 {host}……",
528537
"deploy.creating_backup": "正在创建备份 {timestamp}……",
@@ -535,7 +544,7 @@
535544
"deploy.syncing": "正在同步文件到服务器……",
536545
"deploy.mkdir_failed": "创建远程目录「{path}」失败",
537546
"deploy.sync_failed": "文件同步失败",
538-
"deploy.copying_env": "正在将 {file} 复制到服务器(作为 .env)……",
547+
"deploy.copying_env": "正在将 {file} 上传为服务器环境变量文件(.env)……",
539548
"deploy.env_copy_failed": "复制 .env 文件失败",
540549
"deploy.stopping": "正在停止现有服务……",
541550
"deploy.building": "正在构建并启动服务……",
@@ -559,7 +568,10 @@
559568
"deploy.backup_complete": "备份完成",
560569
"deploy.creating_backup_on": "正在 {host} 上创建备份……",
561570
"deploy.no_backups": "未找到备份。",
562-
"deploy.backups_header": "{host} 上的备份(共 {count} 个):",
571+
"deploy.backups_header": "服务器 {host} 的备份列表(共 {count} 个):",
572+
"deploy.col_timestamp": "时间戳",
573+
"deploy.col_size": "大小",
574+
"deploy.col_database": "数据库",
563575
"deploy.rollback_hint": ("回滚命令:aegis deploy-rollback --backup <时间戳>"),
564576
"deploy.no_backups_available": "没有可用的备份。",
565577
"deploy.rolling_back": "正在回滚到备份 {backup}({host})……",
@@ -575,7 +587,7 @@
575587
"deploy.rollback_start_failed": "回滚后启动服务失败",
576588
"deploy.rollback_complete": "回滚完成",
577589
"deploy.rollback_failed_final": "回滚失败!",
578-
"deploy.status_header": "{host} 上的服务状态:",
590+
"deploy.status_header": "服务器 {host} 服务状态:",
579591
"deploy.stop_stopping": "正在停止服务……",
580592
"deploy.stop_success": "服务已停止",
581593
"deploy.stop_failed": "停止服务失败",

aegis/templates/copier-aegis-project/{{ project_slug }}/scripts/server-setup.sh.jinja

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,5 @@ fi
209209
# VERIFICATION
210210
#=============================================================================
211211

212-
echo ""
213-
echo "=== Setup Complete ==="
214-
echo ""
215-
echo "Verifying installation:"
216-
echo " Docker: $(docker --version)"
217-
echo " Docker Compose: $(docker compose version)"
218-
echo " uv: $(uv --version)"
219-
echo " App Directory: $APP_DIR"
220-
echo ""
221-
echo "Next steps:"
222-
echo " 1. On your local machine, run: make deploy-context"
223-
echo " 2. Create .env.deploy with your production settings"
224-
echo " 3. Run: make deploy"
225212
echo ""
226213
{% endif %}

copier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# - Update support
77

88
_min_copier_version: "9.0.0"
9-
_version: "0.6.5"
9+
_version: "0.6.6rc1"
1010

1111
# IMPORTANT: Template content is in subdirectory
1212
# This allows the template to be recognized as git-tracked (aegis-stack repo root has .git)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "aegis-stack"
3-
version = "0.6.5"
3+
version = "0.6.6rc1"
44
description = "A production-ready FastAPI platform with modular components and a built-in control plane. Try: uvx aegis-stack init my-project"
55
readme = "README.md"
66
requires-python = ">=3.11,<3.15"

0 commit comments

Comments
 (0)