{
  "id": "bun",
  "name": "Bun",
  "homepage": "https://bun.com",
  "description": "Bun is an all-in-one toolkit for JavaScript and TypeScript apps.",
  "icon": "SimpleIcons:bun",
  "executables": [
    "bun",
    "bunx"
  ],
  "dotfiles": {
    "paths": [
      "~/.bunfig.toml"
    ],
    "exclude": [
      "~/.bun/install/cache/",
      "~/.bun/install/global/",
      "~/.bun/bin/"
    ],
    "secret": [],
    "side_effect": false,
    "secret_paths": [
      {
        "file": "~/.bunfig.toml",
        "match": {
          "key_path": [
            "install.registry.token",
            "install.scopes.*.token",
            "install.scopes.*.password"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Run a file with Bun",
    "description": "Run a script or file with Bun's runtime. Use the subcommand tabs for run, install, add, test, build and init; debugger, JSX and loader options are left out.",
    "quality": "ai-draft",
    "base": "fig:bun",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/bun.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "file",
        "label": "File or script",
        "description": "Entry file to run.",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "hot",
        "label": "Hot reload",
        "description": "Auto reload in the runtime, test runner or bundler.",
        "type": "boolean",
        "option": [
          "--hot"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "watch",
        "label": "Restart on change",
        "description": "Automatically restart the process on file change.",
        "type": "boolean",
        "option": [
          "--watch"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "watch",
        "label": "Run and restart on change",
        "fields": [
          "file",
          "watch"
        ],
        "required": [
          "file"
        ],
        "set": {
          "watch": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "file",
          "hot",
          "watch"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "run"
        ],
        "label": "Run script",
        "description": "Run a package.json script or executable. Flags are not in the completion data.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bun.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "script",
            "label": "Script",
            "type": "string",
            "position": 0,
            "suggestions": [
              {
                "value": "dev",
                "label": "dev"
              },
              {
                "value": "build",
                "label": "build"
              },
              {
                "value": "start",
                "label": "start"
              },
              {
                "value": "test",
                "label": "test"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "dev",
            "label": "Run dev",
            "fields": [
              "script"
            ],
            "required": [
              "script"
            ],
            "set": {
              "script": [
                "dev"
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "script"
            ]
          }
        ]
      },
      {
        "path": [
          "i"
        ],
        "label": "Install dependencies",
        "description": "Install dependencies from package.json (bun i).",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bun.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "production",
            "label": "Production only",
            "description": "Do not install devDependencies.",
            "type": "boolean",
            "option": [
              "--production",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "frozen_lockfile",
            "label": "Frozen lockfile",
            "description": "Disallow changes to the lockfile.",
            "type": "boolean",
            "option": [
              "--frozen-lockfile"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "description": "Do not install anything.",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "force",
            "label": "Force reinstall",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "global",
            "label": "Global",
            "type": "boolean",
            "option": [
              "--global",
              "-g"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ignore_scripts",
            "label": "Skip lifecycle scripts",
            "type": "boolean",
            "option": [
              "--ignore-scripts"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "cwd",
            "label": "Working directory",
            "type": "path",
            "option": [
              "--cwd"
            ],
            "path": {
              "kind": "directory",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "ci",
            "label": "Reproducible install",
            "fields": [
              "frozen_lockfile",
              "production"
            ],
            "required": [],
            "set": {
              "frozen_lockfile": [
                true
              ]
            }
          },
          {
            "id": "dry",
            "label": "Dry run",
            "fields": [
              "dry_run"
            ],
            "required": [],
            "set": {
              "dry_run": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "production",
              "frozen_lockfile",
              "dry_run"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "force",
              "global",
              "ignore_scripts",
              "cwd"
            ]
          }
        ]
      },
      {
        "path": [
          "a"
        ],
        "label": "Add packages",
        "description": "Add dependencies to package.json (bun a).",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bun.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "package",
            "label": "Packages",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dev",
            "label": "As devDependency",
            "type": "boolean",
            "option": [
              "--dev",
              "-d"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "optional",
            "label": "As optionalDependency",
            "type": "boolean",
            "option": [
              "--optional"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "exact",
            "label": "Exact version",
            "type": "boolean",
            "option": [
              "--exact"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "global",
            "label": "Global",
            "type": "boolean",
            "option": [
              "--global",
              "-g"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "add",
            "label": "Add dependency",
            "fields": [
              "package",
              "exact"
            ],
            "required": [
              "package"
            ]
          },
          {
            "id": "add-dev",
            "label": "Add dev dependency",
            "fields": [
              "package",
              "dev"
            ],
            "required": [
              "package"
            ],
            "set": {
              "dev": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "package",
              "dev",
              "exact"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "optional",
              "global",
              "dry_run"
            ]
          }
        ]
      },
      {
        "path": [
          "test"
        ],
        "label": "Run tests",
        "description": "Run unit tests with Bun.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bun.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "files",
            "label": "Test files or filters",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "test_name_pattern",
            "label": "Test name pattern",
            "description": "Run only tests whose name matches this regex.",
            "type": "string",
            "option": [
              "--test-name-pattern",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "timeout",
            "label": "Per-test timeout (ms)",
            "type": "integer",
            "option": [
              "--timeout"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "only",
            "label": "Only test.only()",
            "type": "boolean",
            "option": [
              "--only"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "coverage",
            "label": "Coverage",
            "type": "boolean",
            "option": [
              "--coverage"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "update_snapshots",
            "label": "Update snapshots",
            "description": "Rewrites snapshot files.",
            "type": "boolean",
            "option": [
              "--update-snapshots"
            ],
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "watch",
            "label": "Watch",
            "type": "boolean",
            "option": [
              "--watch"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "rerun_each",
            "label": "Re-run each file N times",
            "type": "integer",
            "option": [
              "--rerun-each"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "coverage",
            "label": "Tests with coverage",
            "fields": [
              "files",
              "coverage"
            ],
            "required": [],
            "set": {
              "coverage": [
                true
              ]
            }
          },
          {
            "id": "watch",
            "label": "Watch mode",
            "fields": [
              "files",
              "watch"
            ],
            "required": [],
            "set": {
              "watch": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "files",
              "test_name_pattern",
              "only",
              "coverage"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "timeout",
              "update_snapshots",
              "watch",
              "rerun_each"
            ]
          }
        ]
      },
      {
        "path": [
          "build"
        ],
        "label": "Bundle files",
        "description": "Bundle entry points with Bun's bundler.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bun.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "entrypoints",
            "label": "Entry points",
            "description": "Several entry points require an output directory.",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "outdir",
            "label": "Output directory",
            "type": "path",
            "option": [
              "--outdir"
            ],
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "outfile",
            "label": "Output file",
            "type": "path",
            "option": [
              "--outfile"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "minify",
            "label": "Minify",
            "type": "boolean",
            "option": [
              "--minify"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target",
            "label": "Target environment",
            "type": "string",
            "option": [
              "--target"
            ],
            "suggestions": [
              {
                "value": "browser",
                "label": "browser"
              },
              {
                "value": "bun",
                "label": "bun"
              },
              {
                "value": "node",
                "label": "node"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "splitting",
            "label": "Code splitting",
            "type": "boolean",
            "option": [
              "--splitting"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "sourcemap",
            "label": "Sourcemap",
            "type": "string",
            "option": [
              "--sourcemap"
            ],
            "suggestions": [
              {
                "value": "inline",
                "label": "inline"
              },
              {
                "value": "external",
                "label": "external"
              },
              {
                "value": "none",
                "label": "none"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "watch",
            "label": "Watch",
            "type": "boolean",
            "option": [
              "--watch"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "bundle",
            "label": "Minified bundle",
            "fields": [
              "entrypoints",
              "outdir",
              "minify"
            ],
            "required": [
              "entrypoints"
            ],
            "set": {
              "minify": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "entrypoints",
              "outdir",
              "outfile",
              "minify",
              "target"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "splitting",
              "sourcemap",
              "watch"
            ]
          }
        ]
      },
      {
        "path": [
          "init"
        ],
        "label": "New project",
        "description": "Initialize a new Bun project in the current directory.",
        "parser": {
          "end_of_options": "--",
          "interleave": "permute",
          "long_equals": true,
          "short_attached": true,
          "short_bundles": false
        },
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bun.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "yes",
            "label": "Accept defaults",
            "description": "Answer yes to all prompts.",
            "type": "boolean",
            "option": [
              "--yes",
              "-y"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "init",
            "label": "Init with defaults",
            "fields": [
              "yes"
            ],
            "required": [],
            "set": {
              "yes": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "yes"
            ]
          }
        ]
      }
    ]
  }
}
