Command Reference

create

Scaffold a new Mini App project.

minikit-cli create [project-name] [options]
OptionDescription
--no-installSkip installing dependencies
--project-dir Parent directory for the scaffolded project
minikit-cli create my-app
minikit-cli create my-app --no-install
minikit-cli create my-app --project-dir /tmp/scaffolds --no-install

When Auth is selected, the following files are added or modified during the create operation.

File/DirectoryAdded/ModifiedPurpose & Change
src/bridge/handlers/get-auth-code.tsAddedGPBase.getAuthCode bridge handler
src/hooks/useAuthCode.tsAdded (conditional)Custom hook for auth code. Only added with "fetch before render" option
src/api/fetch-user-data.tsAdded (conditional)API layer for user data. Only added with "fetch before render" option
src/pages/home.tsxModifiedAdds an auth handler demo; fully replaced in fetch-before-render mode
src/pages/layout.tsxModifiedCalls useAuthCode() and logs result in development when fetch-before-render is enabled

JSAPIs Commands

Below are the commands for adding and removing JSAPIs. Refer to view the complete list of available JSAPIs and learn more about each one

Note: className represents the category and starts with the GP prefix. methodName represents the main function being invoked.

jsbridge:add

Add a Host App method to call from your Mini App.

minikit-cli jsbridge:add [className] [methodName] [options]
ArgumentFormatExample
classNamePascalCaseGPAuth, GPWallet
methodNamecamelCasegetToken, getBalance

Both arguments are optional — omit either to be prompted.

OptionAliasDescription
--cache-cCache the result for the session lifetime
minikit-cli jsbridge:add
minikit-cli jsbridge:add GPAuth getToken --cache
File/DirectoryAdded/ModifiedPurpose & Change
src/bridge/AddedCore JSBridge module for native communication
src/bridge/handlers/AddedAll bridge handler files (device.ts, and more added by features)

jsbridge:remove

Remove a previously added JS Bridge method and its generated hook.

minikit-cli jsbridge:remove [className] [methodName]

Both arguments are optional — omit either to pick from a list.

minikit-cli jsbridge:remove
minikit-cli jsbridge:remove GPAuth getToken

i18n:add

Add multi-language support.

minikit-cli i18n:add [options]
OptionValuesDescription
--sourcejsonTranslation source. Omit to be prompted.
minikit-cli i18n:add
File/DirectoryAdded/ModifiedPurpose & Change
src/constants/locale.tsAddedSupported locales configuration
project.inlang/AddedInlang project configuration for managing translations
messages/AddedParaglide message catalogs for storing translations
src/globals.d.tsModifiedAdds i18n type definitions
src/bridge/types.tsModifiedAdds Locale and LocaleResponse types for bridge communication
src/bridge/index.tsModifiedRegisters GPBase.getLocale bridge handler
vite.config.tsModifiedAdds Paraglide Vite plugin for compilation
package.jsonModifiedAdds compile:messages script and @inlang/paraglide-js dependency
src/pages/layout.tsxModifiedSynchronizes active locale on app load

snap:add

Add Snap Checkout (Midtrans) payment integration.

minikit-cli snap:add
File/DirectoryAdded/ModifiedPurpose & Change
src/snap-checkout/AddedSnap Checkout integration module directory
src/snap-checkout/fetch-request.tsAddedRequest fetching logic for Snap API
src/snap-checkout/use-fetch-request.tsAddedCustom hook for managing fetch requests
src/snap-checkout/types.tsAddedTypeScript type definitions for Snap Checkout
src/snap-checkout/snap-checkout.tsxAddedMain Snap Checkout component
src/snap-checkout/index.tsAddedModule exports for Snap Checkout
src/pages/snap-checkout.tsxAddedPage component for Snap Checkout flow
src/pages/routes.tsModifiedRegisters the /snap-checkout route
src/pages/home.tsxModifiedAdds CTA (Call-to-Action) linking to /snap-checkout
.env.exampleModifiedAdds VITE_MIDTRANS_SNAPJS_URL and VITE_MIDTRANS_CLIENT_KEY
src/vite-env.d.tsModifiedAdds TypeScript types for Midtrans environment variables

vconsole:add

Add vConsole, an in-app debug panel.

minikit-cli vconsole:add
File/DirectoryAdded/ModifiedPurpose & Change
src/debug/vconsole.tsAddedvConsole initialization and setup logic
src/main.tsxModifiedImports and calls initVConsole() before app renders
package.jsonModifiedAdds vconsole npm dependency
.env.exampleModifiedAdds VITE_ENABLE_VCONSOLE environment variable
src/vite-env.d.tsModifiedAdds TypeScript type definition for VITE_ENABLE_VCONSOLE

update

Update the MiniKit CLI itself to the latest published version.

minikit-cli update [options]
OptionDescription
--checkReport current vs. latest version without installing
--tag dist-tag to resolve. Defaults to beta for prerelease installs, latest for stable.
minikit-cli update
minikit-cli update --check
minikit-cli update --tag latest

Run minikit-cli migrate inside each project after updating, to apply project-level migrations.


docs

List or search documentation links.

minikit-cli docs [keyword]
minikit-cli docs

Search is case-insensitive, matches document names and titles.


--help

Every command supports --help for inline usage info:

minikit-cli --help
minikit-cli create --help
minikit-cli jsbridge:add --help
minikit-cli i18n:add --help
minikit-cli litmus:add --help