{
  "name": "coda",
  "description": "Coda Local development CLI tool. It comes bundled with the Pack SDK and makes it easy to build and manage Packs from the CLI",
  "options": [
    {
      "names": [
        "--version"
      ],
      "description": "Show version number",
      "isPersistent": true,
      "priority": 1
    },
    {
      "names": [
        "--help"
      ],
      "description": "Show help",
      "isPersistent": true,
      "priority": 2
    }
  ],
  "subcommands": [
    {
      "name": "init",
      "description": "Initialize an empty project with the recommended settings and dependencies"
    },
    {
      "name": "execute",
      "description": "Execute the formula and print the output to the terminal",
      "options": [
        {
          "names": [
            "--dynamicUrl"
          ],
          "description": "To run a sync for a dynamic sync table, use this parameter to specify which URL to sync from",
          "args": [
            {
              "name": "url",
              "description": "The URL to sync from"
            }
          ]
        }
      ],
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        },
        {
          "name": "formula",
          "description": "Formula name to execute",
          "generators": [
            {
              "script": [
                "bash",
                "-c",
                "grep -A5 --include=*.ts --exclude-dir=node_modules -r 'addFormula\\|addSyncTable\\|makeFormula\\|makeSyncTable' . | grep -A3 -i formula | grep name: | grep -oE \"['\\\"]\\w*['\\\"]\""
              ]
            }
          ]
        },
        {
          "name": "params",
          "description": "Arguments to pass to the formula",
          "isOptional": true,
          "isVariadic": true
        }
      ]
    },
    {
      "name": "auth",
      "description": "Set up authentication in your development environment so that you can execute Pack formulas with authentication applied to them",
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        }
      ]
    },
    {
      "name": "register",
      "description": "Create a new API token or register an existing one to be used with future commands",
      "args": [
        {
          "name": "apiToken",
          "description": "The API token to register",
          "isOptional": true
        }
      ]
    },
    {
      "name": "create",
      "description": "Create a new Pack on Coda’s servers and get assigned a Pack ID. Run this command just once for each Pack you create",
      "options": [
        {
          "names": [
            "--name"
          ],
          "description": "Specify a name for the Pack. You can always set or update the name in the Pack management UI later",
          "args": [
            {
              "name": "name",
              "description": "The desired Pack name"
            }
          ]
        },
        {
          "names": [
            "--description"
          ],
          "description": "Specify a description for the Pack. You can always set or update the description in the Pack management UI later",
          "args": [
            {
              "name": "description",
              "description": "The Pack description"
            }
          ]
        }
      ],
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        }
      ]
    },
    {
      "name": "upload",
      "description": "Use this command to upload a new version of your Pack based on your latest code",
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        }
      ]
    },
    {
      "name": "release",
      "description": "Release a Pack version and make it live for your users",
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        },
        {
          "name": "version",
          "description": "The release version. Must always be greater than that of any of your previous releases",
          "isOptional": true
        }
      ]
    },
    {
      "name": "clone",
      "description": "Migrate the development of a Pack from the Pack Studio to a new local CLI Pack development",
      "args": [
        {
          "name": "urlOrPackId",
          "description": "The URL or ID of the Pack. E.g. https://coda.io/p/123456 or 123456"
        }
      ]
    },
    {
      "name": "link",
      "description": "Link the development of a Pack from the Pack studio to an existing local CLI Pack development",
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        },
        {
          "name": "urlOrPackId",
          "description": "The URL or ID of the Pack. E.g. https://coda.io/p/123456 or 123456"
        }
      ]
    },
    {
      "name": "whoami",
      "description": "Looks up information about the API token that is registered in this environment",
      "args": [
        {
          "name": "apiToken",
          "description": "The API token to look up",
          "isOptional": true
        }
      ]
    },
    {
      "name": "build",
      "description": "Generate a bundle for your Pack",
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        }
      ]
    },
    {
      "name": "validate",
      "description": "Validate your Pack definition",
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        }
      ]
    },
    {
      "name": "setOption",
      "description": "Set a persistent build option for the Pack. This will be used for all builds of the Pack",
      "args": [
        {
          "name": "path/to/pack.ts",
          "description": "The path to the pack.ts file. E.g. src/pack.ts",
          "template": "filepaths"
        },
        {
          "name": "option",
          "description": "Currently the only supported option is 'timerStrategy'",
          "suggestions": [
            "timerStrategy"
          ]
        },
        {
          "name": "value",
          "description": "Value to set for the option",
          "suggestions": [
            "none",
            "error",
            "fake"
          ]
        }
      ]
    }
  ]
}
