Skip to main content

Codetree Cli

Codetree is a Python tool that helps you count the lines of code in your project directory. It supports multiple programming languages and provides a detailed breakdown of the number of lines in your project files. Perfect for analyzing and tracking the size of your codebase in an easy-to-read format.

Features

  • Counts lines of code for a wide variety of programming languages.
  • Skips hidden files and directories (those starting with a .dot).
  • Provides a summary of total lines of code and file count.
  • Supports command-line interface (CLI) for easy integration.

Installation

Using pip

Install Codetree directly from PyPI using pip:

pip install codetree-cli

Manual Installation

To install Codetree manually, clone the repository and use pip:

git clone https://github.com/rezamardaniDev/codetree.git
cd codetree
pip install .

Usage

Use Codetree via the command-line interface (CLI). Run the following command in your terminal:

codetree

This scans the specified directory (or current directory by default) and outputs the number of lines of code in each file, plus a summary of total lines.

Example

$ codetree .
Scanning directory: .
|-- src/
|    └── main.py -> 150 lines of code
|    └── utils.py -> 85 lines of code
|
|-- test/
|    └── test_main.py -> 25 lines of code
|
Total files checked: 3
Total lines of code: 260
Total folders: 2

Options

  • Path: Specify the project directory as an argument. If no path is provided, the current directory (.) is used by default.
codetree /path/to/project

Contributing

We welcome contributions to Codetree! To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-name).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add new feature').
  5. Push to the branch (git push origin feature-name).
  6. Create a new pull request.

If you find a bug or want to add a feature, feel free to open an issue or submit a pull request!

Metadata

Release files for codetree-cli 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codetree-cli 0.2.2
File Size Uploaded
codetree_cli-0.2.2.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codetree-cli 0.2.2
File Interpreter ABI Platform
codetree_cli-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / codetree_cli-0.2.2.tar.gz

Download URL codetree_cli-0.2.2.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
13da7d5f7c01cbd0340479b5c0705cf57ee603c7d9633ab8eade9e8bfdee2a8b
BLAKE2b-256 checksum
How to use checksums
4853fc25bd2e0d87b795b095eb21124ac3e9bf72c6106ef1408c4856ca4691b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / codetree_cli-0.2.2-py3-none-any.whl

Download URL codetree_cli-0.2.2-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1ccdc005a2ec2e2c407eeb9ed1e3c78d0330d842db0f8ee5c4ec3bca882bb24
BLAKE2b-256 checksum
How to use checksums
fba4ec4d7607173da0acf8cfa449472aaa84db07cb47914d7fe98574036ec07f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page