PHPackages                             zero-to-prod/omdb-api-cli - 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. zero-to-prod/omdb-api-cli

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

zero-to-prod/omdb-api-cli
=========================

omdb-api-cli

v1.1.0(1y ago)13341MITPHPPHP &gt;=8.1CI passing

Since Jan 24Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/zero-to-prod/omdb-api-cli)[ Packagist](https://packagist.org/packages/zero-to-prod/omdb-api-cli)[ Docs](https://github.com/zero-to-prod/omdb-api-cli)[ Fund](https://github.com/sponsors/zero-to-prod)[ RSS](/packages/zero-to-prod-omdb-api-cli/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (5)Versions (10)Used By (1)

Zerotoprod\\OmdbApiCli
======================

[](#zerotoprodomdbapicli)

[![](art/logo.png)](art/logo.png)

[![Repo](https://camo.githubusercontent.com/9a90a3efeee26aed7d7f2feee9cd84566a26f9c362cc773b184d076210906e1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746875622d677261793f6c6f676f3d676974687562)](https://github.com/zero-to-prod/omdb-api-cli)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/0a18d2fcf11c42b1bf819a8e149210dfbe80fc1db8673d4fdf139797259c77a1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c692f746573742e796d6c3f6c6162656c3d74657374)](https://github.com/zero-to-prod/omdb-api-cli/actions)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/4322a65c98d7ce50bcc942f617f385520e39eeee0f723e41aed53498584d9401/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c692f6261636b77617264735f636f6d7061746962696c6974792e796d6c3f6c6162656c3d6261636b77617264735f636f6d7061746962696c697479)](https://github.com/zero-to-prod/omdb-api-cli/actions)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/d319b8e95d964e1e3e8a55f649a03e7aefc8544a072c5fe30db7078a38811072/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c692f6275696c645f646f636b65725f696d6167652e796d6c3f6c6162656c3d6275696c645f646f636b65725f696d616765)](https://github.com/zero-to-prod/omdb-api-cli/actions)[![Packagist Downloads](https://camo.githubusercontent.com/7d3b1da7292059dd12ddefb53c6e8ff4d25229926aa3589a9bbee43a16023714/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c693f636f6c6f723d626c7565)](https://packagist.org/packages/zero-to-prod/omdb-api-cli/stats)[![php](https://camo.githubusercontent.com/4b4484853f896fa3461624a9e6d936502f80603d5c4b80b597a4b7535e0b3061/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c692e7376673f636f6c6f723d707572706c65)](https://packagist.org/packages/zero-to-prod/omdb-api-cli/stats)[![Packagist Version](https://camo.githubusercontent.com/94434685df14be5faa14d170187e95e59c9603659ae7edfaea2c2f83f47423c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c693f636f6c6f723d663238643161)](https://packagist.org/packages/zero-to-prod/omdb-api-cli)[![License](https://camo.githubusercontent.com/fb5d1c3cf5c54cd88c630a325071800b429c75d5d95063f868b325cf1fadc4b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c693f636f6c6f723d70696e6b)](https://github.com/zero-to-prod/omdb-api-cli/blob/main/LICENSE.md)[![wakatime](https://camo.githubusercontent.com/c150b595c3defd672527f6c7610f33492940e67b28ad560e67b5bef750c7bc1c/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f6769746875622f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c692e737667)](https://wakatime.com/badge/github/zero-to-prod/omdb-api-cli)[![Hits-of-Code](https://camo.githubusercontent.com/94b0649acb5ac835001e2803e081679881640b63c24d6868b078f59cd5c03765/68747470733a2f2f686974736f66636f64652e636f6d2f6769746875622f7a65726f2d746f2d70726f642f6f6d64622d6170692d636c693f6272616e63683d6d61696e)](https://hitsofcode.com/github/zero-to-prod/omdb-api-cli/view?branch=main)

Contents
--------

[](#contents)

- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
- [Documentation Publishing](#documentation-publishing)
    - [Automatic Documentation Publishing](#automatic-documentation-publishing)
- [Usage](#usage)
    - [Available Commands](#available-commands)
        - [`omdb-api-cli:byIdOrTitle`](#omdb-api-clibyidortitle)
        - [`omdb-api-cli:search`](#omdb-api-clisearch)
        - [`omdb-api-cli:poster`](#omdb-api-cliposter)
        - [`omdb-api-cli:src`](#omdb-api-clisrc)
- [Docker Image](#docker-image)
- [Local Development](./LOCAL_DEVELOPMENT.md)
- [Image Development](./IMAGE_DEVELOPMENT.md)
- [Contributing](#contributing)

Introduction
------------

[](#introduction)

Requirements
------------

[](#requirements)

- PHP 8.1 or higher.

Installation
------------

[](#installation)

Install `Zerotoprod\OmdbApiCli` via [Composer](https://getcomposer.org/):

```
composer require zero-to-prod/omdb-api-cli
```

This will add the package to your project's dependencies and create an autoloader entry for it.

Documentation Publishing
------------------------

[](#documentation-publishing)

You can publish this README to your local documentation directory.

This can be useful for providing documentation for AI agents.

This can be done using the included script:

```
# Publish to default location (./docs/zero-to-prod/omdb-api-cli)
vendor/bin/zero-to-prod-omdb-api-cli

# Publish to custom directory
vendor/bin/zero-to-prod-omdb-api-cli /path/to/your/docs
```

### Automatic Documentation Publishing

[](#automatic-documentation-publishing)

You can automatically publish documentation by adding the following to your `composer.json`:

```
{
    "scripts": {
        "post-install-cmd": [
            "zero-to-prod-omdb-api-cli"
        ],
        "post-update-cmd": [
            "zero-to-prod-omdb-api-cli"
        ]
    }
}
```

Usage
-----

[](#usage)

Run this command to see the available commands:

```
vendor/bin/omdb-api-cli list
```

### Available Commands

[](#available-commands)

This CLI tool provides several commands to interact with the OMDB (Open Movie Database) API. All commands require an API key which you can obtain from .

#### `omdb-api-cli:byIdOrTitle`

[](#omdb-api-clibyidortitle)

Get detailed information about a movie, series, or episode by IMDb ID or title.

**Usage:**

```
vendor/bin/omdb-api-cli omdb-api-cli:byIdOrTitle  [options]
```

**Arguments:**

- `apikey` (required) - Your OMDB API key

**Options:**

- `--title` - The title name to search for
- `--imdbid` - The IMDb ID of the title (e.g., tt0111161)
- `--type` - Filter by type: `movie`, `series`, or `episode`
- `--year` - The release year of the title
- `--full_plot` - Include full plot instead of short plot (flag, no value needed)

**Examples:**

```
# Get movie by title
vendor/bin/omdb-api-cli omdb-api-cli:byIdOrTitle your_api_key --title="The Shawshank Redemption"

# Get movie by IMDb ID
vendor/bin/omdb-api-cli omdb-api-cli:byIdOrTitle your_api_key --imdbid=tt0111161

# Get specific year and type with full plot
vendor/bin/omdb-api-cli omdb-api-cli:byIdOrTitle your_api_key --title="Batman" --year=2008 --type=movie --full_plot
```

**Sample Output:**

```
{
    "Title": "The Shawshank Redemption",
    "Year": "1994",
    "Rated": "R",
    "Released": "14 Oct 1994",
    "Runtime": "142 min",
    "Genre": "Drama",
    "Director": "Frank Darabont",
    "Writer": "Stephen King, Frank Darabont",
    "Actors": "Tim Robbins, Morgan Freeman, Bob Gunton",
    "Plot": "Two imprisoned men bond over a number of years...",
    "Language": "English",
    "Country": "United States",
    "Awards": "Nominated for 7 Oscars",
    "Poster": "https://m.media-amazon.com/images/M/MV5BNDE3ODcxYzMtY2YzZC00NmNlLWJiNDMtZDViZWM2MzIxZDYwXkEyXkFqcGdeQXVyNjAwNDUxODI@._V1_SX300.jpg",
    "imdbRating": "9.3",
    "imdbID": "tt0111161",
    "Type": "movie",
    "Response": "True"
}
```

#### `omdb-api-cli:search`

[](#omdb-api-clisearch)

Search for movies, series, or episodes by title.

**Usage:**

```
vendor/bin/omdb-api-cli omdb-api-cli:search   [options]
```

**Arguments:**

- `apikey` (required) - Your OMDB API key
- `title` (required) - The title to search for

**Options:**

- `--type` - Filter by type: `movie`, `series`, or `episode`
- `--year` - Filter by release year
- `--page` - Page number for paginated results (default: 1)

**Examples:**

```
# Basic search
vendor/bin/omdb-api-cli omdb-api-cli:search your_api_key "Batman"

# Search for movies only from 2008
vendor/bin/omdb-api-cli omdb-api-cli:search your_api_key "Batman" --type=movie --year=2008

# Search with pagination
vendor/bin/omdb-api-cli omdb-api-cli:search your_api_key "Star Wars" --page=2
```

**Sample Output:**

```
{
    "Search": [
        {
            "Title": "Batman Begins",
            "Year": "2005",
            "imdbID": "tt0372784",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BOTY4YjI2N2MtYmFlMC00ZjcyLTg3YjEtMDQyM2ZjYzQ5YWFkXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg"
        },
        {
            "Title": "The Dark Knight",
            "Year": "2008",
            "imdbID": "tt0468569",
            "Type": "movie",
            "Poster": "https://m.media-amazon.com/images/M/MV5BMTMxNTMwODM0NF5BMl5BanBnXkFtZTcwODAyMTk2Mw@@._V1_SX300.jpg"
        }
    ],
    "totalResults": "468",
    "Response": "True"
}
```

#### `omdb-api-cli:poster`

[](#omdb-api-cliposter)

Get the poster URL for a movie or series by IMDb ID.

**Usage:**

```
vendor/bin/omdb-api-cli omdb-api-cli:poster
```

**Arguments:**

- `apikey` (required) - Your OMDB API key
- `imdbid` (required) - The IMDb ID of the title (e.g., tt0111161)

**Example:**

```
# Get poster URL
vendor/bin/omdb-api-cli omdb-api-cli:poster your_api_key tt0111161
```

**Sample Output:**

```
https://m.media-amazon.com/images/M/MV5BNDE3ODcxYzMtY2YzZC00NmNlLWJiNDMtZDViZWM2MzIxZDYwXkEyXkFqcGdeQXVyNjAwNDUxODI@._V1_SX300.jpg

```

#### `omdb-api-cli:src`

[](#omdb-api-clisrc)

Display the project's source repository URL.

**Usage:**

```
vendor/bin/omdb-api-cli omdb-api-cli:src
```

**Arguments:**

- None

**Example:**

```
vendor/bin/omdb-api-cli omdb-api-cli:src
```

**Sample Output:**

```
https://github.com/zero-to-prod/omdb-api-cli

```

Docker Image
------------

[](#docker-image)

You can also run the cli using the [docker image](https://hub.docker.com/repository/docker/davidsmith3/omdb-api-cli/general):

```
docker run --rm davidsmith3/omdb-api-cli
```

Contributing
------------

[](#contributing)

Contributions, issues, and feature requests are welcome! Feel free to check the [issues](https://github.com/zero-to-prod/omdb-api-cli/issues) page if you want to contribute.

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance52

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Every ~0 days

Total

9

Last Release

480d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/502649f05d36c87d494988bd99193a4d908d345335d99c080928a726277371f5?d=identicon)[zero-to-prod](/maintainers/zero-to-prod)

---

Top Contributors

[![zero-to-prod](https://avatars.githubusercontent.com/u/61474950?v=4)](https://github.com/zero-to-prod "zero-to-prod (17 commits)")

---

Tags

zero-to-prodomdb-api-cli

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zero-to-prod-omdb-api-cli/health.svg)

```
[![Health](https://phpackages.com/badges/zero-to-prod-omdb-api-cli/health.svg)](https://phpackages.com/packages/zero-to-prod-omdb-api-cli)
```

###  Alternatives

[zero-to-prod/data-model

Transforms Data into Type-Safe DTOs.

14226.2k32](/packages/zero-to-prod-data-model)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[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)
