$ tinacms <command>Commands:dev [options] Builds Tina and starts the dev serverbuild [options] Build the CMS and autogenerated modules for usage with TinaCloudinit [options] Add TinaCloud to an existing projectaudit [options] Audit your schema and the files to check for errorssearch-index [options] Builds the TinaCMS search index and uploads it to TinaCloudhelp [command] display help for command
Here are some common options that can be used in both tinacms dev
and tiancms build
To run this command, you must have a valid tina/config.{ts,tsx,js,jsx}
file.
dev
will compile the schema into static files, generate typescript types for use in your project and start a graphQL server on http://localhost:4001
This command takes the arguments listed in the common options
tinacms dev -c \"next dev\"
tinacms dev -c \"<Yor Dev Command>\"
This command compiles and validates the schema and generates the client and types. It will also ensure your content has finished indexing.
This command takes all the common options as well as a few others:
Building for production with TinaCloud for data fetching
tinacms build && next build
Building for production with a SSG
tinacms build && <Your SSG build command>
Using the local client and local graphql server
tinacms build --local -c "next build"
This will
The init command must be run inside of an existing project (E.g a NextJS project, Hugo, Jekyll, etc).
npx @tinacms/cli init
This will:
tina
directory.package.json
to have the dev
, build
, and start
scripts run the tina GraphQL API.The audit
command is used for checking for errors in your in your files. It currently does two things.
By default the mutation will not change the content of the files.
This command builds the search-index using the content in your repository and uploads it to TinaCloud.
© TinaCMS 2019–2024