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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a6ae5a881b92d97f571907df6506b212341b0424f2f678fffe7fcf94f46f565
|
|
| MD5 |
27e8edf49c208451b7c006e22106634e
|
|
| BLAKE2b-256 |
4aa2624b978ce04d01b7e5dbed9896688b64a20d567dce2106ae9bc1bf715732
|
File details
Details for the file nexus_open_cli_doctor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nexus_open_cli_doctor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a0b990c7addf8abf27f8c8b49d3310dd137abaa9a558c475a4526021fddd15f
|
|
| MD5 |
84299daa0757397b1a8ec9a1b69e84b8
|
|
| BLAKE2b-256 |
1b25dd071a838d970d8e9d8786ad430ac1a0a4ff8c2b41a0d7bcb98517de60e0
|