Download the PHP package habr/bblslug without Composer

On this page you can find all versions of the php package habr/bblslug. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bblslug

Bblslug

Bblslug is a versatile translation tool that can be used as both a CLI utility and a PHP library.

It leverages LLM-based APIs to translate plain text, HTML and JSON while preserving structure, code blocks, and URLs via placeholder filters.

APIs supported:

Features

Installation

CLI Usage

Prepare

  1. Always specify a model with --model=vendor:name option.

  2. Export your API key(s) before running:

    NB! Some vendors require additional parameters, e.g. YANDEX_FOLDER_ID.

  3. Input / output:

    • If --source is omitted, Bblslug reads from STDIN.
    • If --translated is omitted, Bblslug writes to STDOUT.
  4. Optional proxy:

    To route requests through a proxy (e.g. HTTP or SOCKS5), use the --proxy option or set the BBLSLUG_PROXY environment variable:

    This works for all HTTP requests and supports authentication (http://user:pass@host:port).

Show available models

Show available prompt templates

Translate an HTML file and write to another file

Translate an JSON file and write to another file

Translate an HTML file and write to another file with filters

Add translation context (prompt), source and target language

Pass model-specific variables

Choose a different prompt template

Dry-run placeholders only

Verbose mode (prints request preview to stderr)

Pipe STDIN → file

Pipe STDIN → STDOUT

Disable validation

For HTML and JSON formats, Bblslug performs basic syntax validation before and after translation. To skip this step, add:

Statistics

PHP Library Usage

You can embed Bblslug in your PHP project.

Quickstart

  1. Install:

  2. Require & Import:

Translate

Text translation function example:

Result structure:

List available models

Returns an array like:

List available prompts

Returns an array like:

Error handling

Samples

You can find sample input files under the samples/ directory.

License

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


All versions of bblslug with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-curl Version *
ext-mbstring Version *
symfony/yaml Version ^7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package habr/bblslug contains the following files

Loading the files please wait ...