Skip to content

ChipaDevTeam/chipa-touch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chipa-touch

A touch-like CLI that automatically adds copyright comments at the start of each file created, with powerful configuration management.

Features

  • 🎨 Customizable Templates - Use template variables and loops for dynamic headers
  • 📦 Git Integration - Automatically uses repository-level configs
  • 🌍 Global & Local Configs - Project-specific or personal defaults
  • 👥 Team Management - Track multiple authors and contributors
  • ⚙️ CLI Configuration - Manage all settings from the command line
  • 🔧 Flexible - Support for 15+ programming languages out of the box

Quick Start

# Initialize configuration in your git repo
ctouch init

# Configure your details
ctouch config add-field "name" "Your Name" --section owner
ctouch config add-field "license" "MIT"

# Create files with copyright headers
ctouch src/main.rs src/lib.rs

Commands

Core Commands

  • ctouch <paths> - Create files with copyright headers
  • ctouch init [--global] - Initialize configuration file

Configuration Management

  • ctouch config show - Display current configuration
  • ctouch config add-field <key> <value> - Add configuration field
  • ctouch config remove-field <key> - Remove configuration field
  • ctouch config list-fields - List all fields in a section
  • ctouch config add-author <username> - Add team member
  • ctouch config remove-author <index> - Remove team member
  • ctouch config list-authors - List all authors
  • ctouch config set-template <content> - Update template

For complete documentation, see:

Installation

# Build the plugin
cargo build --release

# Register with Nushell
register target/release/chipa-touch.exe

Configuration

Configurations are stored as TOML files:

  • Local: <git-root>/ctouch.toml
  • Global: ~/.config/nushell/ctouch/config.toml

Example Configuration

[config]
template = """
Copyright (c) {current_year} {owner.name}
License: {license}
Team: {{ for author in authors }}@{author.username}{{ endfor }}
"""

[config.owner]
username = "yourusername"
name = "Your Name"

[[authors]]
username = "teammate"
name = "Team Mate"
role = "Developer"

[variables]
license = "MIT"
project = "awesome-project"

Template Variables

Available in templates:

  • {owner.username}, {owner.name} - Owner information
  • {current_year}, {current_date} - Date/time values
  • {ctouch_version} - Tool version
  • Custom variables from [variables] section
  • {authors} - Array of team members

Documentation

License

See LICENSE file for details.

About

A touch like cli that automatically adds copyright comment at the start of each file created.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages