0.20.0 • Published 2 days ago

@osdk/cli v0.20.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 days ago

@osdk/cli

A CLI for generating OSDKs and managing Foundry site deployments

The CLI may be run directly through npx with npx @osdk/cli@latest. When the NPM package is explicitly installed for example with npm install -g @osdk/cli@latest the osdk binary is also available.

Running locally

Run the following commands from the repository root:

pnpm install
pnpm build
cd packages/cli
./bin/osdk.mjs

site subcommand

The site subcommand allows users to manage their Foundry site

npx @osdk/cli site [subcommand]

Common options

OptionDescription
--foundryUrlURL for the Foundry stack string
--applicationApplication resource identifier (rid) string
--tokenFoundry API token string
--tokenFilePath to file containing Foundry API token string

--token and --tokenFile are mutually exclusive and only one can be passed. If neither are passed the CLI runtime looks for these environment variables in order [FOUNDRY_TOKEN, FOUNDRY_SDK_AUTH_TOKEN]. If a token is not specified using any of those options, the CLI will exit with a failure.


Project config file

A foundry.config.json file may be used in your project's root to simplify usage of the CLI by populating default values for commands. The current working directory will be traversed up to the root directory and the first foundry.config.json file, if found, will be used.

An example of a full foundry.config.json is show below:

{
  "foundryUrl": "https://example.palantirfoundry.com",
  "site": {
    "application": "ri.third-party-applications.main.application.1c66b352-4e00-40d2-995d-061c9d533ace",
    "directory": "./dist",
    "autoVersion": {
      "type": "git-describe",
      "tagPrefix": ""
    }
  }
}

The site subcommand is not runnable without passing a specific subcommand i.e (deploy or version)

deploysubcommand

The deploy subcommand allows users to upload new versions of their site and set it as deployed

npx @osdk/cli site deploy

Deploy options

OptionDescription
--directoryDirectory containing site files string
--versionNew version of site to deploy string
--uploadOnlyUpload new site version only without setting as live boolean

Auto Version options

OptionDescription
--autoVersionEnable auto versioning string
--gitTagPrefixPrefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v ' is stripped if present. string

--version and --autoVersion are mutually exclusive and only one can be passed.

If git-describe is used for --autoVersion, the CLI will try to infer the version by running the git describe command with optionally --match=<gitTagPrefix> set if --gitTagPrefix is passed.

version subcommand

The version subcommand allows users to manage their site versions.

The version subcommand is not runnable without passing a specific subcommand i.e (list or get)

list subcommand

The list subcommand allows users to list their site versions

npx @osdk/cli site version list

get subcommand

The get subcommand allows users to get their live site version

npx @osdk/cli site version get

set <version> subcommand

The set subcommand allows users to set their live site version

npx @osdk/cli site version set 0.1.0

unset subcommand

The unset subcommand allows users to clear their live site version

npx @osdk/cli site version unset

delete <version> subcommand

The delete subcommand allows users to delete a site version

npx @osdk/cli site version delete 0.1.0

Help and debugging

To see all supported commands and their expected arguments, run a command with the --help flag

npx @osdk/cli site version --help

For additional information for debugging, use the --verbose flag

npx @osdk/cli site version --verbose
0.20.0

3 days ago

0.19.0

12 days ago

0.18.0

18 days ago

0.17.0

1 month ago

0.16.0

1 month ago

0.15.0

2 months ago

0.14.0

2 months ago

0.12.0

2 months ago

0.13.0

2 months ago

0.11.0

3 months ago

0.10.0

3 months ago

0.9.0

3 months ago

0.8.0

3 months ago

0.7.0

3 months ago

0.5.0

3 months ago

0.6.0

3 months ago

0.4.0

3 months ago

0.3.0

3 months ago

0.2.0

3 months ago

0.0.20

4 months ago

0.1.0

4 months ago

0.1.1

4 months ago

0.0.19

4 months ago

0.0.18

4 months ago

0.0.17

4 months ago

0.0.16

5 months ago

0.0.15

5 months ago

0.0.14

5 months ago

0.0.13

5 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.9

6 months ago

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago