id = "pgcli" name = "pgcli" homepage = "https://www.pgcli.com" description = "A postgres client that does auto-completion and syntax highlighting." executables = ["pgcli"] [dotfiles] # https://www.pgcli.com/config and pgcli/config.py `config_location()`: # # if "XDG_CONFIG_HOME" in os.environ: "%s/pgcli/" % ... # elif platform.system() == "Windows": USERPROFILE + "\\AppData\\Local\\dbcli\\pgcli\\" # else: "~/.config/pgcli/" # # with the file itself named `config` in that directory. pgcli's main.py still # carries the migration for the pre-1.0 location: if ~/.pgclirc exists and the # new file does not, it is moved — so both spellings are listed and a consumer # skips whichever is absent. paths = [ "~/.config/pgcli/config", "%LOCALAPPDATA%/dbcli/pgcli/config", "~/.pgclirc", ] # Same `config_location()`: the history file sits beside the config in that # directory. Query history, not configuration. exclude = [ "~/.config/pgcli/history", "%LOCALAPPDATA%/dbcli/pgcli/history", ] # pgcli's default is `keyring = True`, which puts the password in the operating # system's keyring rather than in this file. A DSN written under [alias_dsn] # *can* embed one — the documented shape is # postgresql://[user[:password]@][netloc][:port][/dbname] — but the alias names # are chosen by the user, so a prefix rule has nothing stable to name. That one # is left to the consumer's own content scan. secret = [] # Parsed at startup; each invocation re-reads it. side_effect = false [commands] format = 1 label = "Connect to PostgreSQL" description = "Open pgcli against a database, by name, URL or individual connection options. Passwords are never entered here; pgcli prompts for them." quality = "ai-draft" base = "fig:pgcli" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pgcli.ts" license = "MIT" [[commands.field]] id = "database" label = "Database name or URL" type = "string" position = 0 sources = ["fig"] [[commands.field]] id = "host" label = "Host" type = "string" option = ["--host", "-h"] sources = ["fig"] [[commands.field]] id = "port" label = "Port" type = "integer" option = ["--port", "-p"] sources = ["fig"] [[commands.field]] id = "username" label = "Username" type = "string" option = ["--username", "-U"] sources = ["fig"] [[commands.field]] id = "dbname" label = "Database (option form)" type = "string" option = ["--dbname", "-d"] sources = ["fig"] [[commands.field]] id = "force_password" label = "Force password prompt" type = "boolean" option = ["--password", "-W"] sources = ["fig"] [[commands.field]] id = "no_password" label = "Never prompt for password" type = "boolean" option = ["--no-password", "-w"] sources = ["fig"] [[commands.field]] id = "dsn" label = "DSN alias" type = "string" option = ["--dsn", "-D"] sources = ["fig"] [[commands.field]] id = "list" label = "List databases and exit" type = "boolean" option = ["--list", "-l"] sources = ["fig"] [[commands.field]] id = "less_chatty" label = "Skip intro and goodbye" type = "boolean" option = ["--less-chatty"] sources = ["fig"] [[commands.field]] id = "auto_vertical" label = "Auto vertical output" type = "boolean" option = ["--auto-vertical-output"] sources = ["fig"] [[commands.field]] id = "row_limit" label = "Row limit prompt threshold" type = "integer" option = ["--row-limit"] sources = ["fig"] [[commands.field]] id = "warn" label = "Warn on destructive queries" type = "string" option = ["--warn"] suggestions = [{ value = "all", label = "all" }, { value = "moderate", label = "moderate" }, { value = "off", label = "off" }] sources = ["fig"] [[commands.field]] id = "pgclirc" label = "pgclirc file" type = "path" option = ["--pgclirc"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.task]] id = "url" label = "Connect with URL or name" fields = ["database", "host", "port", "username", "dbname", "force_password", "no_password", "dsn", "list", "less_chatty", "auto_vertical", "row_limit", "warn", "pgclirc"] required = ["database"] [[commands.task]] id = "hostuser" label = "Connect to host" fields = ["host", "port", "username", "dbname", "force_password"] required = ["host"] [[commands.group]] id = "basic" label = "Basic" fields = ["database", "host", "port", "username", "dbname"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["force_password", "no_password", "dsn", "list", "less_chatty", "auto_vertical", "row_limit", "warn", "pgclirc"]