CLI
StudioCMS CLI는 새로운 StudioCMS 프로젝트를 빠르게 구성하고 StudioCMS에 유용한 유틸리티를 제공하는 도구입니다.
StudioCMS 생태계에는 서로 다른 여러 CLI가 있습니다.
studiocms
: StudioCMS 유틸리티 CLIcreate-studiocms
: StudioCMS 프로젝트 스캐폴딩 CLI@studiocms/upgrade
: StudioCMS 프로젝트 및 플러그인 업그레이드
다음은 StudioCMS CLI와 그 구성 요소에 대한 세부 정보입니다.
studiocms
Section titled “studiocms”CLI 옵션 및 명령어 전체 목록
Section titled “CLI 옵션 및 명령어 전체 목록”Usage: studiocms [options] [command]
Options: -V, --version Output the current version of the CLI Toolkit. -h, --help display help for command --color force color output --no-color disable color output
Commands: add Add StudioCMS plugin(s) to your project crypto Crypto Utilities for Security get-turso Install the Turso CLI init Initialize the StudioCMS project after new installation. users Utilities for Tweaking Users in StudioCMS
사용법 예시
Section titled “사용법 예시”StudioCMS 프로젝트 루트에서 다음을 실행합니다.
npm run studiocms [command]
pnpm studiocms [command]
yarn studiocms [command]
명령어 알아보기
Section titled “명령어 알아보기”usage: studiocms add <plugins...>
Adds StudioCMS plugin(s) to your project.
Arguments: plugins Plugin(s) to install
Options: -h, --help display help for command
crypto
Section titled “crypto”usage: studiocms crypto [command]
Crypto Utilities for Security
Options: -h, --help display help for command
Commands: gen-jwt Generate JWT token from a keyfile
crypto gen-jwt
Section titled “crypto gen-jwt”usage: studiocms crypto gen-jwt [options] <key-file>
Generate a JWT token from a keyfile
Arguments: key-file a relative path (e.g., `../keys/libsql.pem`) from the current directory to your private key file (.pem)
Options: -c, --claim <claim...> claim in the form [key=value] -e, --exp <date-in-seconds> Expiry date in seconds (>=0) from issued at (iat) time -h, --help display help for command
get-turso
Section titled “get-turso”Turso의 문서^에 있는 스크립트를 사용하여 최신 버전의 Turso를 다운로드하고 설치합니다.
Usage: getTurso [options]
Turso CLI Installer
Options: -h, --help display help for command
Usage: studiocms init [options]
Initialize the StudioCMS project after new installation.
Options: -d, --dry-run Dry run mode --skip-banners Skip all banners --debug Enable debug mode -h, --help Display help for command
init 명령어는 다음을 도와주는 대화형 설정 경험을 제공합니다.
-
다음 옵션을 통해 환경 파일 (.env)을 설정합니다.
.env
템플릿 예시 사용- 대화형
.env
빌더 사용 (다음 기능 포함):- 새로운 Turso 데이터베이스 설정 (Windows가 아닌 경우)
- OAuth 제공자 구성 (GitHub, Discord, Google, Auth0)
- 암호화 키 및 기타 필수 변수 설정
- 환경 파일 생성 건너뛰기
-
데이터베이스 설정 시 필요한 경우 Turso CLI 자동 설치 및 인증을 포함합니다.
usage: studiocms users [options]
Utilities for Tweaking Users in StudioCMS
Options: -h, --help display help for command
create-studiocms
Section titled “create-studiocms”CLI 옵션 및 명령어 전체 목록
Section titled “CLI 옵션 및 명령어 전체 목록”Usage: create-studiocms [options] [command]
Options: -V, --version Output the current version of the CLI Toolkit. -h, --help display help for command --color force color output --no-color disable color output
Commands: get-turso Get the latest version of Turso. help Show help for command interactive* Start the interactive CLI.
* Indicates the default command that is run when calling this CLI.
사용법 예시
Section titled “사용법 예시”npm create studiocms@latest
pnpm create studiocms
yarn create studiocms
create-studiocms
는 기본적으로 대화형 모드로 실행되지만, 명령줄 인수를 사용하여 프로젝트 이름과 템플릿을 지정할 수도 있습니다.
npm create studiocms@latest -- --template studiocms/basics --project-name my-studiocms-project
pnpm create studiocms --template studiocms/basics --project-name my-studiocms-project
yarn create studiocms --template studiocms/basics --project-name my-studiocms-project
GitHub에서 제공되는 템플릿의 전체 목록^을 확인해 보세요.
--template
을 사용할 때 CLI는 템플릿 리포지토리의 모든 폴더를 검색합니다. 예를 들어, studiocms/basics
템플릿은 리포지토리 루트의 studiocms
폴더에 있는 basics
프로젝트를 가리킵니다.
명령어 알아보기
Section titled “명령어 알아보기”대화형 (기본 명령)
Section titled “대화형 (기본 명령)”Usage: create-studiocms interactive [options]
Start the interactive CLI. Powered by [clack](https://clack.cc).
This command will open an interactive CLI prompt to guide you throughthe process of creating a new StudioCMS(or StudioCMS Ecosystem package)project using one of the available templates.
Options: -t, --template <template> The template to use. -r, --template-ref <template-ref> The template reference to use. -p, --project-name <project-name> The name of the project. -i, --install Install dependencies. -g, --git Initialize a git repository. -y, --yes Skip all prompts and use default values. -n, --no Skip all prompts and use default values. -q, --skip-banners Skip all banners and messages. -d, --dry-run Do not perform any actions. -h, --help display help for command --do-not-install Do not install dependencies. --do-not-init-git Do not initializing a git repository.
get-turso
Section titled “get-turso”Turso의 문서^에 있는 스크립트를 사용하여 최신 버전의 Turso를 다운로드하고 설치합니다.
Usage: getTurso [options]
Turso CLI Installer
Options: -h, --help display help for command
@studiocms-upgrade
Section titled “@studiocms-upgrade”StudioCMS 설치 및 의존성을 업그레이드하기 위한 명령줄 도구입니다.
터미널에서 이 명령을 실행하여 StudioCMS를 업그레이드하는 동시에 공식 Astro 프로젝트와 통합을 함께 업그레이드할 수 있습니다.
사용법 예시
Section titled “사용법 예시”npx @studiocms/upgrade
pnpm dlx @studiocms/upgrade
yarn dlx @studiocms/upgrade
태그 (선택 사항)
Section titled “태그 (선택 사항)”특정 tag
를 전달하여 패키지를 해석할 수도 있습니다. 포함하지 않으면 @studiocms/upgrade
는 latest
태그를 찾습니다.
npx @studiocms/upgrade beta
pnpm dlx @studiocms/upgrade beta
yarn dlx @studiocms/upgrade beta