Coder Social home page Coder Social logo

yuki-cli's Introduction

Yuki CLI

Table of Content

Introduction

Yuki(ustcsync) 的命令行客户端.

Tips

未介绍到的功能可以执行 yuki SUBCOMMAND -h 查看.

自动补全

# Zsh:
yuki completion zsh

# Bash:
yuki completion bash

增加新的配置

把以下内容保存为 repo.json :

[
    {
      "name": "brew.git",  // 必需
      "image": "ustcmirror/test:latest",  // 必需
      "interval": "53 * * * *",  // 必需 (crontab)
      "storageDir": "/path/to/dir",  // 必需

      "bindIP": "1.2.3.4",
      "envs": {
        "key": "val",
      },
      "logRotCycle": 10,
      "retry": 3,
      "user": "1002:1002",
      "volumes": {
          "/host/dir": "/container/dir"  // 注意: 受 MongoDB 限制, host dir 路径中不能含有 '.'
      }
    }
]

然后执行 yuki import repo.json.

另外也可以导出现有的配置, 然后再修改:

yuki export --pretty $repo > repo.json
vim repo.json
yuki import repo.json

更新现有的配置

增加/更新某些键值:

yuki repo update archlinux envs.RSYNC_HOST=example.com envs.RSYNC_PATH=mod bindIP=1.2.3.4

删除某些键值:

yuki repo update archlinux envs.RSYNC_EXTRA=

获取同步日志

当前的同步日志:

yuki ct logs <container ID or repo name>

跟踪并从倒数第 5 行开始:

yuki ct logs --tail 5 -f <container ID or repo name>

列出以往的同步日志:

yuki repo logs --stats <repo name>

查看以往倒数第二次同步日志的倒数 10 行:

yuki repo logs -n 1 --tail 10 <repo name>

yuki-cli's People

Contributors

knight42 avatar volltin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.