Download the PHP package phattarachai/remote-prompt without Composer

On this page you can find all versions of the php package phattarachai/remote-prompt. 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 remote-prompt

Remote Prompt

Latest Version on Packagist Tests Code Style PHP Version Built on Laravel Prompts Total Downloads

A PHPStorm-style remote host panel for the terminal. Type rh inside a project, pick one of its servers, and open a shell already in the deploy path, browse files, download a backup or upload a file. Connections come from your own ~/.ssh/config, so keys, ssh-agent, jump hosts and ProxyCommand tunnels work as they do for plain ssh. Built on Laravel Prompts, but it is a standalone CLI that works in any project, Laravel or not, from one global install.

Installation

Make sure Composer's global vendor/bin is on your PATH, then run rh --help.

Getting started

Coming from PHPStorm? Import its Deployment servers — one project, or every project under a folder:

Each server's path becomes its root path joined with the mapping's deployment path. Its host is matched to an existing ~/.ssh/config alias by host name, so tunnels and keys you already set up keep working; unknown hosts get a new alias in rh.conf. Then check every connection:

Or add a target by hand inside a project with rh add: pick an ssh alias, then walk the server's folders from /var/www — folders named like the project are starred on top. When the app's files belong to another user (www-data), rh offers it as the target's run_as. Inside a repository the target goes to .rh.json — commit it.

A server you have never connected to: pick New host…. rh writes the alias to ~/.ssh/config.d/rh.conf, tries your key, and when the server refuses it offers ssh-copy-id — you type the server's password once, into ssh.

Scripts and agents add targets without questions:

The name and environment default to what the interactive flow would pick; a folder that doesn't exist on the host is refused unless --force.

Commands

Command
rh One screen, three tabs: Targets (Enter opens that target's shell), Actions (browse, find, download, upload, compare, .env, log — then which target), Setup (test, add, remove, import, config)
rh ssh [target[:path]] Shell on the server, already in the deploy path
rh browse [target[:path]] Walk folders; view, download, edit or compare a file; find any file below
rh get <target:path> [local] Download a file or folder (default: the current folder)
rh put <file> [target[:path]] Upload a file to the path the project maps it to — diffed first
rh cat <target:path> Read a file in the server's pager — .env never touches your disk
rh edit <target:path> Edit in $EDITOR, see the diff, save back in place
rh diff <file> [target] Compare a local file with its deployed copy
rh tail [target[:file]] tail -F the newest storage/logs/*.log
rh artisan [target] <command…> php artisan in the deploy path, as the target's run_as user
rh list [--all] [--json] This project's targets (and where each comes from), or every project
rh add / rh remove / rh config Manage targets, or edit the machine config file
rh doctor [--all] Connect to every target and check its folder; IAP hosts check gcloud login first; prints the ssh config block for an alias this machine lacks

A relative path is relative to the target's deploy path: rh get prod:storage/logs/laravel.log. Any ssh alias works ad hoc with an absolute path: rh get backup-box:/backups/db.sql.gz. An alias that isn't one of the project's targets counts as production, so writes to it ask first.

On production, rh artisan runs read-only commands (about, route:list, migrate:status, schedule:list, queue:failed, horizon:status, model:show, db:show, …) as is; anything else asks first, and is refused without a terminal. With run_as set it runs sudo -u <user> env HOME=/tmp php artisan …, so new log and cache files stay writable for the app (without a terminal sudo -n, which fails at once rather than waiting for a password).

Configuration

.rh.json — the project's targets, committed

At the root of the repository, so every checkout, worktree and machine — and any AI agent working in the project — knows where it is deployed:

host is an alias in ~/.ssh/config, which keeps the connection itself (keys, users, proxies) per machine. Use the same alias names on every machine. hosts is optional: it tells rh doctor how to write the block for an alias a machine doesn't have yet (gcp_iap rides Identity-Aware Proxy with gcloud's key). It holds no secrets.

Inside a repository, rh add writes here (--save=machine keeps a target to this machine instead).

~/.config/rh/config.json — this machine's projects

For folders without a .rh.json, and for targets only you need. A project's .rh.json targets come first; this file's targets for the same folder are added after them, unless the names clash:

env is one of production, uat, qas, staging, dev; a target without one is production. Only production asks before writes. run_as (optional) is the user rh artisan switches to.

Background calls (listing, reading, checks) run ssh in batch mode, so a host that only takes a password works for them only while a rh ssh session's shared connection is open — ssh-copy-id <alias> once fixes that for good.

ผู้พัฒนา

พัฒนาและดูแลโดย บริษัท ภัทรชัย อาร์ทิซาน จำกัด (Phattarachai Artisan) บริษัทที่ปรึกษาและพัฒนาเว็บ ที่เรียนรู้และแบ่งปันกับชุมชน Laravel แพ็กเกจนี้แบ่งปันให้ชุมชนนำไปใช้และต่อยอดได้อย่างอิสระ

ดูแพ็กเกจอื่นของเราได้ที่ phattarachai.dev/open-source และติดต่อเราได้ที่ phattarachai.dev


All versions of remote-prompt with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/prompts Version ^0.3.13
symfony/console Version ^7.0|^8.0
symfony/process Version ^7.0|^8.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 phattarachai/remote-prompt contains the following files

Loading the files please wait ...