Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Meza-dev/Ghostly/llms.txt
Use this file to discover all available pages before exploring further.
ghostly keygen generates a new API key and writes it into ~/.ghostly/auth.json, replacing any previously stored key while preserving your existing LLM configuration, API URL, and extra environment variables. Run this command when setting up a new machine, or any time you need to rotate credentials without going through the full interactive installer.
What it does
When invoked,keygen performs the following steps:
- Generates a new API key — a UUID v4 by default, or a 64-character random hex string when
--tokenis passed. - Reads the existing
~/.ghostly/auth.json(if present) to preserveapiUrl,llm, andextraEnv. - Writes the updated auth object back to
~/.ghostly/auth.jsonwith mode0600.
Flags
Generates a cryptographically random hex token (32 bytes → 64 hex characters) instead of the default UUID v4.
Use this when an integration requires a non-UUID format.
Backend URL to associate with the generated key. This value is written to the
apiUrl field in auth.json.
If an existing auth.json already contains an apiUrl, that value takes precedence and this flag is ignored.The ~/.ghostly/auth.json structure
After keygen runs, the file contains:
llm and extraEnv keys are only present if they existed in the file before the command ran — keygen never removes them.
Usage
Example output
Key format comparison
| Format | Flag | Example | Length |
|---|---|---|---|
| UUID v4 | (none) | 3f8a1c2e-47d6-4b09-a3e1-9f0c72b85d14 | 36 chars |
| Hex token | --token | a3f8c2...d914 | 64 chars |
Each machine in your environment should have its own unique API key. Do not
copy
~/.ghostly/auth.json between machines — run ghostly keygen on each
one independently.When to use keygen vs install
- Use
ghostly keygenwhen you only need to rotate the API key on an already-configured machine. - Use
ghostly installfor a fresh setup — it callskeygeninternally and also configures the MCP server, installs Chromium, and copies Cursor rules.