Git Product home page Git Product logo

scafalra's Introduction

Scafalra(sca)

scafalra is a command-line interface tool for manage templates

Installation

Using Cargo

cargo install scafalra

Using binrary releases

Download the latest release binary for your system

Token

Scafalra is based on the GitHub api and doesn't force the need for authentication, but if you need higher rate limiting or want to access to private repositories, consider using PAT(personal access token)

sca token your_token

see more info:

https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens

Usage

scafalra(sca) is a command-line interface tool for manage templates

Usage: sca [OPTIONS] [COMMAND]

Commands:
  list    List all templates
  remove  Remove specified templates [aliases: rm]
  rename  Rename a template [aliases: mv]
  add     Add template from GitHub repository
  create  Copy the template folder to the specified directory
  token   Configure or display your GitHub personal access token
  help    Print this message or the help of the given subcommand(s)

Options:
      --debug          Use debug output
      --token <TOKEN>  Specify the GitHub personal access token
      --proj-dir       Display of scafalra's data storage location
  -i, --interactive    Interactive mode
  -h, --help           Print help
  -V, --version        Print version

Example

Basic

sca add user/repo

# GitHub url
sca add https://github.com/user/repo.git

# subdir
sca add user/repo --subdir /path/to/dir

# branch
sca add user/repo --branch branch

# tag
sca add user/repo --tag tag

# commit
sca add user/repo --commit e763a43519ea4c209df2452c6e2a5b7dffdfdd3d
sca create repo

Interactive

create, remove, rename can be used in interactive mode

? Select a template:
> bar
  baz
[↑↓ to move, enter to select, type to filter]

Sub template

All folders in the .scafalra folder in the template root directory are considered as sub-templates, and you can select some of them to create together when using the create command

if a template foo looks like the following:

.
├── dir
│   └── file.txt
└── .scafalra
    ├── dir-1
    └── dir-2
sca create foo -s dir-1 -s dir-2

The created template is as follows:

.
├── dir
│   └── file.txt
├── dir-1
└── dir-2

Proxy support

# linux/macos
export https_proxy=your_proxy
sca add user/repo

scafalra's People

Contributors

shixinhuang99 avatar sxh99 avatar

Stargazers

Roman avatar Andrew Johnson avatar

Watchers

 avatar  avatar

Forkers

982528494

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.