You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debian helper that launches Mono CLI assemblies as normal commands
4
4
5
5
# TLDR
6
6
7
-
**Start a local development server** on default port
7
+
Show the wrapper's built-in help (it deliberately ships **no manual page**)
8
8
9
-
```cli-wrapper serve```
9
+
```cli-wrapper --help```
10
10
11
-
**Serve on a specific port**
11
+
Run a **CLI/.NET assembly** through the system's CLI runtime
12
12
13
-
```cli-wrapper serve --port [8080]```
13
+
```cli [path/to/program.exe]```
14
14
15
-
**Serve with a specific document root**
15
+
Show which runtime **/usr/bin/cli** currently resolves to
16
16
17
-
```cli-wrapper serve --docroot [public/]```
17
+
```update-alternatives --display cli```
18
18
19
-
**Run with verbose output**
19
+
Inspect the wrapper itself
20
20
21
-
```cli-wrapper serve -v```
22
-
23
-
**Specify PHP binary** to use
24
-
25
-
```cli-wrapper serve --php [/usr/bin/php8.1]```
21
+
```file $(command -v cli-wrapper)```
26
22
27
23
# SYNOPSIS
28
24
29
-
**cli-wrapper**_command_[_options_]
30
-
31
-
# PARAMETERS
25
+
**cli-wrapper**[_options_]
32
26
33
-
**serve**
34
-
> Start the built-in PHP development server.
35
-
36
-
**--port**_PORT_
37
-
> Port number for the server to listen on (default: 8000).
27
+
# DESCRIPTION
38
28
39
-
**--docroot**_DIR_
40
-
> Document root directory for serving files.
29
+
**cli-wrapper** is a small helper shipped by the Mono runtime packages on Debian and its derivatives. Debian packages containing a CLI (Common Language Infrastructure, i.e. .NET) assembly do not put the `.exe` file in `/usr/bin` directly. They install a launcher that hands the assembly to whichever CLI runtime the system has selected, so a managed program can be invoked like any other native command.
41
30
42
-
**--php**_PATH_
43
-
> Path to the PHP binary to use.
31
+
The runtime is registered with `update-alternatives` under the generic name **cli**. On a typical system this resolves to **mono**, but any conforming runtime can be substituted without touching the packages that depend on it. That indirection is what allows `apt` to install .NET software independently of the runtime actually present.
44
32
45
-
**-v**, **--verbose**
46
-
> Enable verbose output for debugging.
33
+
The wrapper is minimal and is not meant to be run by hand: it exists so that packaging tools and the alternatives system have a stable target to point at.
47
34
48
-
**-h**, **--help**
49
-
> Display help information.
35
+
# CAVEATS
50
36
51
-
# DESCRIPTION
37
+
Debian explicitly marks this command **UNDOCUMENTED**: `man cli-wrapper` only tells you to run it with a help switch and refers you to the Mono documentation. Its behaviour, and even its presence, varies between Mono versions, and it is absent from current `mono-runtime` packages, so it is mostly encountered on older Debian, Ubuntu, and Raspbian installs. Do not script against it; invoke **mono** or the generic **cli** alternative instead.
52
38
53
-
**cli-wrapper** is a command-line utility designed to simplify running PHP's built-in development server with proper configuration. It is commonly used with PHP frameworks and CMSs that require specific server routing rules.
39
+
# HISTORY
54
40
55
-
The tool wraps PHP's built-in server with sensible defaults and additional features for local development environments. It handles routing for applications that use front controllers, manages static file serving, and provides convenient options for common development scenarios.
41
+
The wrapper dates from Debian's CLI policy work in the mid-2000s, when `cli-common` and the Mono packages introduced a runtime-agnostic way to ship .NET assemblies, at a time when Mono, Portable.NET, and other runtimes still competed. Once Mono became the only practical CLI runtime in Debian, the indirection lost most of its purpose and the wrapper was gradually retired.
56
42
57
-
cli-wrapper is particularly useful when working with frameworks that need specific request routing, as it can configure the server to pass all requests through the application's entry point while still serving static assets directly.
The built-in PHP server is intended for development only and should not be used in production environments. It handles requests sequentially, making it unsuitable for high-traffic scenarios.
47
+
# RESOURCES
62
48
63
-
# HISTORY
49
+
```[Source code](https://github.com/mono/mono)```
64
50
65
-
cli-wrapper emerged from the PHP development community's need for simpler local server management. It builds upon PHP's built-in web server, introduced in **PHP 5.4** in **2012**, providing a more user-friendly interface for common development workflows.
> Retrieve the list of read-only replicas for a cluster.
39
+
40
+
**create**_cluster-id__name_
41
+
> Create a read-only replica. Accepts **--region**, **--size**, and **--private-network-uuid**.
42
+
43
+
**get**_cluster-id__name_
44
+
> Retrieve information about a read-only replica.
45
+
46
+
**delete**_cluster-id__name_
47
+
> Delete a read-only replica. **-f**, **--force** skips the confirmation prompt.
48
+
49
+
**connection**_cluster-id__name_
50
+
> Retrieve the connection string, host, port, user, and password for a replica.
51
+
52
+
**promote**_cluster-id__name_
53
+
> Promote a read-only replica to become an independent primary cluster.
54
+
55
+
# OPTIONS
35
56
36
-
**create**
37
-
> Create a read replica.
57
+
**--region**_SLUG_
58
+
> Region to place the replica in, e.g. `nyc1` or `fra1`. Defaults to the primary's region.
38
59
39
-
**get**
40
-
> Get replica details.
60
+
**--size**_SLUG_
61
+
> Machine size for the replica, e.g. `db-s-1vcpu-1gb`.
41
62
42
-
**delete**
43
-
> Delete a replica.
63
+
**--private-network-uuid**_UUID_
64
+
> VPC to attach the replica to.
44
65
45
-
**connection**
46
-
> Get connection details.
66
+
**-o**, **--output**_FORMAT_
67
+
> Output format: `text` (default) or `json`.
47
68
48
-
**promote**
49
-
> Promote to standalone cluster.
69
+
**--format**_FIELDS_
70
+
> Comma-separated list of columns to display.
50
71
51
72
# DESCRIPTION
52
73
@@ -56,6 +77,19 @@ Replicas asynchronously replicate data from the primary cluster, allowing applic
56
77
57
78
In disaster recovery scenarios, replicas can be promoted to standalone clusters, creating an independent database cluster from the replica. This provides failover capabilities and data migration options.
58
79
80
+
# CAVEATS
81
+
82
+
Replication is asynchronous, so a replica can lag behind the primary and serve slightly stale rows. **promote** is irreversible: the replica becomes an independent cluster, stops following the primary, and is billed as a full cluster from then on. Read replicas are not offered for every engine or plan (they are unavailable on the smallest shared-CPU tiers and on some engines), and each replica is billed at the price of its own size.
The command provides full lifecycle management for clusters, from creation and configuration through resizing, migration, and deletion. Managed databases handle backups, minor-version updates, failover, and standby nodes for you; the CLI exposes the same operations available in the control panel, which makes them scriptable and usable from CI.
115
+
116
+
Additional subcommands manage the databases inside a cluster, users, connection pools, read replicas, firewall rules, and the maintenance window. Connection strings, credentials, and the CA certificate can all be retrieved for application integration.
76
117
77
-
The command provides full lifecycle management for database clusters, from creation and configuration to monitoring and deletion. Managed databases handle automated backups, updates, high availability, and scaling. The tool supports various database engines optimized for different use cases, from relational databases to caching and streaming platforms.
118
+
Cluster IDs are UUIDs, but most subcommands also accept the cluster name. Add **-o json** to any command for machine-readable output.
78
119
79
-
Additional subcommands manage database users, connection pools, read replicas, firewall rules, and maintenance windows. Connection strings and credentials can be retrieved for application integration.
120
+
# CAVEATS
121
+
122
+
**delete** destroys the cluster and all of its backups; there is no undo. Managed clusters accept TLS connections only, so clients usually need the certificate from **get-ca**. Resizing is one-way for storage (disks can grow but not shrink) and briefly interrupts connections while nodes are replaced. Not every subcommand applies to every engine: **pool** is PostgreSQL-only, **sql-mode** is MySQL-only, **topics** is Kafka-only, and **indexes** is OpenSearch-only.
0 commit comments