Skip to content
GitHub

CLI

Gatelet provides a CLI for running the server and performing health checks.

Start the Gatelet server. This is the default command.

Terminal window
gatelet

On startup, Gatelet:

  1. Loads the admin token and derives the master encryption key via HKDF-SHA256
  2. Initializes the SQLite database
  3. Starts the MCP server on port 4000
  4. Starts the admin server on port 4001
  5. Prints the dashboard URL (token is masked in Docker to prevent leaking via docker logs)

Run health checks to verify your setup.

Terminal window
gatelet doctor # Run all checks
gatelet doctor --fix # Auto-fix what's fixable
gatelet doctor --json # Machine-readable output

Or via npm scripts during development:

Terminal window
npm run doctor
npm run doctor:fix

The doctor command runs 15+ checks including:

CheckWhat it verifies
DockerDocker is installed and the socket is accessible
PortsPorts 4000 and 4001 are available
Data directory$DATA_DIR exists with correct permissions
DatabaseSQLite database is readable and has expected tables
EncryptionMaster key can be derived and verified
OAuthOAuth credentials are configured (built-in or custom)
NetworkDocker networks are configured correctly

Each check reports pass, fail, or fixable status. The --fix flag attempts to resolve fixable issues automatically (e.g. creating missing directories, setting permissions).