ludus-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ludus CLI Reference

Ludus CLI 参考文档

Reference for Ludus CLI command syntax, flags, and workflows. Use this when users need to run CLI commands directly or when the Ludus API is unavailable.
本文档是Ludus CLI命令语法、参数及工作流的参考资料。当用户需要直接运行CLI命令或Ludus API不可用时使用。

Key Concepts

核心概念

Command Pattern

命令模式

ludus COMMAND [SUBCOMMAND] [ARGS] [--FLAGS]
ludus COMMAND [SUBCOMMAND] [ARGS] [--FLAGS]

Global Flags (Available on All Commands)

全局参数(所有命令通用)

  • --json
    - Format output as JSON
  • --url string
    - Server URL (default:
    https://198.51.100.1:8080
    )
  • -u, --user string
    - Impersonate user (admin only)
  • -r, --range string
    - Target range ID
  • --proxy string
    - HTTP(S) proxy URL
  • --verbose
    - Verbose output
  • --verify
    - Verify HTTPS certificate
All flags can be set via environment variables:
LUDUS_FLAG_NAME
(uppercase).
  • --json
    - 将输出格式化为JSON
  • --url string
    - 服务器URL(默认值:
    https://198.51.100.1:8080
  • -u, --user string
    - 模拟用户(仅管理员可用)
  • -r, --range string
    - 目标范围ID
  • --proxy string
    - HTTP(S)代理URL
  • --verbose
    - 详细输出
  • --verify
    - 验证HTTPS证书
所有参数均可通过环境变量设置:
LUDUS_FLAG_NAME
(大写)。

Common Workflows

常见工作流

Initial Setup:
bash
ludus apikey                    # Store API key
ludus templates list            # Check available templates
ludus range config get example  # Get example config
Deploy a Range:
bash
ludus range config set -f config.yml  # Set config
ludus range deploy                     # Full deploy
ludus range logs -f                    # Watch progress
ludus range status                     # Check status
Testing Mode:
bash
ludus testing start                      # Snapshot + block internet
ludus testing allow -d example.com       # Allow a domain
ludus testing stop                       # Revert snapshots + restore internet
Template Management:
bash
ludus templates add -d ./my-template   # Add template
ludus templates build                   # Build all unbuilt
ludus templates build -n name1,name2   # Build specific
ludus templates logs -f                 # Watch build progress
初始设置:
bash
ludus apikey                    # 存储API密钥
ludus templates list            # 查看可用模板
ludus range config get example  # 获取示例配置
部署范围:
bash
ludus range config set -f config.yml  # 设置配置
ludus range deploy                     # 完整部署
ludus range logs -f                    # 查看进度
ludus range status                     # 检查状态
测试模式:
bash
ludus testing start                      # 创建快照并阻止网络
ludus testing allow -d example.com       # 允许访问指定域名
ludus testing stop                       # 恢复快照并还原网络
模板管理:
bash
ludus templates add -d ./my-template   # 添加模板
ludus templates build                   # 构建所有未完成的模板
ludus templates build -n name1,name2   # 构建指定模板
ludus templates logs -f                 # 查看构建进度

References

参考资料

  • Use
    references/commands.md
    for the complete command reference with subcommands, flags, and examples.
  • Use
    https://docs.ludus.cloud/docs/cli
    as the authoritative source for CLI behavior and changes.
  • 如需完整的命令参考(包含子命令、参数及示例),请查看
    references/commands.md
  • CLI行为及变更的权威来源为
    https://docs.ludus.cloud/docs/cli