nu_plugin_chipa_touch

Crates.ionu_plugin_chipa_touch
lib.rsnu_plugin_chipa_touch
version0.1.0
created_at2025-10-12 08:35:40.92118+00
updated_at2025-10-12 08:35:40.92118+00
descriptionA Nushell plugin for managing file copyright headers using customizable templates.
homepage
repositoryhttps://github.com/ChipaDevTeam/chipa-touch
max_upload_size
id1879063
size245,353
(Rick-29)

documentation

README

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.

Commit count: 0

cargo fmt