Download the PHP package knlab/pb-migrate without Composer

On this page you can find all versions of the php package knlab/pb-migrate. 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 pb-migrate

pb-migrate

日本語版 / Japanese

[!WARNING] Pandorabots has shut down its developer hosting platform, so pb-migrate no longer works. In 2026 Pandorabots wound down the hosted bot service and the Developer Portal API (api.pandorabots.com) that pb-migrate drives through pb-php; its website now carries a "Hosting Service Sunset" notice, and pb-php is abandoned as well. pb-migrate is no longer maintained, and 0.8.1 is its final release.

push, pull, diff, talk, and every other command that calls the API now fail with a connection error. Local commands such as add, status, alter:*, and report --since=cache still run, and your AIML files remain plain files that you can load into another AIML interpreter.

To keep running AIML bots, Pandorabots points to open-source AIML interpreters: Program AB (Java, AIML 2.0 reference implementation), Program-Y (Python), aimlinterpreter (Node.js), and community projects such as Program O (PHP) listed under github.com/pandorabots. The AIML specification is at aiml.foundation. Customers who missed the migration window can contact [email protected].

The rest of this README describes the tool as it worked while the service was available.

Command-line tool to manage existing AIML packages on Pandorabots, built on top of spontena/pb-php.

pb-migrate is the OSS rewrite of an in-house deployment CLI. The tool treats your local AIML files as the source of truth, registers existing package directories, and pushes them to Pandorabots' Developer Portal API.

Concepts

Features

Requirements

pb-migrate 0.8 and later require PHP 8.3 or newer. On PHP 8.1 or 8.2, Composer keeps installs on 0.7.5, the last release that supports them. PHP 8.1 no longer receives security fixes and PHP 8.2 reaches end of life on 31 December 2026, so upgrading PHP is recommended.

Installation

Install globally:

Make sure ~/.composer/vendor/bin (or the equivalent for your Composer setup) is on your $PATH.

Or pin it inside a project:

Quickstart

Configuration

pb-migrate.json holds the project structure (no credentials):

The $schema URL points at the published JSON Schema. VS Code, JetBrains IDEs, and most JSON-aware editors pick it up automatically — autocomplete on field names, hovers explaining what each field does, and instant warnings on typos like directry or invalid propertiesUpload values.

Per-bot fields:

Field Required Default Notes
directory yes — Path to the AIML package directory; relative to project root
propertiesUpload no additive full to delete remote properties before re-uploading (strict GitOps)
alters no {} Map of canonical name → override file path (debug-session probes; managed by alter:* commands)

Bot names must be alphanumeric (Pandorabots constraint).

Credentials (.env, tool-managed)

The tool writes a project-local .env (gitignored) using block markers so user-managed lines are preserved:

Variable Purpose
PB_APP_ID Pandorabots application ID (required)
PB_USER_KEY Pandorabots user key (required)
PB_HOST API host. Defaults to https://api.pandorabots.com
PB_BOT_<UPPER_BOTNAME>_KEY Per-bot bot_key for atalk. Only the bots that need anonymous talk have one.

Edit via:

The interactive prompts show the current value; press Enter to keep it, type a new value to update, or type - to clear an optional field.

A note on atalk and bot_keys

atalk (anonymous talk) requires a per-bot bot_key. Pandorabots issues bot_keys through their dashboard UI (developer.pandorabots.com), not through the Developer Portal API.

Heads-up: bots created via the API (pb-migrate bot:create, or anything else hitting PUT /bot/...) do not appear in the dashboard's bot list during the API trial / Developer Portal tier we tested against. There seems to be no API endpoint that returns the bot_key either. The practical consequence: if you want atalk to work, create the bot on the dashboard first and pb-migrate add it locally, rather than using bot:create to spin it up via the API.

talk and debug use the regular user_key authentication and work fine for either path.

Commands

For --bot, a glob pattern (prod.*) is accepted in addition to an exact bot name. --all operates on every registered bot.

--only takes a comma-separated list of file names (greet), kind/name pairs (file/greet, set/colors), or the bare kind for the two kinds that have no name of their own (properties, pdefaults).

Push semantics

push is destructive by default: it rewrites the remote bot to match local. Files that exist on the remote but not locally are deleted. This matches the "local is source of truth" model — what's on disk is what should be on the bot.

To preserve remote-only files (e.g. files added via the Pandorabots dashboard by other team members), pass --keep-remote-only.

Pandorabots-managed files like udc are never deletable (412 from the API); pb-migrate skips them with a warning regardless of mode.

Pull semantics

pull writes remote files into the local directory, but it will not silently discard work you have not pushed yet. For each file it compares the local SHA-256 with the hash recorded in the local cache at the last successful push or pull:

Local file Cache entry Result
hash matches cache yes overwritten (no local edits since last sync)
hash differs from cache yes skipped with a warning — you edited it locally
exists none overwritten (first pull, or a file dropped in manually)
missing — written

Pass --force to overwrite regardless. If you want the remote version but also want to keep your edits, diff --bot mybot first, or commit the local directory before pulling.

Local files may live in subdirectories of the bot directory (ja/greet.aiml); Pandorabots' namespace is flat, so the subdirectory is purely a local convention. pull writes into the existing path when a file with the same kind and name is already present, and only falls back to the directory root for files that do not exist locally yet. The arrow in the output shows where each file landed:

Files the server refuses to serve (HTTP 4xx on system-managed files such as udc) are skipped with the server's message — see Error handling.

Diff and report

diff shows file-level changes only — which files differ, in what category — without inline content diffs:

report produces a richer document suitable for handoff notes / PR descriptions:

Both default to comparing against live remote. Pass --since=cache on report to compare against the local cache instead (no API call) — useful for seeing what changed locally since the last push/pull.

Persistent alters (debug-session probes)

--override is great for one-shot tweaks. For longer investigative sessions where you want a few debug probes (a category that dumps internal predicates, one that simulates state, etc.) to re-apply on every push, register them as persistent alters:

alter:list flags missing override paths with [missing!] so a session in flight is visible at a glance.

⚠️ Persistent alters live in pb-migrate.json, which is typically committed. Run alter:reset before merging your config back into a shared branch — alters are meant to leave no trace once the debug session is over.

Local cache

To avoid re-fetching every remote file on every push / diff, pb-migrate maintains a JSON cache (.pb-migrate-cache.json, gitignored) of the SHA-256 of each file at the time of the last successful push or pull. Pass --verify-remote to bypass the cache when you suspect dashboard edits or cache corruption.

Error handling

API failures surface as Spontena\PbPhp\Exception\ApiException. Since pb-php 2.1.4 its message carries only the HTTP status and the request method/path — never the query string (which holds user_key / botkey) and never the raw response body. pb-migrate re-attaches the server's own explanation (the message field of the JSON error body) wherever an error is shown, so you still see why a call failed:

When the body carries no usable message (empty, non-JSON, or a non-string field), the line is shown without the trailing detail. Transport failures (DNS, timeout, TLS) keep the standard Guzzle exception types with a fixed message and the numeric cURL error code; the original URL-bearing message is intentionally dropped.

Exception messages, stack traces, and the -v / -vvv output never include credentials. If you log exception traces yourself, set zend.exception_ignore_args=On; pb-php also marks its sensitive parameters with #[\SensitiveParameter]. Do not dump whole exception objects or Guzzle request/response accessors — those can still contain the raw query string or conversation text.

Testing the code

The integration suite hits the real Pandorabots API and is not run by default. Provide credentials and select the integration suite explicitly:

CI runs the unit suite on PHP 8.3 / 8.4 / 8.5 / 8.6 — see .github/workflows/ci.yml.

License

MIT — see LICENSE.


All versions of pb-migrate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
spontena/pb-php Version ^2.2
symfony/console Version ^6.4 || ^7.0
symfony/dotenv Version ^6.4 || ^7.0
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 knlab/pb-migrate contains the following files

Loading the files please wait ...