Skip to content

CLI Reference

Reference documentation for the coda CLI.

auth

Set up authentication for a Pack

Usage: coda auth <manifestPath>

Options:

--oauthServerPort, --oauth_server_port

Port to use for the local server that handles OAuth setup.

Type: number | Default: 3000

--extraOAuthScopes, --extra_oauth_scopes

Scopes to request beyond those listed in the manifest, for specific formulas that need extra permissions. Example: --extra_oauth_scopes='first second third'

Type: string


build

Build your Pack locally (not required; for debugging purposes only)

Usage: coda build <manifestFile>

Options:

--outputDir, -o
Type: string
--minify
Type: boolean | Default: true
--timerStrategy

Options: none, error, fake (default: none).

Type: string

--intermediateOutputDirectory
Type: string

clone

Clone an existing Pack that was created using Pack Studio

Usage: coda clone <packIdOrUrl>

Options:

--apiToken, -t

API token to use for the operation. Use the register command to define a default token.

Type: string

--apiEndpoint, --codaApiEndpoint

API endpoint to use for the operation (default: https://coda.io). Required for single-tenant instances. Can also be set persistently via coda setOption <manifestFile> apiEndpoint <url>.

Type: string


create

Register a new Pack with Coda's servers

Usage: coda create <manifestFile>

Options:

--name, -n

The name of the Pack. Can be set later in the UI.

Type: string

--description, -d

A description of the Pack. Can be set later in the UI.

Type: string

--workspace, -w

The workspace ID, or workspace URL that you want your Pack to be created under.

Type: string

--apiToken, -t

API token to use for the operation. Use the register command to define a default token.

Type: string

--apiEndpoint, --codaApiEndpoint

API endpoint to use for the operation (default: https://coda.io). Required for single-tenant instances. Can also be set persistently via coda setOption <manifestFile> apiEndpoint <url>.

Type: string


execute

Execute a formula

Usage: coda execute <manifestPath> <formulaName> [params..]

Options:

--fetch

Actually fetch http requests instead of using mocks. Run "coda auth" first to set up credentials.

Type: boolean | Default: true

--vm

Execute the requested command in a virtual machine that mimics the environment Coda uses to execute Packs.This defaults to true if the isolated-vm package is installed, and to false if not.

Type: boolean

--dynamicUrl

For a dynamic sync table with a variable source location, specify the URL to test here.

Type: string

--timerStrategy

Options: none, error, fake (default: none).

Type: string

--maxRows

For a sync table, the maximum number of rows to sync.

Type: number | Default: 1000

--allowMultipleNetworkDomains

Allow executing Packs that use multiple network domains. You must get approval from Coda before you can upload these Packs.

Type: boolean | Default: false


extensions

Installs developer extensions for working with Packs.

Usage: coda extensions <tools..>


init

Initialize an empty Pack

Usage: coda init


Link to a pre-existing Pack ID on Coda's servers

Usage: coda link <manifestDir> <packIdOrUrl>

Options:

--apiToken, -t

API token to use for the operation. Use the register command to define a default token.

Type: string

--apiEndpoint, --codaApiEndpoint

API endpoint to use for the operation (default: https://coda.io). Required for single-tenant instances. Can also be set persistently via coda setOption <manifestFile> apiEndpoint <url>.

Type: string


register

Register API token to publish a Pack

Usage: coda register [apiToken]

Options:

--apiEndpoint, --codaApiEndpoint

API endpoint to use for the operation (default: https://coda.io). Required for single-tenant instances. Can also be set persistently via coda setOption <manifestFile> apiEndpoint <url>.

Type: string


release

Set the Pack version that is installable for users. You may specify a specific version, or omit a version to use the version currently in the manifest file. The version must always be higher than that of any previous release.

Usage: coda release <manifestFile> [packVersion]

Options:

--notes, -n

Notes about the contents of this Pack release

Type: string | Required

--gitTag, -g

Create a git tag for this release (default: false). Can also be enabled by default via coda setOption <manifestFile> gitTag true

Type: boolean

--apiToken, -t

API token to use for the operation. Use the register command to define a default token.

Type: string

--apiEndpoint, --codaApiEndpoint

API endpoint to use for the operation (default: https://coda.io). Required for single-tenant instances. Can also be set persistently via coda setOption <manifestFile> apiEndpoint <url>.

Type: string


setOption

Set a persistent build option for the pack. This will store the option alongside the pack id in the .coda-pack.json file and it will be used for all builds of the pack.

Supported options:
- timerStrategy: Valid values are "none", "error", or "fake".
- gitTag: Valid values are "true" or "false". When true, the release command will create git tags.
- apiEndpoint: A URL for the API endpoint, required for single-tenant instances (e.g. "https://my-company.coda.io"). When set, all commands will use this endpoint by default.

Usage: coda setOption path/to/pack.ts timerStrategy fake

Usage: coda setOption <manifestFile> <option> <value>


upload

Build and upload your Pack version to Coda

Usage: coda upload <manifestFile>

Options:

--notes, -n

Notes about the contents of this Pack version

Type: string

--intermediateOutputDirectory, -o
Type: string | Default: ./_upload_build
--timerStrategy

Options: none, error, fake (default: none).

Type: string

--apiToken, -t

API token to use for the operation. Use the register command to define a default token.

Type: string

--apiEndpoint, --codaApiEndpoint

API endpoint to use for the operation (default: https://coda.io). Required for single-tenant instances. Can also be set persistently via coda setOption <manifestFile> apiEndpoint <url>.

Type: string

--allowOlderSdkVersion

Not recommended. Allows uploading a Pack build that uses an older version of the SDK than the prior Pack build.

Type: boolean | Default: false


validate

Validate your Pack definition

Usage: coda validate <manifestFile>

Options:

--checkDeprecationWarnings

Also check for warnings about deprecated properties and features that will become errors in a future SDK version.

Type: boolean | Default: true


whoami

Looks up information about the API token that is registered in this environment

Usage: coda whoami [apiToken]

Options:

--apiEndpoint, --codaApiEndpoint

API endpoint to use for the operation (default: https://coda.io). Required for single-tenant instances. Can also be set persistently via coda setOption <manifestFile> apiEndpoint <url>.

Type: string