@takeshape/cli
@takeshape/cli is compatible with MacOS and Linux / Unix operating systems, and Windows 10 with Windows Subsystem for Linux.
Install
NPM
npm install -g @takeshape/cli
Usage
takeshape <command>
Commands
login
link
unlink
build
watch
schema
types
status
import
export
validate
Options
--token, -t API Key or Personal Access Token
--cliLogin, -l Log in using CLI (do not open browser)
--site, -s static site id
--file, -f path to tsg.yml
--output, -o build output path
--endpoint, -e endpoint
--version, -v tsg version number
--cache -c use file cache (default false)
--watchContent, -W rebuild on content change (watch only)
Environment variables
TS_EXPERIMENTAL_PAGE_SIZE
NODE_ENV
TS_SITE_ID
TS_SITE_NAME
TS_API_KEY
import
options
--schema import a schema JSON file to the currently linked projectuse either --schema or --project not both, must be combined with --from
--project import a project from given directory, zip or url use either --project or --schema not both, must be combined with --from
--from specifies the file, directory, zip or url to import
--to either "new-project" or "current-project". Default is "new-project".
--name for use with --project specifies a new name for the imported project
export
options
--schema export a schema JSON file use either --schema or --project not both, must be combined with --to
--project export a project zip use either --project or --schema not both, must be combined with --to
--withoutData when using --project skip exporting the data
--to specifies the directory to write the exported data to
types
options
--to specifies the file to write the generated type definitions to, overwriting a file if it exists
validate
options
--path path to the schema file to validate, or the directory it is in (default "./schema.json")
Examples
$ takeshape build --file path/to/tsg.yml
$ takeshape schema && takeshape types --to /src/types/takeshape.d.ts