Ghost Documentation

The official CLI for Ghost — the first database built for agents. Offers unlimited Postgres databases you can create, fork, and discard freely.

Installation

Multiple installation methods are provided. If you aren't sure, use the first one.

Install Script (macOS/Linux/WSL)

curl -fsSL https://install.ghost.build | sh

Install Script (Windows PowerShell)

irm https://install.ghost.build/install.ps1 | iex

Homebrew (macOS/Linux)

brew install timescale/tap/ghost

Debian/Ubuntu

curl -s https://packagecloud.io/install/repositories/timescale/ghost/script.deb.sh | sudo os=any dist=any bash sudo apt-get install ghost

Red Hat/Fedora

curl -s https://packagecloud.io/install/repositories/timescale/ghost/script.rpm.sh | sudo os=rpm_any dist=rpm_any bash sudo yum install ghost

npm

npm install -g @ghost.build/cli

Quick Start

Get up and running with Ghost in three commands:

ghost init        # Interactively configure Ghost (PATH, login, MCP, completions)
ghost create      # Create a new Postgres database
ghost list        # List all databases
ghost serve       # Open a local web UI for running SQL queries

That gives you a Postgres database ready for CLI and agent workflows.

Commands

Ghost provides a compact CLI for managing databases, MCP integration, and related account configuration. The table below is generated from the command list in README.md.

Command Description
ghost api-key Manage API keys
ghost completion Generate the autocompletion script for the specified shell
ghost config List current configuration
ghost connect Get connection string for a database
ghost create Create a new Postgres database
ghost create-dedicated Create a dedicated database
ghost delete Delete a database
ghost feedback Submit feedback, a bug report, or a support request
ghost fork Fork a database
ghost fork-dedicated Fork a database as dedicated
ghost help Help about any command
ghost id Show the authenticated user or API key
ghost init Interactively configure Ghost
ghost invite Invite a user to the current space
ghost invoice View invoices
ghost list List all databases
ghost logs View logs for a database
ghost login Authenticate with GitHub OAuth
ghost logout Remove stored credentials
ghost mcp Ghost Model Context Protocol (MCP) server
ghost member Manage space members
ghost password Reset the password for a database
ghost serve Launch a local web UI for running SQL queries
ghost pause Pause a running database
ghost payment Manage payment methods
ghost pricing Show compute overage and dedicated database pricing
ghost psql Connect to a database using psql
ghost rename Rename a database
ghost resume Resume a paused database
ghost schema Display database schema information
ghost share Share a database
ghost space Manage spaces
ghost sql Execute SQL query on a database
ghost tutorial Run an interactive Ghost tutorial
ghost usage Show space usage
ghost upgrade Upgrade the ghost CLI to the latest version
ghost version Show version information

CLI Reference

ghost api-key

Manage API keys

Synopsis

Manage API keys for your Ghost space.

API keys can be used to authenticate with Ghost by setting the GHOST_API_KEY environment variable.

Options

  -h, --help   help for api-key

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost api-key create

Create a new API key

Synopsis

Create a new API key for your Ghost space.

The API key is only shown once — make sure to save it. API keys can be used to authenticate with Ghost by setting the GHOST_API_KEY environment variable.

ghost api-key create [flags]
Examples
  # Create an API key with auto-generated name
  ghost api-key create

  # Create an API key with a custom name
  ghost api-key create --name "CI/CD Key"

  # Output as environment variables (useful for .env files)
  ghost api-key create --env > .env

  # Output as JSON
  ghost api-key create --json
Options
      --env           Output as environment variables
  -h, --help          help for create
      --json          Output in JSON format
      --name string   API key name (auto-generated if not provided)
      --yaml          Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost api-key delete

Delete an API key

Synopsis

Delete an API key from your Ghost space.

ghost api-key delete <prefix> [flags]
Examples
  # Delete an API key
  ghost api-key delete gt_abc123

  # Delete without confirmation prompt
  ghost api-key delete gt_abc123 --confirm
Options
      --confirm   Skip confirmation prompt
  -h, --help      help for delete
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost api-key list

List API keys

Synopsis

List all API keys for your Ghost space.

ghost api-key list [flags]
Options
  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost config

List current configuration

Synopsis

Display the current configuration settings

ghost config [flags]

Options

      --env    Apply environment variable overrides
  -h, --help   help for config
      --json   Output in JSON format
      --yaml   Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost config reset

Reset to defaults

Synopsis

Reset all configuration settings to their default values

ghost config reset [flags]
Options
  -h, --help   help for reset
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost config set

Set configuration value

Synopsis

Set a configuration value and save it to ~/.config/ghost/config.yaml

ghost config set <key> <value> [flags]
Options
  -h, --help   help for set
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost config unset

Remove configuration value

Synopsis

Remove a configuration value and save changes to ~/.config/ghost/config.yaml

ghost config unset <key> [flags]
Options
  -h, --help   help for unset
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost connect

Get connection string for a database

Synopsis

Get a PostgreSQL connection string for a database.

Includes the password from ~/.pgpass if available.

ghost connect <name-or-id> [flags]

Examples

  # Get connection string for a database
  ghost connect my-database
  ghost connect a2x6xoj0oz

  # Get a read-only connection string
  ghost connect --read-only my-database

Options

  -h, --help        help for connect
      --read-only   Connect in read-only mode

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost create

Create a new database

Synopsis

Create a new Postgres database.

To create an always-on dedicated database (not subject to space compute or storage limits), use ‘ghost create-dedicated’ instead.

ghost create [name] [flags]

Examples

  # Create a database with auto-generated name
  ghost create

  # Create a database with a custom name
  ghost create myapp

  # Create a database from a share token
  ghost create myapp --from-share <token>

  # Create and output as JSON
  ghost create --json

  # Create and output as YAML
  ghost create --yaml

  # Create and wait for the database to be ready
  ghost create --wait

Options

      --from-share string   Create the database from a share token
  -h, --help                help for create
      --json                Output in JSON format
      --wait                Wait for the database to be ready before returning
      --yaml                Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost create-dedicated

Create a dedicated database

Synopsis

Create a new dedicated database. Dedicated databases are always-on, billed instances that are not subject to space compute or storage limits. A payment method must be on file.

Run ‘ghost pricing’ to see compute and storage pricing.

ghost create-dedicated [name] [flags]

Examples

  # Create a dedicated database (default size: 1x)
  ghost create-dedicated

  # Create with a custom name
  ghost create-dedicated myapp

  # Create with a specific size
  ghost create-dedicated --size 2x

  # Create a dedicated database from a share token
  ghost create-dedicated --from-share <token>

  # Create and output as JSON
  ghost create-dedicated --json

  # Create and wait for the database to be ready
  ghost create-dedicated --size 2x --wait

Options

      --from-share string   Create the database from a share token
  -h, --help                help for create-dedicated
      --json                Output in JSON format
      --size string         Database size (1x, 2x, 4x, 8x) (default "1x")
      --wait                Wait for the database to be ready before returning
      --yaml                Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost delete

Delete a database

Synopsis

Delete a database permanently.

This operation is irreversible. By default, you will be prompted to confirm the deletion, unless you use the --confirm flag.

ghost delete <name-or-id> [flags]

Examples

  # Delete a database (with confirmation prompt)
  ghost delete my-database

  # Delete a database without confirmation prompt
  ghost delete my-database --confirm

Options

      --confirm   Skip confirmation prompt
  -h, --help      help for delete

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost feedback

Submit feedback, a bug report, or a support request

Synopsis

Submit feedback, a bug report, or a support request to the Ghost team.

If no message is provided as an argument, reads from stdin.

ghost feedback [message] [flags]

Examples

  # Submit feedback as an argument
  ghost feedback "I can't connect to my database after resuming it"

  # Submit feedback from stdin
  echo "Great tool!" | ghost feedback

  # Submit feedback interactively
  ghost feedback
  # → Enter your feedback (press Ctrl+D when done):

Options

  -h, --help   help for feedback

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost fork

Fork a database

Synopsis

Fork an existing database to create a new independent copy.

To fork into an always-on dedicated database (not subject to space compute or storage limits), use ‘ghost fork-dedicated’ instead.

ghost fork <name-or-id> [new-name] [flags]

Examples

  # Fork a database with auto-generated name
  ghost fork my-database

  # Fork a database with a custom name
  ghost fork my-database myapp-experiment

  # Fork and output as JSON
  ghost fork my-database --json

  # Fork and output as YAML
  ghost fork my-database --yaml

  # Fork and wait for the database to be ready
  ghost fork my-database --wait

Options

  -h, --help   help for fork
      --json   Output in JSON format
      --wait   Wait for the database to be ready before returning
      --yaml   Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost fork-dedicated

Fork a database as dedicated

Synopsis

Fork an existing database as a new dedicated instance. The fork inherits the source database’s data but runs as an always-on, billed instance. A payment method must be on file.

Run ‘ghost pricing’ to see compute and storage pricing.

ghost fork-dedicated <name-or-id> [new-name] [flags]

Examples

  # Fork as dedicated with default size (1x)
  ghost fork-dedicated my-database

  # Fork with a custom name
  ghost fork-dedicated my-database myapp-dedicated

  # Fork with a specific size
  ghost fork-dedicated my-database --size 4x

  # Fork and output as JSON
  ghost fork-dedicated my-database --json

  # Fork and wait for the database to be ready
  ghost fork-dedicated my-database --size 2x --wait

Options

  -h, --help          help for fork-dedicated
      --json          Output in JSON format
      --size string   Database size (1x, 2x, 4x, 8x) (default "1x")
      --wait          Wait for the database to be ready before returning
      --yaml          Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost id

Show the authenticated user or API key

Synopsis

Show information about the authenticated caller.

The output depends on how you are authenticated: logging in as a user shows your user details, while authenticating with an API key shows details about the key itself, such as its scope and the user who created it.

ghost id [flags]

Examples

  # Show the authenticated identity
  ghost id

  # Output as JSON
  ghost id --json

  # Output as YAML
  ghost id --yaml

Options

  -h, --help   help for id
      --json   Output in JSON format
      --yaml   Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost init

Interactively configure Ghost

Synopsis

Interactively configure Ghost. Walks through adding Ghost to your PATH, login, MCP server installation, and shell completions.

ghost init [flags]

Options

  -h, --help                 help for init
      --skip-if-configured   Exit with a short message if every step is already configured

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost init completions

Install shell completions

Synopsis

Install Ghost shell completions by appending a sourcing line to your shell rc file. This command does not prompt for confirmation, so it can be used from scripts.

ghost init completions [flags]
Options
  -h, --help   help for completions
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost init path

Add Ghost to your PATH

Synopsis

Add Ghost’s install directory to your PATH by appending a snippet to your shell rc file. This command does not prompt for confirmation, so it can be used from scripts.

ghost init path [flags]
Options
  -h, --help   help for path
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invite

Invite a user to the current space

Synopsis

Invite a user to the current space by email address.

The invitee accepts the invitation with their own Ghost account.

Roles: admin Manage databases, members, and billing developer Manage databases only (default) viewer Read-only access

ghost invite <email> [flags]

Examples

  # Invite a user as a developer (the default)
  ghost invite bob@example.com

  # Invite a user as an admin
  ghost invite bob@example.com --role admin

  # List invites you've sent
  ghost invite sent

Options

  -h, --help          help for invite
      --json          Output in JSON format
      --role string   Role to grant the invitee (admin|developer|viewer) (default "developer")
      --yaml          Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invite accept

Accept an invitation

Synopsis

Accept an invitation you’ve received, joining the space.

The space is identified by its ID, as shown by ‘ghost invite received’. After joining, you can switch the CLI’s current space to the new space. By default you’ll be prompted; use --switch or --switch=false to decide without a prompt.

ghost invite accept <space-id> [flags]
Examples
  # Accept an invitation
  ghost invite accept x9y8z7w6v5

  # Accept and immediately switch to the new space
  ghost invite accept x9y8z7w6v5 --switch
Options
  -h, --help     help for accept
      --switch   Switch the current space to the joined space
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invite cancel

Cancel an invite you’ve sent

Synopsis

Cancel the pending invite sent to an email address for the current space.

By default, you will be prompted to confirm, unless you use the --confirm flag.

ghost invite cancel <email> [flags]
Examples
  # Cancel an invite (with confirmation prompt)
  ghost invite cancel bob@example.com

  # Cancel an invite without a confirmation prompt
  ghost invite cancel bob@example.com --confirm
Options
      --confirm   Skip confirmation prompt
  -h, --help      help for cancel
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invite decline

Decline an invitation

Synopsis

Decline an invitation you’ve received.

The space is identified by its ID, as shown by ‘ghost invite received’. By default, you will be prompted to confirm, unless you use the --confirm flag.

ghost invite decline <space-id> [flags]
Examples
  # Decline an invitation (with confirmation prompt)
  ghost invite decline x9y8z7w6v5

  # Decline without a confirmation prompt
  ghost invite decline x9y8z7w6v5 --confirm
Options
      --confirm   Skip confirmation prompt
  -h, --help      help for decline
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invite list

List sent and received invites

Synopsis

List both the invites you’ve sent for the current space and the invitations you’ve received across all spaces.

ghost invite list [flags]
Examples
  # List sent and received invites
  ghost invite list

  # Output as JSON
  ghost invite list --json
Options
  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invite received

List invitations you’ve received

Synopsis

List the pending invitations you’ve received across all spaces.

Accept one with ‘ghost invite accept <space-id>’ or decline it with ‘ghost invite decline <space-id>’.

ghost invite received [flags]
Examples
  # List invitations you've received
  ghost invite received

  # Output as JSON
  ghost invite received --json
Options
  -h, --help   help for received
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invite sent

List invites you’ve sent

Synopsis

List the pending invites you’ve sent for the current space.

ghost invite sent [flags]
Examples
  # List invites you've sent
  ghost invite sent

  # Output as JSON
  ghost invite sent --json
Options
  -h, --help   help for sent
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invoice

View invoices

Synopsis

View invoices for your Ghost space.

Options

  -h, --help   help for invoice

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invoice list

List invoices

Synopsis

List invoices for your Ghost space.

Returns the most recent invoices.

ghost invoice list [flags]
Options
  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost invoice view

View invoice detail

Synopsis

View the line-item breakdown for a single invoice.

The invoice ID is the opaque ID from ‘ghost invoice list’.

ghost invoice view <invoice-id> [flags]
Options
  -h, --help   help for view
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost list

List all databases

Synopsis

List all databases, including each database’s current status, storage usage, and compute hours used in the current billing cycle.

ghost list [flags]

Examples

  # List all databases
  ghost list

  # List as JSON
  ghost list --json

  # List as YAML
  ghost list --yaml

Options

  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost login

Authenticate with GitHub OAuth

Synopsis

Authenticate via GitHub OAuth. Opens your browser to complete authentication.

Use --headless for environments without a browser (Docker containers, SSH sessions, CI/CD, etc.).

ghost login [flags]

Examples

  # Login via browser (default)
  ghost login

  # Login from a headless environment (Docker, SSH, CI/CD)
  ghost login --headless

Options

      --headless   Use device authorization flow (for environments without a browser)
  -h, --help       help for login

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost logout

Remove stored credentials

Synopsis

Remove stored API key and clear authentication credentials.

ghost logout [flags]

Options

  -h, --help   help for logout

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost logs

View logs for a database

Synopsis

View logs for a database.

Fetches and displays logs from the specified database. By default, shows the last 500 log entries. Log lines are displayed in chronological order with the most recent entries at the bottom.

ghost logs <name-or-id> [flags]

Examples

  # View last 500 logs
  ghost logs my-database

  # View last 50 lines
  ghost logs my-database --tail 50

  # View logs before a specific time
  ghost logs my-database --until 2024-01-15T10:00:00Z

  # View logs as JSON
  ghost logs my-database --json

Options

  -h, --help         help for logs
      --json         Output in JSON format
      --tail int     Number of log lines to show (default 500)
      --until time   Fetch logs before this timestamp (RFC3339 format, e.g. 2024-01-15T10:00:00Z)
      --yaml         Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost mcp

Ghost Model Context Protocol (MCP) server

Synopsis

Ghost Model Context Protocol (MCP) server for AI assistant integration.

Exposes Ghost CLI functionality as MCP tools for Claude and other AI assistants.

Options

  -h, --help   help for mcp

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost mcp get

Get detailed information about a specific MCP capability

Synopsis

Get detailed information about a specific MCP tool, prompt, resource, or resource template.

ghost mcp get <name> [flags]
Examples
  # Get details about a tool
  ghost mcp get ghost_create

  # Get details about a prompt
  ghost mcp get setup-timescaledb-hypertables

  # Get details as JSON
  ghost mcp get ghost_create --json

  # Get details as YAML
  ghost mcp get ghost_create --yaml
Options
  -h, --help   help for get
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost mcp install

Install and configure Ghost MCP server for a client

Synopsis

Install and configure the Ghost MCP server for a specific MCP client or AI assistant.

This command automates the configuration process by modifying the appropriate configuration files for the specified client.

Supported Clients: claude-code Configure for Claude Code codex Configure for Codex cursor Configure for Cursor gemini Configure for Gemini CLI antigravity Configure for Google Antigravity kiro-cli Configure for Kiro CLI vscode Configure for VS Code windsurf Configure for Windsurf

The command will:

  • Automatically detect the appropriate configuration file location
  • Create the configuration directory if it doesn’t exist
  • Create a backup of existing configuration by default
  • Merge with existing MCP server configurations (doesn’t overwrite other servers)
  • Validate the configuration after installation

Pass “all” to configure every supported client. If no client is specified, you’ll be prompted to pick one or more clients interactively.

ghost mcp install [client] [flags]
Examples
  # Interactive client selection (multi-select)
  ghost mcp install

  # Install for Claude Code (User scope - available in all projects)
  ghost mcp install claude-code

  # Install for Cursor IDE
  ghost mcp install cursor

  # Install for all supported clients
  ghost mcp install all

  # Install without creating backup
  ghost mcp install claude-code --no-backup
Options
  -h, --help        help for install
      --json        Output in JSON format
      --no-backup   Skip creating backup of existing configuration (default: create backup)
      --yaml        Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost mcp list

List available MCP tools, prompts, and resources

Synopsis

List all MCP tools, prompts, and resources exposed via the Ghost MCP server.

The output can be formatted as a table, JSON, or YAML.

ghost mcp list [flags]
Examples
  # List all capabilities in table format (default)
  ghost mcp list

  # List as JSON
  ghost mcp list --json

  # List as YAML
  ghost mcp list --yaml
Options
  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost mcp start

Start the Ghost MCP server

Synopsis

Start the Ghost MCP server. Uses stdio transport by default.

ghost mcp start [flags]
Examples
  # Start with stdio transport (default)
  ghost mcp start

  # Start with stdio transport (explicit)
  ghost mcp start stdio

  # Start with HTTP transport
  ghost mcp start http
Options
  -h, --help   help for start
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)
ghost mcp start http

Start MCP server with HTTP transport

Synopsis

Start the MCP server using the Streamable HTTP transport.

ghost mcp start http [flags]
Examples
  # Start HTTP server on default port 8080
  ghost mcp start http

  # Start HTTP server on custom port
  ghost mcp start http --port 3001

  # Start HTTP server on all interfaces
  ghost mcp start http --host 0.0.0.0 --port 8080

  # Start server and bind to specific interface
  ghost mcp start http --host 192.168.1.100 --port 9000
Options
  -h, --help          help for http
      --host string   Host to bind to (default "localhost")
      --port int      Port to run HTTP server on (default 8080)
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)
ghost mcp start stdio

Start MCP server with stdio transport

Synopsis

Start the MCP server using standard input/output transport.

ghost mcp start stdio [flags]
Examples
  # Start with stdio transport
  ghost mcp start stdio
Options
  -h, --help   help for stdio
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost mcp status

Show Ghost MCP configuration status for supported clients

Synopsis

Show whether the Ghost MCP server is configured for supported MCP clients.

The command checks the selected client, or all supported clients when no client is specified. A configured client must have a Ghost MCP server entry named “ghost” that runs “ghost mcp start”.

ghost mcp status [client] [flags]
Examples
  # Check all supported clients
  ghost mcp status

  # Check Cursor only
  ghost mcp status cursor

  # Output as JSON
  ghost mcp status --json
Options
  -h, --help   help for status
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost mcp uninstall

Uninstall Ghost MCP server configuration from a client

Synopsis

Uninstall the Ghost MCP server configuration from a supported MCP client.

Pass “all” to uninstall from all supported clients. If no client is specified, you’ll be prompted to select one or more interactively. Only the Ghost MCP server entry named “ghost” is removed; other MCP server entries are left untouched.

ghost mcp uninstall [client] [flags]
Examples
  # Interactive client selection (multi-select)
  ghost mcp uninstall

  # Uninstall from Cursor
  ghost mcp uninstall cursor

  # Uninstall from all supported clients
  ghost mcp uninstall all

  # Skip backups when modifying config files
  ghost mcp uninstall cursor --no-backup
Options
  -h, --help        help for uninstall
      --json        Output in JSON format
      --no-backup   Skip creating backup of existing configuration files (default: create backup)
      --yaml        Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost member

Manage space members

Synopsis

Manage the members of the current space.

Use ‘ghost member list’ to see the members of the current space, ‘ghost member role’ to change a member’s role, and ‘ghost member remove’ to remove a member from the space.

Options

  -h, --help   help for member

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost member list

List space members

Synopsis

List the members of the current space.

ghost member list [flags]
Examples
  # List the members of the current space
  ghost member list

  # Output as JSON
  ghost member list --json
Options
  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost member remove

Remove a member from the current space

Synopsis

Remove a member from the current space.

The space owner cannot be removed. By default, you will be prompted to confirm the removal, unless you use the --confirm flag.

ghost member remove <email> [flags]
Examples
  # Remove a member (with confirmation prompt)
  ghost member remove bob@example.com

  # Remove a member without confirmation prompt
  ghost member remove bob@example.com --confirm
Options
      --confirm   Skip confirmation prompt
  -h, --help      help for remove
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost member role

Change a member’s role

Synopsis

Change a member’s role in the current space.

Roles: admin Manage databases, members, and billing developer Manage databases only viewer Read-only access

The owner role cannot be granted; every space has exactly one owner, and the owner’s role cannot be changed.

ghost member role <email> <admin|developer|viewer> [flags]
Examples
  # Make a member an admin
  ghost member role bob@example.com admin

  # Restrict a member to read-only access
  ghost member role bob@example.com viewer
Options
  -h, --help   help for role
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost overages

Manage compute overages

Synopsis

Manage compute overage billing for your Ghost space.

By default, each space gets an included free compute allowance each calendar month; when it is used up, all standard databases in the space are auto-paused until the next month. Enabling overages lets you pay for compute beyond the free allowance, optionally capped at a monthly compute-hour limit you choose.

Run ‘ghost pricing’ to see the included free allowance and the per-hour overage rate.

Options

  -h, --help   help for overages

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost overages disable

Disable compute overages

Synopsis

Disable compute overage billing for your Ghost space.

After disabling, the compute limit resets to the included free allowance. If your current month-to-date usage is already above that, your non-dedicated databases will be paused.

ghost overages disable [flags]
Examples
  # Disable overages (prompts for confirmation)
  ghost overages disable

  # Disable without confirmation prompt
  ghost overages disable --confirm
Options
      --confirm   Skip confirmation prompt
  -h, --help      help for disable
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost overages enable

Enable compute overages

Synopsis

Enable compute overage billing for your Ghost space.

Once enabled, you will be charged for compute beyond the included free allowance each calendar month (see ‘ghost pricing’). By default there is no monthly cap on overage usage — pass --limit <hours> to set one. When the cap is reached, standard databases in the space auto-pause until the next month.

A payment method must be on file before overages can be enabled. Run ‘ghost payment add’ to add one.

This command is also used to update an existing overages-enabled space: re-run it with a different --limit value (or with no flag, to switch to no-limit mode).

ghost overages enable [flags]
Examples
  # Enable overages with a 200-hour monthly cap
  ghost overages enable --limit 200

  # Enable overages with no monthly cap (charges have no upper bound)
  ghost overages enable

  # Skip the no-limit confirmation prompt
  ghost overages enable --confirm
Options
      --confirm     Skip the no-limit confirmation prompt
  -h, --help        help for enable
      --limit int   Monthly compute cap in hours (must exceed the included free allowance). Omit for no cap.
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost password

Reset the password for a database

Synopsis

Reset the password for the default database user.

This changes the password on the server itself. This operation is irreversible. Existing connections using the old password will fail to reconnect.

The new password can be provided as a positional argument, entered interactively, or automatically generated using the --generate flag.

The password will be saved to your ~/.pgpass file for use with psql and other PostgreSQL tools.

ghost password <name-or-id> [new-password] [flags]

Examples

  # Update password (interactive prompt)
  ghost password my-database

  # Update password with explicit value
  ghost password my-database "my-new-secure-password"

  # Generate a secure password
  ghost password my-database --generate

Options

      --generate   Automatically generate a secure password
  -h, --help       help for password

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost pause

Pause a running database

Synopsis

Pause a running database. This terminates active connections.

ghost pause <name-or-id> [flags]

Examples

  # Pause a database
  ghost pause my-database

Options

  -h, --help   help for pause

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost payment

Manage payment methods

Synopsis

Manage payment methods for your Ghost space. Opens an interactive menu when run from a terminal, or lists payment methods otherwise.

ghost payment [flags]

Options

  -h, --help   help for payment

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost payment add

Add a payment method

Synopsis

Add a payment method (credit card) by opening a secure payment page in your browser.

ghost payment add [flags]
Options
  -h, --help   help for add
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost payment delete

Delete a payment method

Synopsis

Delete a payment method.

ghost payment delete <payment-id> [flags]
Examples
  # Delete a specific payment method
  ghost payment delete pm_xxx

  # Delete without confirmation prompt
  ghost payment delete pm_xxx --confirm
Options
      --confirm   Skip confirmation prompt
  -h, --help      help for delete
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost payment list

List payment methods

Synopsis

List payment methods for your Ghost space.

ghost payment list [flags]
Options
  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost payment primary

Set the primary payment method

Synopsis

Set a payment method as the primary payment method for your space.

ghost payment primary <payment-id> [flags]
Examples
  # Set a specific payment method as primary
  ghost payment primary pm_xxx
Options
  -h, --help   help for primary
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost payment undelete

Cancel a pending payment method deletion

Synopsis

Cancel the pending deletion of a payment method.

ghost payment undelete <payment-id> [flags]
Examples
  # Cancel deletion for a specific payment method
  ghost payment undelete pm_xxx
Options
  -h, --help   help for undelete
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost pricing

Show pricing

Synopsis

Show pricing for compute overages and dedicated databases.

ghost pricing [flags]

Options

  -h, --help   help for pricing
      --json   Output in JSON format
      --yaml   Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost psql

Connect to a database using psql

Synopsis

Connect to a database using psql.

The psql client must already be installed on your machine. The database password is read from ~/.pgpass. If no password is found, the command will fail with an error.

Any flags after – are passed directly to psql.

ghost psql <name-or-id> [-- <psql-flags>...] [flags]

Examples

  # Connect to a database
  ghost psql my-database

  # Pass additional psql flags
  ghost psql my-database -- --single-transaction --quiet

Options

  -h, --help        help for psql
      --read-only   Connect in read-only mode

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost rename

Rename a database

Synopsis

Rename a database.

ghost rename <name-or-id> <new-name> [flags]

Examples

  # Rename a database
  ghost rename my-database my-new-name

Options

  -h, --help   help for rename

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost resume

Resume a paused database

Synopsis

Resume a paused database to accept connections again.

ghost resume <name-or-id> [flags]

Examples

  # Resume a database
  ghost resume my-database

  # Resume and wait for the database to be ready
  ghost resume my-database --wait

Options

  -h, --help   help for resume
      --wait   Wait for the database to be ready before returning

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost schema

Display database schema information

Synopsis

Display database schema information including tables (regular, partitioned, and foreign), views, materialized views, enum types, functions, and procedures with their columns, constraints, indexes, and triggers. Only objects the connecting user can access are listed. By default system schemas (information_schema, pg_, timescaledb) and extension-owned objects are excluded; use --schema to target a specific schema (including a system schema such as pg_catalog) or --internal to include everything.

Object definitions (view SELECT statements and function/procedure bodies) are omitted by default to keep the output concise; pass --definitions to include them. Object comments (COMMENT ON text for schemas, tables, views, columns, enums, functions, and procedures) are likewise omitted by default; pass –comments to include them.

ghost schema <name-or-id> [flags]

Examples

  ghost schema my-database
  ghost schema my-database --schema reporting
  ghost schema my-database --internal

Options

      --comments        Include object comments (COMMENT ON text for schemas, tables, views, columns, enums, functions, and procedures)
      --definitions     Include full object definitions (view SELECT statements and function/procedure bodies)
  -h, --help            help for schema
      --internal        Include system schemas (information_schema, pg_*, _timescaledb_*) and extension-owned objects
      --schema string   Restrict output to a single Postgres schema (may be a system schema; only objects you can access are shown)

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost serve

Launch a local web UI for running SQL queries

Synopsis

Start a local web server and open a browser to a UI that lets you run SQL queries against your ghost databases. The server runs only for the duration of this command — press Ctrl+C to stop it.

ghost serve [flags]

Examples

  # Launch on an auto-picked port and open the browser
  ghost serve

  # Pin a port and skip the browser
  ghost serve --port 5174 --no-open

Options

  -h, --help          help for serve
      --host string   interface to bind (loopback by default) (default "127.0.0.1")
      --log-level     log level: debug, info, warn, or error (default INFO)
      --no-open       do not open the browser
      --port int      TCP port to listen on (0 = auto)

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost share

Share a database

Synopsis

Share a database so a recipient can create their own database from a snapshot.

The share URL can be handed to anyone — they don’t need access to this space. Whoever opens the URL gets instructions to run ‘ghost create --from-share <token>’ (or ‘ghost create-dedicated --from-share <token>’), which spins up a new database in their own space from the shared snapshot.

ghost share <name-or-id> [flags]

Examples

  # Share a database (no expiry)
  ghost share my-database

  # Share for 24 hours (relative duration)
  ghost share my-database --expires 24h

  # Share until a specific time (RFC3339)
  ghost share my-database --expires 2026-05-01T00:00:00Z

  # Output as JSON
  ghost share my-database --json

  # The recipient creates their own database from the share token
  ghost create --from-share <token>

Options

      --expires string   Expiry as a duration (e.g. 30m, 24h) or RFC3339 timestamp (e.g. 2026-05-01T00:00:00Z)
  -h, --help             help for share
      --json             Output in JSON format
      --yaml             Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost share list

List database shares

Synopsis

List all shares in your Ghost space.

ghost share list [flags]
Options
  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost share revoke

Revoke a database share

Synopsis

Revoke a share so its URL can no longer be used to create new databases.

ghost share revoke <share-token> [flags]
Options
  -h, --help   help for revoke
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost space

Manage spaces

Synopsis

Manage Ghost spaces.

A space is a collection of databases with shared usage limits and billing. The CLI operates on one space at a time — the current space. Use ‘ghost space list’ to see your spaces and ‘ghost space use’ to switch between them.

Options

  -h, --help   help for space

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost space list

List spaces

Synopsis

List your Ghost spaces. The current space is marked with an asterisk.

ghost space list [flags]
Examples
  # List your spaces
  ghost space list

  # Output as JSON
  ghost space list --json
Options
  -h, --help   help for list
      --json   Output in JSON format
      --yaml   Output in YAML format
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost space rename

Rename the current space

Synopsis

Rename the current space.

ghost space rename <new-name> [flags]
Examples
  # Rename the current space
  ghost space rename "My Team's space"
Options
  -h, --help   help for rename
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost space use

Switch the current space

Synopsis

Switch the current space.

Subsequent commands operate on the new current space. Run ‘ghost space list’ to see your spaces and their IDs.

ghost space use <id> [flags]
Examples
  # Switch the current space
  ghost space use x9y8z7w6v5
Options
  -h, --help   help for use
Options inherited from parent commands
      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost sql

Execute SQL query on a database

Synopsis

Execute a SQL query against a database and display the results.

If no query is provided as an argument, reads from stdin.

Multi-statement queries (semicolon-separated) are supported. Results from all statements that return rows will be displayed.

ghost sql <name-or-id> [query] [flags]

Examples

  # Select data from a table
  ghost sql my-database "SELECT * FROM users LIMIT 5"

  # Execute DDL
  ghost sql my-database "CREATE TABLE todos (id SERIAL PRIMARY KEY, title TEXT)"

  # Multi-statement query
  ghost sql my-database "INSERT INTO users (name) VALUES ('alice'); SELECT * FROM users"

  # Read query from stdin
  echo "SELECT 1" | ghost sql my-database

  # Read query from a file
  ghost sql my-database < schema.sql

Options

  -h, --help   help for sql

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost tutorial

Run an interactive Ghost tutorial

Synopsis

Run an interactive tutorial that demonstrates the core Ghost workflow.

The tutorial creates a temporary database, inserts sample data, forks the database, mutates the fork, compares the original and fork, and then asks whether to delete or keep the tutorial databases. Each step explains and echoes the equivalent Ghost CLI command before running it.

ghost tutorial [flags]

Examples

  ghost tutorial

Options

  -h, --help   help for tutorial

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost upgrade

Upgrade the ghost CLI to the latest version

Synopsis

Download and install the latest published version of the ghost CLI, replacing the currently running binary.

If ghost was installed via a package manager (Homebrew, apt, yum/dnf), the upgrade will be refused with a suggestion to use that package manager instead.

ghost upgrade [flags]

Options

  -h, --help   help for upgrade

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost usage

Show space usage

ghost usage [flags]

Examples

  # Show space usage
  ghost usage

  # Output as JSON
  ghost usage --json

  # Output as YAML
  ghost usage --yaml

Options

  -h, --help   help for usage
      --json   Output in JSON format
      --yaml   Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

ghost version

Show version information

Synopsis

Display version, build time, and git commit information for the Ghost CLI

ghost version [flags]

Options

      --bare   Print only the version string
  -h, --help   help for version
      --json   Output in JSON format
      --yaml   Output in YAML format

Options inherited from parent commands

      --analytics           enable/disable usage analytics (default true)
      --color               enable colored output (default true)
      --config-dir string   config directory (default "~/.config/ghost")
      --version-check       check for updates (default true)

MCP Integration

Ghost Model Context Protocol (MCP) server

ghost mcp install
ghost mcp start
ghost mcp get ghost_create

Available Tools

These tools let an agent work directly against Ghost: create and fork databases, inspect schema and logs, run SQL, and handle account-level operations like login or feedback.

  • ghost_connect

    Get a PostgreSQL connection string for a database.

  • ghost_create

    Create a new database.

  • ghost_create_dedicated

    Create a new dedicated database. Dedicated databases are always-on, billed instances that are not subject to space compute or storage limits. A payment method must be on file.

  • ghost_delete

    Delete a database permanently. This operation is irreversible.

  • ghost_feedback

    Submit feedback, a bug report, or a support request to the Ghost team.

  • ghost_fork

    Fork an existing database to create a new independent copy.

  • ghost_fork_dedicated

    Fork an existing database as a new dedicated instance. The fork inherits the source database's data but runs as an always-on, billed instance. A payment method must be on file.

  • ghost_id

    Display information about the authenticated caller: the user when authenticating via OAuth, or the API key when authenticating with an API key.

  • ghost_invoice

    Get the line-item breakdown for a single invoice, looked up by the opaque invoice ID returned from ghost_invoice_list.

  • ghost_invoice_list

    List the most recent invoices.

  • ghost_list

    List all databases, including each database's current status, storage usage, and compute minutes used in the current billing cycle.

  • ghost_login

    Authenticate with GitHub OAuth. Opens the user's browser to complete authentication.

  • ghost_logs

    Fetch logs from a database. Returns log entries in chronological order (oldest first). By default, returns the last 500 log entries.

  • ghost_password

    Reset the password for a database's default user (tsdbadmin). This changes the password on the server itself. This operation is irreversible. Existing connections using the old...

  • ghost_pause

    Pause a running database. This terminates active connections.

  • ghost_pricing

    Get pricing for compute overages and dedicated databases.

  • ghost_rename

    Rename a database.

  • ghost_resume

    Resume a paused database.

  • ghost_schema

    Display database schema including tables (regular, partitioned, and foreign), views, materialized views, enum types, functions, procedures, indexes, triggers, and TimescaleDB...

  • ghost_share

    Share a database so a recipient can create their own database from a snapshot.

  • ghost_share_list

    List all shares in the current Ghost space.

  • ghost_share_revoke

    Revoke a database share so its URL can no longer be used to create new databases.

  • ghost_sql

    Execute a SQL query against a database. If the connection fails, the database may not be running - use ghost_list to check its status.

  • ghost_usage

    Display database space usage including compute minutes, storage, and database counts by status.

  • search_docs
  • view_skill

Prompts

Prompts package reusable guidance for common database tasks, especially around PostgreSQL schema design, TimescaleDB hypertables, PostGIS, pgvector, and hybrid search workflows.

  • design-postgis-tables
  • design-postgres-tables
  • find-hypertable-candidates
  • migrate-postgres-tables-to-hypertables
  • pgvector-semantic-search
  • postgres
  • postgres-hybrid-text-search
  • setup-timescaledb-hypertables

API Reference

Ghost exposes an HTTP API at https://api.ghost.build/v0.

Authentication

Method Path Summary
GET /auth/info Get authentication info
POST /auth/logout Log out

Spaces

Method Path Summary
GET /spaces List spaces
POST /spaces Create a space
GET /spaces/{space_id}/invites List sent invites
POST /spaces/{space_id}/invites Invite a user to a space
DELETE /spaces/{space_id}/invites/{email} Cancel a sent invite
GET /spaces/{space_id}/invoices List invoices
GET /spaces/{space_id}/invoices/{invoice_id} Get invoice detail
GET /spaces/{space_id}/members List space members
DELETE /spaces/{space_id}/members/{user_id} Remove a member
PUT /spaces/{space_id}/members/{user_id}/role Update a member's role
PUT /spaces/{space_id}/overages Update compute overage settings
GET /spaces/{space_id}/payment List payment methods
POST /spaces/{space_id}/payment Create payment method setup
DELETE /spaces/{space_id}/payment/{payment_id} Delete a payment method
GET /spaces/{space_id}/payment/{payment_id} Get a payment method
DELETE /spaces/{space_id}/payment/{payment_id}/deletion Cancel pending payment method deletion
PUT /spaces/{space_id}/payment/{payment_id}/primary Set primary payment method
POST /spaces/{space_id}/rename Rename a space
GET /spaces/{space_id}/shares List database shares
DELETE /spaces/{space_id}/shares/{share_token} Revoke a database share
GET /spaces/{space_id}/status Get space usage (deprecated)
GET /spaces/{space_id}/usage Get space usage

Databases

Method Path Summary
GET /spaces/{space_id}/databases List databases
POST /spaces/{space_id}/databases Create a database
DELETE /spaces/{space_id}/databases/{database_ref} Delete a database
GET /spaces/{space_id}/databases/{database_ref} Get a database
POST /spaces/{space_id}/databases/{database_ref}/fork Fork a database
GET /spaces/{space_id}/databases/{database_ref}/logs Get database logs
POST /spaces/{space_id}/databases/{database_ref}/password Update database password
POST /spaces/{space_id}/databases/{database_ref}/pause Pause a database
POST /spaces/{space_id}/databases/{database_ref}/rename Rename a database
POST /spaces/{space_id}/databases/{database_ref}/resume Resume a database
POST /spaces/{space_id}/databases/{database_ref}/share Share a database

API keys

Method Path Summary
GET /spaces/{space_id}/api_keys List API keys
POST /spaces/{space_id}/api_keys Create an API key
DELETE /spaces/{space_id}/api_keys/{prefix} Delete an API key

Health

Method Path Summary
GET /health Health check

API

Method Path Summary
POST /analytics/identify Identify user
POST /analytics/track Track event
POST /feedback Submit feedback
GET /invites List received invites
POST /invites/{space_id}/accept Accept a received invite
POST /invites/{space_id}/decline Decline a received invite
GET /pricing Get pricing