#notice #header #license #directory #cli

app add-notice

A cli tool to add notices to files

14 releases

new 0.2.13 Apr 1, 2025
0.2.12 Mar 1, 2025
0.2.11 Feb 1, 2025
0.2.9 Dec 1, 2024
0.2.1 Mar 16, 2024

#438 in Command line utilities

Download history 8/week @ 2024-12-15 1/week @ 2024-12-22 166/week @ 2024-12-29 25/week @ 2025-01-05 6/week @ 2025-01-12 3/week @ 2025-01-19 88/week @ 2025-01-26 66/week @ 2025-02-02 2/week @ 2025-02-09 5/week @ 2025-02-16 114/week @ 2025-02-23 77/week @ 2025-03-02 5/week @ 2025-03-09 1/week @ 2025-03-16 8/week @ 2025-03-23 119/week @ 2025-03-30

136 downloads per month

MPL-2.0 license

33KB
172 lines

add-notice

License Crates.io Minimum Supported Rust Version CI

A cli tool to add headers notices to files

Usage: add-notice [OPTIONS]

Options:
  -n, --notice <NOTICE>
          path to the notice file [default: ./NOTICE]
      --dir <DIR>
          directory to apply the notice [default: .]
  -e, --extensions <EXTENSIONS>
          select files by extension, e.g. rs,js,kt [default: rs]
  -c, --comment-style <COMMENT_STYLE>
          comment style [default: //]
  -r, --remove
          remove notice in files
      --replace-with-string <REPLACE_WITH_STRING>
          replace notice with string
      --replace-with-file <REPLACE_WITH_FILE>
          replace notice with file content
  -h, --help
          Print help
  -V, --version
          Print version

Installation

Cargo install

Compile the crate yourself with:

cargo install add-notice

Cargo binstall

Install a binary version:

cargo binstall add-notice

Purpose

Makes the process of adding header notices to files easier.

Like those requested by licenses such as MPL2.0:

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.

Dependencies

~4–12MB
~137K SLoC