PHPackages                             peekphp/peek - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. peekphp/peek

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

peekphp/peek
============

A package to ask any AI Client to give detailed answer of improvements on PHP files/snippets.

v0.0.1(1y ago)06MITPHPPHP ^8.3.0CI failing

Since Jan 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/peekphp/peek)[ Packagist](https://packagist.org/packages/peekphp/peek)[ RSS](/packages/peekphp-peek/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

Peek
====

[](#peek)

Peek is a lightweight and powerful PHP package that integrates with any AI Client to provide detailed insights, improvements, and optimization suggestions for your PHP files and code snippets.

> **Requires [PHP 8.3+](https://php.net/releases/)**

---

✨ Key Features
--------------

[](#-key-features)

- 🧠 Analyze PHP files or snippets with DeepSeek for actionable improvement suggestions.
- 🔍 Spot inefficiencies, errors, and optimization opportunities in your codebase.
- ⚡ Easily integrate into your existing workflows via a command-line interface.

---

🚀 Installation
--------------

[](#-installation)

Install Peek using [Composer](https://getcomposer.org):

```
composer require peekphp/peek
```

---

⚙️ Usage
--------

[](#️-usage)

### Analyze a PHP File

[](#analyze-a-php-file)

Run the `peek` command to analyze an entire PHP file:

```
vendor/bin/peek peek path/to/your/file.php
```

### Analyze a Code Snippet

[](#analyze-a-code-snippet)

Specify a line range within a file to analyze just a part of your code:

```
vendor/bin/peek peek path/to/your/file.php --lines=10:20
```

### Example Output:

[](#example-output)

```
Analyzing the file: path/to/your/file.php

Suggestions:
1. Add strict types to improve type safety.
2. Replace deprecated function `md5()` with a modern hashing algorithm like `password_hash()`.
3. Optimize nested loops for better performance.
```

---

🔧 Configuration
---------------

[](#-configuration)

To set up Peek in your project, use the `init` command:

```
vendor/bin/peek init
```

This will generate a peek.json configuration file in your project's root directory, allowing you to define client settings such as API key, URL, and model.

Example peek.json:

```
{
    "client": {
        "key": "your-api-key",
        "url": "https://api.example.com",
        "model": "gpt-4"
    }
}
```

---

🤦🏻 Run Tests
------------

[](#-run-tests)

Run the complete test suite using PHPUnit:

```
composer test
```

Peek comes with both unit and integration tests to ensure its reliability.

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Feel free to submit issues or pull requests to help make Peek even better.

### Steps to Contribute:

[](#steps-to-contribute)

1. Fork the repository.
2. Create a feature branch: ```
    git checkout -b feature/your-feature-name
    ```
3. Commit your changes: ```
    git commit -m "Add your feature description"
    ```
4. Push to your branch: ```
    git push origin feature/your-feature-name
    ```
5. Submit a pull request.

We appreciate your contributions! ❤️

---

📚 License
---------

[](#-license)

Peek is open-source software licensed under the [MIT License](LICENSE).

---

Crafted with ❤️ by [Doekos](https://github.com/doekos)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance44

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

473d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcb83de4d2cd1a3c64ba7bb28b283a43c0e40aac5d5751fd7ec2bdbde7f2e5d6?d=identicon)[Doekos](/maintainers/Doekos)

---

Top Contributors

[![Doekos](https://avatars.githubusercontent.com/u/10770165?v=4)](https://github.com/Doekos "Doekos (5 commits)")

---

Tags

phppackageboilerplate

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/peekphp-peek/health.svg)

```
[![Health](https://phpackages.com/badges/peekphp-peek/health.svg)](https://phpackages.com/packages/peekphp-peek)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
