@teamspirit/create-app v1.0.13
@teamspirit/create-app
A Command Line Interface (CLI) tool to quickly set up new TypeScript projects based on pre-defined Bitbucket boilerplates.
Features
- Interactive prompts for selecting boilerplates and entering credentials.
- Clones private Bitbucket repositories using HTTPS and app passwords.
- Supports multiple boilerplates configurable via
boilerplates.json
. - Allows specifying a custom output directory for the new project.
- Checks if the target directory already exists to prevent overwrites.
- Shows progress during the cloning stage.
Prerequisites
- Node.js (v14 or higher recommended)
- npm
- Git
- A Bitbucket account with access to the boilerplate repositories.
- A Bitbucket app password with Repositories: Read permissions.
Bitbucket App Password
It is strongly recommended to use a Bitbucket App Password instead of your main account password for security.
When creating the app password in Bitbucket, grant it the following permissions:
- Repositories:
Read
This is the minimum permission required for the tool to clone the boilerplate repositories.
Installation & Usage
The easiest way to use @teamspirit/create-app
is with npx
, which will download and run the latest version automatically:
npx @teamspirit/create-app
The CLI will then guide you through the following prompts:
- Select Boilerplate: Choose from the available boilerplates (e.g., "App Router", "Pages Router").
- These are defined in the
boilerplates.json
file within the package.
- These are defined in the
- Bitbucket Username: Enter your Bitbucket username.
- Bitbucket App Password: Enter your Bitbucket app password (input will be hidden).
- Project Name: Enter the desired name for your new project directory.
- Custom Output Directory?: Optionally specify a different parent directory for your new project.
- If yes, you'll be prompted to enter the path to the output directory.
Example Flow:
$ npx @teamspirit/create-app
? Which boilerplate do you want to use? āŗ App Router
? Enter your Bitbucket username: your_username
? Enter your Bitbucket app password: [hidden]
? Enter the name for your new project: my-awesome-app
? Do you want to specify a custom output directory? (Default: current directory) āŗ No
š Preparing to clone boilerplate...
š Cloning teamspiritdigital/nextjs-boilerplate-approuter into ./my-awesome-app
ā
Done! Your new app is ready in ./my-awesome-app
Project created successfully!
Next steps:
cd my-awesome-app
npm install (or yarn install)
npm start (or yarn start)
Configuration
Boilerplates (boilerplates.json
)
The available boilerplates are defined in a boilerplates.json
file that is packaged with this tool. It maps a user-friendly name to a Bitbucket repository path (without the .git
extension and Bitbucket domain).
Example boilerplates.json
:
{
"App Router": "yourteam/app-router-boilerplate",
"Pages Router": "yourteam/pages-router-boilerplate"
}
License
ISC