Skip to content

UniverLab/ghscaff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

98 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
          β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 
         β–‘β–‘β–ˆβ–ˆβ–ˆ       β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆ                      β–ˆβ–ˆβ–ˆβ–‘β–‘β–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆβ–‘β–‘β–ˆβ–ˆβ–ˆ
  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–‘β–ˆβ–ˆβ–ˆ    β–‘β–‘β–‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    β–‘β–ˆβ–ˆβ–ˆ β–‘β–‘β–‘   β–‘β–ˆβ–ˆβ–ˆ β–‘β–‘β–‘ 
 β–ˆβ–ˆβ–ˆβ–‘β–‘β–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆβ–‘β–‘β–ˆβ–ˆβ–ˆ β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–‘β–‘β–ˆβ–ˆβ–ˆ β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   
β–‘β–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆ  β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–‘β–ˆβ–ˆβ–ˆ β–‘β–‘β–‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–‘    β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–‘    
β–‘β–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆ    β–‘β–ˆβ–ˆβ–ˆβ–‘β–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–‘β–‘β–ˆβ–ˆβ–ˆ   β–‘β–ˆβ–ˆβ–ˆ       β–‘β–ˆβ–ˆβ–ˆ     
β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    
 β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘ β–‘β–‘β–‘β–‘β–‘  β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   β–‘β–‘β–‘β–‘β–‘β–‘   β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  β–‘β–‘β–‘β–‘β–‘      β–‘β–‘β–‘β–‘β–‘     
 β–ˆβ–ˆβ–ˆ β–‘β–ˆβ–ˆβ–ˆ                                                                
β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                                                                 
 β–‘β–‘β–‘β–‘β–‘β–‘                                                                   

CI Crates.io Status License

Interactive CLI wizard for creating and configuring GitHub repositories. One binary, zero runtime dependencies.


Demo


Features

  • πŸͺ„ Interactive wizard β€” Create GitHub repos with a conversational guided flow
  • ⚑ Zero dependencies β€” Single binary, no runtime requirements
  • πŸ”’ Encrypted vault β€” Tokens stored locally with XSalsa20-Poly1305, never in env vars or plain text
  • πŸ”„ Idempotent apply mode β€” Configure existing repos without recreation
  • πŸ‘₯ Team access control β€” Assign repositories to organization teams with custom permissions (read, triage, write, admin)
  • 🏷️ Enforced labels β€” 7 standard labels synced on every run (non-standard labels are removed)
  • πŸ›‘οΈ Branch protection β€” Enforce reviews, status checks, and workflow validation
  • πŸš€ Language templates β€” Rust (v1), Python/Node.js/Java coming soon
  • πŸ“ Boilerplate files β€” README, Cargo.toml, CI/CD workflows, LICENSE
  • πŸ”‘ Template secrets β€” Automatically configures required GitHub Actions secrets per template
  • ⬆️ Self-update β€” Detects new releases on startup and offers one-command upgrade

Installation

Quick install (recommended)

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/UniverLab/ghscaff/main/scripts/install.sh | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/UniverLab/ghscaff/main/scripts/install.ps1 | iex

This downloads and installs ghscaff. No Rust toolchain required.

You can customize the install:

# Pin a specific version
VERSION=0.1.0 curl -fsSL https://raw.githubusercontent.com/UniverLab/ghscaff/main/scripts/install.sh | sh

# Install to a custom directory
INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/UniverLab/ghscaff/main/scripts/install.sh | sh

Via cargo

cargo install ghscaff

Available on crates.io.

From source

git clone https://github.com/UniverLab/ghscaff.git
cd ghscaff
cargo build --release
# Binary at target/release/ghscaff

GitHub Releases

Check the Releases page for precompiled binaries (Linux x86_64, macOS x86_64/ARM64, Windows x86_64).

Uninstall

rm -f ~/.local/bin/ghscaff         # ghscaff binary
rm -rf ~/.ghscaff/                 # boilerplate cache + encrypted vault

Quick Start

# Interactive wizard β€” create a new repo
# (token is requested on first run and stored in the encrypted vault)
ghscaff

# Or directly with a subcommand
ghscaff new

# Configure an existing repo
ghscaff apply owner/repo

# Preview changes without API calls
ghscaff --dry-run

# Reconfigure credentials
ghscaff config

Authentication

ghscaff resolves the GitHub token in this order:

  1. GITHUB_TOKEN env var β€” for CI/CD and backward compatibility
  2. Encrypted vault (~/.ghscaff/vault.enc) β€” for secure local usage
  3. Interactive prompt β€” on first run, asks for the token and saves it to the vault

Encrypted Vault

Tokens are encrypted with XSalsa20-Poly1305 and a key derived from:

Factor Purpose
Username Only your OS user can decrypt
Hostname Copying the vault to another machine won't work
Binary path Other programs can't derive the same key
Passphrase (optional) Extra protection if desired

The vault file (~/.ghscaff/vault.enc) has 0600 permissions and the directory has 0700. Writes are atomic (temp file + rename) to prevent corruption.

Reconfiguring

ghscaff config

This wipes the vault (with confirmation) and starts fresh β€” new token, optional passphrase. Template secrets will be requested on the next run.

Required token scopes

  • repo β€” Repository access
  • workflow β€” GitHub Actions access
  • read:org β€” (Optional) Organization and team access

Note on team access: If your token lacks the read:org scope, the wizard will skip the team selection step with a warning, but the rest of the repository setup will continue normally.


Wizard Flow

The wizard guides you through 7 interactive steps:

  1. Repository basics β€” Name, description, topics
  2. Visibility & ownership β€” Public/Private, personal or org
  3. Team access (org only) β€” Select teams and assign permissions (pull, triage, push, admin)
  4. Language / template β€” Choose boilerplate (Rust, Python, etc.)
  5. Branches β€” Default branch, develop branch
  6. Features β€” LICENSE, standard labels
  7. Review & confirm β€” Verify all settings before creation

Then automatically:

  • Creates the repository
  • Commits all boilerplate files in a single atomic commit (chore: init repository)
  • Applies branch protection to main (and develop if created)
  • Adds selected teams with their assigned permissions
  • Enforces standard labels (creates missing, updates changed, removes non-standard)
  • Configures required GitHub Actions secrets (from vault, env, or interactive prompt)

Apply Mode

Idempotently configure an existing repository:

ghscaff apply owner/repo

# Auto-detects from git remote if omitted
cd my-existing-project
ghscaff apply

Applies:

  • βœ… Atomic single commit with all boilerplate files (no individual file commits)
  • βœ… Labels enforced (creates missing, updates changed, removes non-standard)
  • βœ… Branch protection on main and develop (if created)
  • βœ… Topics (merges with existing)
  • βœ… GitHub Actions secrets (from vault, env, or interactive prompt)
  • βœ… CI/CD workflows (included in boilerplate)
  • βœ… develop branch (creates if absent)

Safe to run multiple times β€” idempotent operations only.


Dry-Run Mode

Preview changes without making any API calls:

ghscaff --dry-run

# Or with apply mode
ghscaff apply owner/repo --dry-run

Boilerplate Templates

Each language template includes:

  • Dependency manifest β€” Cargo.toml, package.json, etc.
  • Entry point β€” src/main.rs boilerplate
  • README.md β€” Template with placeholders for name and description
  • .gitignore β€” Language-specific (fetched from GitHub API)
  • .github/workflows/ci.yml β€” CI/CD workflow with basic checks
  • .github/workflows/release.yml β€” Release workflow (published on Git tags)
  • LICENSE β€” Placeholder (user selects license type during wizard)

All files are merged into a single atomic chore: init repository commit.


Standard Label Set

7 labels are enforced on every repo. Non-standard labels are removed.

Label Color Description
bug #d73a4a Something isn't working
feature #a2eeef New feature or request
documentation #0075ca Improvements to docs
breaking-change #e4e669 Introduces breaking changes
target:main #1d76db Targets the main branch
target:develop #0e8a16 Targets the develop branch
help wanted #008672 Extra attention needed

Branch Protection

When enabled, applies to the default branch:

  • βœ… Require 1 approval before merging
  • βœ… Require status checks to pass (wired to CI workflow)
  • βœ… Dismiss stale reviews
  • βœ… Disallow force-push

Secrets Configuration

Templates can declare required secrets in secrets.toml. ghscaff resolves them in order:

  1. Encrypted vault β€” previously saved secrets
  2. Environment variable β€” e.g. CARGO_REGISTRY_TOKEN
  3. Interactive prompt β€” with option to save to vault for future use

For the Rust template:

  • CARGO_REGISTRY_TOKEN β€” Required for publishing to crates.io (get one here)

License

MIT β€” see LICENSE for details.


Made with ❀️ by JheisonMB and UniverLab

About

Interactive CLI wizard for creating and configuring GitHub repositories. One binary, zero runtime dependencies.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors