{
  "id": "leetcode-cli",
  "name": "leetcode-cli",
  "homepage": "https://github.com/clearloop/leetcode-cli",
  "description": "A command-line tool for solving LeetCode problems.",
  "executables": [
    "leetcode"
  ],
  "dotfiles": {
    "paths": [
      "~/.leetcode/leetcode.toml"
    ],
    "exclude": [],
    "secret": [],
    "secret_paths": [
      {
        "file": "~/.leetcode/leetcode.toml",
        "match": {
          "key_path": [
            "cookies.csrf",
            "cookies.session"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "leetcode",
    "description": "Pick, edit, test and submit LeetCode problems by id, or work on today's daily challenge. List, stat, data and completions commands are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "pick"
        ],
        "label": "Pick a problem",
        "description": "Pick a problem by id, name or daily challenge and print its description.",
        "source": [
          {
            "id": "readme",
            "kind": "help",
            "url": "https://github.com/clearloop/leetcode-cli/blob/master/README.md",
            "revision": "2026-10",
            "evidence": "leetcode pick 1        # pick a problem and print its description\n| `pick` | `p` | Pick a problem by id, `--name`, `--tag`, `--query`, `--plan`, or `--daily` |\n"
          }
        ],
        "field": [
          {
            "id": "id",
            "label": "Problem id",
            "type": "integer",
            "position": 0,
            "sources": [
              "readme"
            ]
          },
          {
            "id": "name",
            "label": "Problem name",
            "type": "string",
            "option": [
              "--name"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "tag",
            "label": "Tag",
            "type": "string",
            "option": [
              "--tag"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "daily",
            "label": "Daily challenge",
            "type": "boolean",
            "option": [
              "--daily"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "pick_id",
            "label": "Pick by id",
            "fields": [
              "id"
            ],
            "required": [
              "id"
            ]
          },
          {
            "id": "pick_daily",
            "label": "Today's challenge",
            "fields": [
              "daily"
            ],
            "required": [
              "daily"
            ],
            "set": {
              "daily": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "id",
              "name",
              "tag",
              "daily"
            ]
          }
        ]
      },
      {
        "path": [
          "edit"
        ],
        "label": "Edit a solution",
        "description": "Open a problem's code file in your editor.",
        "source": [
          {
            "id": "readme",
            "kind": "help",
            "url": "https://github.com/clearloop/leetcode-cli/blob/master/README.md",
            "revision": "2026-10",
            "evidence": "leetcode edit 1        # open the solution file in your editor\n| `edit` | `e` | Open a problem's code file; `--lang` overrides the configured language, `--daily` opens today's challenge |\n"
          }
        ],
        "field": [
          {
            "id": "id",
            "label": "Problem id",
            "type": "integer",
            "position": 0,
            "sources": [
              "readme"
            ]
          },
          {
            "id": "lang",
            "label": "Language",
            "type": "string",
            "option": [
              "--lang"
            ],
            "suggestions": [
              {
                "value": "rust",
                "label": "Rust"
              },
              {
                "value": "python3",
                "label": "Python 3"
              },
              {
                "value": "cpp",
                "label": "C++"
              }
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "daily",
            "label": "Daily challenge",
            "type": "boolean",
            "option": [
              "--daily"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "edit_id",
            "label": "Edit by id",
            "fields": [
              "id",
              "lang"
            ],
            "required": [
              "id"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "id",
              "lang",
              "daily"
            ]
          }
        ]
      },
      {
        "path": [
          "test"
        ],
        "label": "Test a solution",
        "description": "Run the sample test cases for a problem.",
        "source": [
          {
            "id": "readme",
            "kind": "help",
            "url": "https://github.com/clearloop/leetcode-cli/blob/master/README.md",
            "revision": "2026-10",
            "evidence": "leetcode test 1        # run the sample test cases\n| `test` | `t` | Run test cases; `--watch` re-runs on save, `--daily` targets today's challenge |\n"
          }
        ],
        "field": [
          {
            "id": "id",
            "label": "Problem id",
            "type": "integer",
            "position": 0,
            "sources": [
              "readme"
            ]
          },
          {
            "id": "watch",
            "label": "Re-run on save",
            "type": "boolean",
            "option": [
              "--watch"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "daily",
            "label": "Daily challenge",
            "type": "boolean",
            "option": [
              "--daily"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "test_id",
            "label": "Test by id",
            "fields": [
              "id",
              "watch"
            ],
            "required": [
              "id"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "id",
              "watch",
              "daily"
            ]
          }
        ]
      },
      {
        "path": [
          "exec"
        ],
        "label": "Submit a solution",
        "description": "Submit the solution for a problem.",
        "source": [
          {
            "id": "readme",
            "kind": "help",
            "url": "https://github.com/clearloop/leetcode-cli/blob/master/README.md",
            "revision": "2026-10",
            "evidence": "leetcode exec 1        # submit the solution\n| `exec` | `x` | Submit the solution |\n"
          }
        ],
        "field": [
          {
            "id": "id",
            "label": "Problem id",
            "type": "integer",
            "position": 0,
            "effect": "exec",
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "submit",
            "label": "Submit by id",
            "fields": [
              "id"
            ],
            "required": [
              "id"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "id"
            ]
          }
        ]
      }
    ]
  }
}
