ardent branch create
Create a branch from the current connector. The new branch becomes your current branch.Example output
Example output
Options
| Option | Description |
|---|---|
-s, --service <type> | Branch service type. The CLI default is postgres; this is separate from the connector type postgresql. Omit it unless Ardent support tells you to use another service type |
--print-url | Print only the branch connection URL. Best for scripts and CI |
--format json | Print a stable JSON object for automation |
--print-url and --format are mutually exclusive.
Use in scripts
--print-url prints nothing, stop the script. A missing database URL is a failed setup, not a value to fall back from.
If branch creation times out, it may still be running server-side. For the same connector, service type, and branch name, re-running the same command continues checking the original request or returns its completed result; it does not start a second branch create. Changing the branch name or service type starts a different create request. You can also run ardent branch list; if the branch already appears there, use that branch instead of creating another name. The timeout error includes an operation ID for support:
Create timeout output
Create timeout output
JSON output
service_type is the Ardent branch service value (postgres). The connection URL still uses the standard PostgreSQL URI scheme, postgresql://.
Connecting to a branch
Use the branch connection URL exactly as Ardent returns it, including?sslmode=require&channel_binding=disable.
require, and do not load a custom root certificate or CA bundle. With no custom root certificate configured, sslmode=require encrypts the connection but does not validate a CA chain. If your client has fields named root certificate, CA bundle, SSL certificate authority, or sslrootcert, leave them blank and clear any source database certificate you previously configured.
Some PostgreSQL clients treat sslmode=require plus a configured root certificate as certificate verification. A source database CA bundle cannot verify an Ardent branch URL and can cause TLS errors such as a secure channel mismatch. Clearing the custom certificate keeps the connection in TLS-required mode.
Keep channel_binding=disable in the URL. Ardent terminates TLS at the routing layer, so clients that force channel binding can reject an otherwise valid branch connection. If your IDE has a channel binding setting, set it to disable or off.
ardent branch list
List branches for the current connector:*. ● means active; ○ means not active. Offline cache output is clearly labeled with ⚠ Offline - showing cached data from ....
Example output
Example output
Branches:
* ● my-feature
postgresql://user:***@my-feature-postgres.routing.tryardent.com:5432/db?sslmode=require&channel_binding=disable
○ staging
postgresql://user:***@staging-postgres.routing.tryardent.com:5432/db?sslmode=require&channel_binding=disable
ardent branch info
Show details and the connection URL for a branch. If you omit the name, Ardent shows the current branch.Example output
Example output
branch create:
ardent branch switch
Switch the current branch for future CLI commands:Example output
Example output
ardent branch delete
Delete a branch when you are done. The CLI queues the delete, polls the operation until it completes, then removes the branch from the local cache:Example output
Example output
Timeout output
Timeout output
ardent branch delete <name> for the same branch is safe: Ardent reuses the active delete operation, and a re-delete after the branch row is already gone polls the prior delete operation instead of starting a second teardown. You can also re-run ardent branch list online to refresh and check the final state.
Branches auto-suspend after a short idle period, so cleanup is not urgent for local development. CI workflows should still delete branches with if: always() or your CI provider’s equivalent so every run cleans up after itself.