Skip to content

Commit b7f1ead

Browse files
committed
Improve commands
1 parent 1f6707c commit b7f1ead

15 files changed

Lines changed: 804 additions & 332 deletions

assets/commands/cli-wrapper.md

Lines changed: 25 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,55 @@
11
# TAGLINE
22

3-
PHP built-in server wrapper for local development
3+
Debian helper that launches Mono CLI assemblies as normal commands
44

55
# TLDR
66

7-
**Start a local development server** on default port
7+
Show the wrapper's built-in help (it deliberately ships **no manual page**)
88

9-
```cli-wrapper serve```
9+
```cli-wrapper --help```
1010

11-
**Serve on a specific port**
11+
Run a **CLI/.NET assembly** through the system's CLI runtime
1212

13-
```cli-wrapper serve --port [8080]```
13+
```cli [path/to/program.exe]```
1414

15-
**Serve with a specific document root**
15+
Show which runtime **/usr/bin/cli** currently resolves to
1616

17-
```cli-wrapper serve --docroot [public/]```
17+
```update-alternatives --display cli```
1818

19-
**Run with verbose output**
19+
Inspect the wrapper itself
2020

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)```
2622

2723
# SYNOPSIS
2824

29-
**cli-wrapper** _command_ [_options_]
30-
31-
# PARAMETERS
25+
**cli-wrapper** [_options_]
3226

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
3828

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.
4130

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.
4432

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.
4734

48-
**-h**, **--help**
49-
> Display help information.
35+
# CAVEATS
5036

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.
5238

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
5440

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.
5642

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.
43+
# SEE ALSO
5844

59-
# CAVEATS
45+
[mono](/man/mono)(1), [update-alternatives](/man/update-alternatives)(1), [dotnet](/man/dotnet)(1)
6046

61-
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
6248

63-
# HISTORY
49+
```[Source code](https://github.com/mono/mono)```
6450

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.
51+
```[Homepage](https://www.mono-project.com)```
6652

67-
# SEE ALSO
53+
```[Documentation](https://www.mono-project.com/docs/)```
6854

69-
[php](/man/php)(1), [artisan](/man/artisan)(1), [symfony](/man/symfony)(1)
55+
<!-- verified: 2026-07-14 -->

assets/commands/doctl-databases-replica.md

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,66 @@ manage database read replicas
88

99
```doctl databases replica list [cluster_id]```
1010

11-
**Create a read replica**
11+
**Create a read replica** in another region
1212

13-
```doctl databases replica create [cluster_id] [replica_name]```
13+
```doctl databases replica create [cluster_id] [replica_name] --region [fra1] --size [db-s-1vcpu-1gb]```
1414

1515
**Get replica info**
1616

1717
```doctl databases replica get [cluster_id] [replica_name]```
1818

19+
**Retrieve connection details** for a replica
20+
21+
```doctl databases replica connection [cluster_id] [replica_name]```
22+
1923
**Delete a replica**
2024

2125
```doctl databases replica delete [cluster_id] [replica_name]```
2226

23-
**Promote replica to primary**
27+
**Promote a replica** to a standalone primary cluster
2428

2529
```doctl databases replica promote [cluster_id] [replica_name]```
2630

2731
# SYNOPSIS
2832

29-
**doctl** **databases** **replica** _command_ [_options_]
33+
**doctl** **databases** **replica** _command_ _database-cluster-id_ [_replica-name_] [_flags_]
3034

3135
# SUBCOMMANDS
3236

33-
**list**
34-
> List read replicas.
37+
**list** _cluster-id_
38+
> 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
3556

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.
3859
39-
**get**
40-
> Get replica details.
60+
**--size** _SLUG_
61+
> Machine size for the replica, e.g. `db-s-1vcpu-1gb`.
4162
42-
**delete**
43-
> Delete a replica.
63+
**--private-network-uuid** _UUID_
64+
> VPC to attach the replica to.
4465
45-
**connection**
46-
> Get connection details.
66+
**-o**, **--output** _FORMAT_
67+
> Output format: `text` (default) or `json`.
4768
48-
**promote**
49-
> Promote to standalone cluster.
69+
**--format** _FIELDS_
70+
> Comma-separated list of columns to display.
5071
5172
# DESCRIPTION
5273

@@ -56,6 +77,19 @@ Replicas asynchronously replicate data from the primary cluster, allowing applic
5677

5778
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.
5879

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.
83+
5984
# SEE ALSO
6085

61-
[doctl-databases](/man/doctl-databases)(1)
86+
[doctl](/man/doctl)(1), [doctl-databases](/man/doctl-databases)(1), [doctl-databases-user](/man/doctl-databases-user)(1)
87+
88+
# RESOURCES
89+
90+
```[Source code](https://github.com/digitalocean/doctl)```
91+
92+
```[Documentation](https://docs.digitalocean.com/reference/doctl/reference/databases/replica/)```
93+
94+
<!-- verified: 2026-07-14 -->
95+

assets/commands/doctl-databases.md

Lines changed: 76 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,61 +24,112 @@ manage DigitalOcean managed database clusters
2424

2525
```doctl databases connection [cluster_id]```
2626

27-
**Resize cluster**
27+
**Resize cluster** (size and node count)
2828

29-
```doctl databases resize [cluster_id] --size [db-s-2vcpu-4gb]```
29+
```doctl databases resize [cluster_id] --size [db-s-2vcpu-4gb] --num-nodes [2]```
30+
31+
**Download the CA certificate** needed for TLS connections
32+
33+
```doctl databases get-ca [cluster_id]```
3034

3135
# SYNOPSIS
3236

33-
**doctl** **databases** _command_ [_options_]
37+
**doctl** **databases** _command_ [_arguments_] [_flags_]
3438

3539
# SUBCOMMANDS
3640

3741
**list**
38-
> List database clusters.
42+
> List your database clusters.
43+
44+
**create** _name_
45+
> Create a cluster. Requires **--engine** (`pg`, `mysql`, `redis`, `valkey`, `mongodb`, `kafka`, `opensearch`), and accepts **--region**, **--size**, **--num-nodes**, **--version**, and **--private-network-uuid**.
46+
47+
**get** _id_
48+
> Get details for a database cluster.
49+
50+
**delete** _id_
51+
> Delete a cluster. **-f**, **--force** skips the confirmation prompt.
52+
53+
**connection** _id_
54+
> Retrieve connection details (URI, host, port, user, password).
55+
56+
**get-ca** _id_
57+
> Print the CA certificate used to verify TLS connections to the cluster.
58+
59+
**resize** _id_
60+
> Resize a cluster with **--size** and **--num-nodes**.
61+
62+
**migrate** _id_
63+
> Migrate a cluster to a new region.
64+
65+
**fork** _name_
66+
> Create a new cluster by forking an existing one, optionally at a point in time.
3967
40-
**create**
41-
> Create a cluster.
68+
**backups** _id_
69+
> List the cluster's backups.
4270
43-
**get**
44-
> Get cluster details.
71+
**events** _id_
72+
> List cluster events.
4573
46-
**delete**
47-
> Delete a cluster.
74+
**options**
75+
> Show the engines, versions, regions, and sizes available.
4876
49-
**connection**
50-
> Get connection info.
77+
**configuration**
78+
> View or update engine-level cluster configuration.
5179
52-
**resize**
53-
> Resize a cluster.
80+
**maintenance-window**
81+
> Schedule the automatic maintenance window.
5482
55-
**migrate**
56-
> Migrate to new region.
83+
**storage-autoscale**
84+
> Manage automatic storage scaling for the cluster.
85+
86+
**sql-mode**
87+
> Get or set the SQL modes of a MySQL cluster.
5788
5889
**db**
59-
> Manage databases.
90+
> Manage the individual databases inside a cluster.
6091
6192
**user**
62-
> Manage users.
93+
> Manage database users.
6394
6495
**pool**
65-
> Manage connection pools.
96+
> Manage connection pools (PostgreSQL).
6697
6798
**replica**
68-
> Manage read replicas.
99+
> Manage read-only replicas.
69100
70101
**firewalls**
71-
> Manage firewall rules.
102+
> Manage which resources may connect to the cluster.
103+
104+
**indexes**
105+
> Manage indexes on OpenSearch clusters.
106+
107+
**topics**
108+
> Manage topics on Kafka clusters.
72109
73110
# DESCRIPTION
74111

75-
**doctl databases** manages DigitalOcean Managed Databases including PostgreSQL, MySQL, Redis, MongoDB, and Kafka clusters.
112+
**doctl databases** manages DigitalOcean Managed Databases: PostgreSQL, MySQL, Valkey (formerly Redis), MongoDB, Kafka, and OpenSearch clusters.
113+
114+
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.
76117

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.
78119

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.
80123

81124
# SEE ALSO
82125

83-
[doctl](/man/doctl)(1), [doctl-databases-user](/man/doctl-databases-user)(1)
126+
[doctl](/man/doctl)(1), [doctl-databases-user](/man/doctl-databases-user)(1), [doctl-databases-replica](/man/doctl-databases-replica)(1), [psql](/man/psql)(1), [mysql](/man/mysql)(1)
127+
128+
# RESOURCES
129+
130+
```[Source code](https://github.com/digitalocean/doctl)```
131+
132+
```[Documentation](https://docs.digitalocean.com/reference/doctl/reference/databases/)```
133+
134+
<!-- verified: 2026-07-14 -->
84135

0 commit comments

Comments
 (0)