How do I type psql or mysql on a server without pasting the password?

Save the password in the Valakes vault and bind it to psql on that host. When you run the command, Valakes answers the password prompt itself.

Last updated

Typing a database password at every prompt is slow, and writing it into the command puts it in the process list of the server, and the server may keep it in its history. Valakes keeps the password in its vault and answers the prompt for you. This guide uses psql. The other built-in tools work the same way. If you look after only a few servers, keeping them in one place without a pile of terminals shows where this fits.

Steps

  1. Type the command as usual

    Write the command in the composer, for example psql -U app -h postgres appdb, and look above the composer before you press Enter. Valakes recognizes the tool and shows a card, "Credentials for this host".

    If no credential is bound to psql on this host, the card says so and offers Add a binding.... It also says that the password is sent as a prompt answer and never placed in the command line. The same works for mysql, mongosh, redis-cli, curl, docker login, sudo, git, ssh and scp.

  2. Bind a saved password to the tool

    Add a binding... opens Settings, Credentials and vault, with a dialog titled "Bind a credential to psql (PostgreSQL client) on" your host. It lists the credentials in the vault, here one password named pg-prod. Choose the one Valakes may use for this tool on this host, or press Add a credential to save a new password first.

    The dialog names the server in your command and says the binding will cover it. After you choose the credential, the next screen of the dialog lets you change that. A binding belongs to one tool on one host.

  3. Decide whether Valakes fills it in on its own

    On that screen a binding has an Auto-fill switch. With it on, Valakes answers the password prompt itself. With it off, a chip under the composer asks "Fill with pg?" and waits for you each time.

    Leave Auto-fill off for a password you want to confirm every time. Agents can use only credentials whose binding has Auto-fill on. Keep your SSH password away from Claude Code shows how an agent uses one.

  4. Run the command

    Type the command again. The pictures come from different test runs, so the names differ. A chip in the composer, "password: pg-test" in the picture, names the credential that will be used, and the card above it lists the binding with "Auto-fill on". Press Enter.

    When psql asks for the password, Valakes checks that the prompt is genuine and sends the value once, from its main process straight to the server connection. The value does not pass through the window, the composer, the command history or any log. Your history keeps {{cred:name}}, never the value.

  5. Use the placeholder when a tool has no prompt

    Some commands take the password on the command line. For docker login --password-stdin, a small helper in your shell reads the value with echo off and hands it to the program.

    As a last resort you can write the placeholder into the command yourself, for example curl -u user:{{cred:http}}. That needs the binding's Allow inline or a confirmation each time. A native dialog warns that the password will appear in the process list on the server and may be kept in its history. It also stays in this terminal's scrollback.

The screenshots show Valakes built from commit 0b8738d, taken on 25 November 2026.

What it does not do

A placeholder works only in a simple command, not in a pipe or a list, and only for the tool and the host it is bound to.

There is one gap that Valakes cannot close. The program that reads the prompt belongs to the server. If it exits in the instant between its prompt and the answer, the answer can land at the shell prompt as typed text and enter the server's shell history. Valakes narrows that window and masks the echo on your screen.

Valakes can only protect values it holds in the vault. A password that sits in a file on the server, or that a program prints, is not protected. If an agent reads that output, Valakes replaces only the saved values it knows. Inline use is only for you, never for an agent. Do not put a password in a broadcast command: each host fills its own prompt, and a password you type yourself goes to every host as typed.

The app is free.

Get notified at launch

macOS is coming to the MacĀ AppĀ Store. iOS and Android later.