Skip to main content

Project health doctor plugin for nexus-open-cli.

Project description

ncli-open-cli-doctor

Project health doctor plugin for nexus-open-cli.

Overview

ncli-open-cli-doctor is a CLI plugin that performs comprehensive health checks on your project. It analyzes various aspects of your project structure and provides actionable insights to improve project quality.

Features

  • โœ… Git Repository Check: Verifies if the project is initialized with Git
  • ๐Ÿ“„ README Detection: Checks for the presence of README.md
  • ๐Ÿ“œ License Check: Validates LICENSE file existence
  • ๐Ÿšซ .gitignore Validation: Ensures .gitignore file is present
  • ๐Ÿ“ Project Structure Analysis: Evaluates file count and organization
  • ๐Ÿ“ฆ Large File Detection: Identifies files larger than 10MB
  • ๐Ÿ”— Dependency File Check: Detects dependency management files (requirements.txt, pyproject.toml, package.json, pom.xml)
  • ๐Ÿงช Test Coverage: Checks for tests directory

Installation

pip install ncli-open-cli-doctor

Or install from source:

git clone https://github.com/your-repo/ncli-open-cli-doctor.git
cd ncli-open-cli-doctor
pip install -e .

Requirements

  • Python >= 3.10
  • nexus-open-cli
  • typer >= 0.12, < 1.0
  • rich >= 13, < 14
  • babel >= 2.12, < 3.0

Usage

Once installed as a plugin for nexus-open-cli, you can run:

ncli doctor --path /path/to/project

Options

  • --path: Target project path (default: current directory)
  • --verbose: Show detailed report output

Examples

Check the current directory:

ncli doctor

Check a specific project:

ncli doctor --path ./my-project

Show verbose output:

ncli doctor --path ./my-project --verbose

Output

The plugin generates a health report with:

  • Pass/Fail/Warning status for each check
  • Overall health score (out of 100)
  • Top 3 largest files in the project
  • Detailed information in verbose mode

Sample Output

Project Health Report
โœ“ Git repo initialized
โœ“ README.md present
โœ— No LICENSE
โœ“ .gitignore present
โœ“ Project structure reasonable
โœ“ No large files detected
โœ“ Dependency file detected
โœ— No tests folder
Score: 75/100

Top 3 largest files
File                  Size
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
src/main.py          15.2 KB
README.md             5.8 KB
pyproject.toml        1.2 KB

Scoring System

Each rule contributes to the overall score:

Rule Weight Description
Git Repository 20 points Project should be version controlled
README.md 15 points Documentation is essential
LICENSE 10 points Legal clarity for users
.gitignore 10 points Proper git configuration
Project Structure 15 points Reasonable file count (< 1000)
Large Files 10 points No files > 10MB
Dependencies 10 points Dependency management present
Tests 10 points Test suite availability

Development

Setup Development Environment

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .

Running Tests

pytest

Building Package

pip install build
python -m build

Project Structure

ncli-open-cli-doctor/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ ncli_doctor/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ plugin.py
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ .gitignore

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with Typer
  • Rich terminal output powered by Rich
  • Internationalization support via Babel

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexus_open_cli_doctor-0.1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexus_open_cli_doctor-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file nexus_open_cli_doctor-0.1.0.tar.gz.

File metadata

  • Download URL: nexus_open_cli_doctor-0.1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for nexus_open_cli_doctor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7a6ae5a881b92d97f571907df6506b212341b0424f2f678fffe7fcf94f46f565
MD5 27e8edf49c208451b7c006e22106634e
BLAKE2b-256 4aa2624b978ce04d01b7e5dbed9896688b64a20d567dce2106ae9bc1bf715732

See more details on using hashes here.

File details

Details for the file nexus_open_cli_doctor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nexus_open_cli_doctor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a0b990c7addf8abf27f8c8b49d3310dd137abaa9a558c475a4526021fddd15f
MD5 84299daa0757397b1a8ec9a1b69e84b8
BLAKE2b-256 1b25dd071a838d970d8e9d8786ad430ac1a0a4ff8c2b41a0d7bcb98517de60e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page