CLI

The LeetCode Ghost Window Command Line Interface (CLI) provides a convenient way to manage the application from your terminal.

Installation

To install the CLI globally on your system:

npm install -g leetcode-joseok

This will make the leet-joseok command available in your terminal.

Note: You need Node.js version 18 or newer to use the CLI. The CLI can work independently, but its functionality is enhanced when the desktop application is installed.

Verify Installation

To verify that the CLI was installed correctly:

leet-joseok --version

This should display the current version of the CLI (v1.5.0).

Basic Usage

init

Launches the LeetCode Ghost Window application.

leet-joseok init

This command will search for the installed desktop application and launch it. If the application is not found, it will offer to open the GitHub repository where you can download it.

config

Configure LeetCode Ghost Window settings.

leet-joseok config set apiKey YOUR_OPENAI_API_KEY

capture

Capture a screenshot of the current screen.

leet-joseok capture

process

Process captured screenshots with AI.

leet-joseok process

help

Display help for the LeetCode Ghost Window CLI.

leet-joseok help

Managing Configuration

The CLI provides several commands to manage your LeetCode Ghost Window configuration:

Set a configuration value

leet-joseok config set <key> <value>

Example: leet-joseok config set language python

Get a configuration value

leet-joseok config get <key>

Example: leet-joseok config get apiKey

List all configuration values

leet-joseok config list

Available Configuration Options

  • apiKey - Your OpenAI API key for AI processing
  • ghostMode - Enable or disable ghost mode (true/false)
  • language - Preferred programming language for solutions
  • opacity - Window opacity level (0.1 to 1.0)
  • theme - Application theme (dark/light)

Troubleshooting

Command not found

If the leet-joseok command is not found after installation, ensure that the npm bin directory is in your PATH:

Application not found

If the leet-joseok init command cannot find the desktop application, you'll be prompted to download it from our GitHub repository.

Additional Resources

For more detailed information about the CLI: