lc is a CLI tool designed to count the lines of code in files within directories, providing various options to filter and display the results.
lc can be installed either by cloning the repository and building from source or by downloading a precompiled executable from the release page. Below are the instructions for both methods:
-
Clone the Repository: Clone
lcfrom GitHub to your local machine using the following command:git clone https://github.com/cqb13/line-count.git cd line-count -
Build and Install with Cargo (requires Rust's cargo tool): If you have Rust and Cargo installed, you can directly build and install the application using:
cargo build --release ./target/release/lc install
-
Download the Latest Release: Go to the Releases page of the
lcrepository and download the appropriate executable for your operating system. -
Run Install Command: After downloading, navigate to the download location and run the following command to set up
lc:./lc install
This command will set up
lcon your system, making it ready for use.
After installing lc, you can run lc help to see all available commands and how to use them. Ensure that the installation path of lc is added to your system's PATH, so it can be run from any terminal session.
USAGE:
lc [COMMAND] [OPTIONS]
COMMANDS:
version -v
Displays the current version of github-stats
install -
Installs the files and directories
help -h
Displays the help message
count -
Counts lines within files in a directory
-p --path <PATH> The path to a directory or file to scan
-f --files <FILES> The files to count lines in (rs,py,java,etc...)
-s --single-directory <> Only scans the single directory and wont scan child directories
-d --detailed <> Displays the amount of files of each type and the lines in each file typeContributions are welcome! Feel free to fork this repository and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.