1.1.2 • Published 10 months ago

credit-kapp v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

credit-kapp - Effortless File Attribution Tool āœļø

credit-kapp is a CLI tool designed to automatically add custom copyright and attribution messages to your project's source files. Whether you're managing open-source projects or need to quickly credit your work, credit-kapp simplifies the process by appending customized comments to files in your project.

npm i credit-kapp@latest -g

Features 🌟

  • File Commenting: Automatically add attribution comments to your project's files.
  • Language Support: Supports a variety of programming languages such as JavaScript, Python, TypeScript, HTML, and more.
  • Gitignore Parsing: Automatically ignores files and directories defined in .gitignore.
  • Custom Messages: Easily customize the message to include your name, GitHub handle, and a personal note.
  • Force Mode: Use the --force flag to bypass checks and add comments even if they already exist.
  • Smart Insertion: Detects cases like "use server" and places the comment below, rather than overriding the content.

Getting Started šŸ› ļø

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/kars1996/credit-kapp.git
    cd credit-kapp-cli
  2. Install the required dependencies:

    npm install
  3. Compile the TypeScript code:

    npm run build
  4. Optionally, link the CLI globally (recommended for easier access):

    npm link

Usage

Once installed, you can use credit-kapp to add comments to your project's files:

  1. Start the CLI by running:

    credit-kapp
  2. Follow the prompts to enter your name, GitHub handle, and custom message.

  3. Provide the directory path, and credit-kapp will handle the rest, appending comments to all valid files.

Options

  • --force: Use this flag to bypass checks and add comments even if comments already exist in the files.
    credit-kapp --force

File Structure

credit-kapp-cli/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ utils.ts          # Utility functions for file parsing and operations.
│   ā”œā”€ā”€ ui.ts             # Custom UI elements and interactions.
│   ā”œā”€ā”€ index.ts          # Main CLI logic and user input handling.
│   └── types.ts          # Type definitions used throughout the project.
ā”œā”€ā”€ package.json          # NPM dependencies and scripts.
ā”œā”€ā”€ tsconfig.json         # TypeScript configuration.
└── README.md             # Project documentation (you are here).

Customizing Messages 🧩

credit-kapp allows for customization of the messages added to your files:

  1. In the CLI, follow the prompt to input your custom copyright message.
  2. To further extend credit-kapp, you can modify the logic in src/index.ts to support additional languages or customize the output format.

Made with šŸ’™ by Kars - GitHub

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago