Package Exports
- create-c1-app
- create-c1-app/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-c1-app) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Create C1 App
A powerful CLI tool that setups Generative UI examples with C1 by Thesys
Features
✨ Interactive Project Setup
Quick Start
# Run the tool
npx create-c1-app
# With project name
npx create-c1-app my-thesys-project
# With project name and options
npx create-c1-app my-thesys-project --template template-c1-component-next --api-key your-api-keyCLI Options
| Option | Alias | Description | Default |
|---|---|---|---|
[project-name] |
Name of the project to create (positional argument) | Interactive prompt | |
--project-name |
-n |
Name of the project to create (alternative to positional argument) | Interactive prompt |
--template |
-t |
Next.js template to use (template-c1-component-next or template-c1-next) |
Interactive prompt |
--api-key |
-k |
Thesys API key to use for the project | Interactive prompt |
--debug |
-d |
Enable debug logging | false |
--disable-telemetry |
Disable anonymous telemetry for current session | false |
Usage Examples
Basic Usage
# Interactive mode with OAuth authentication (recommended)
npx create-c1-app
# Quick setup with project name as positional argument
npx create-c1-app my-thesys-project
# Quick setup with project name, template, and API key
npx create-c1-app my-thesys-component --template template-c1-component-next --api-key your-api-key-here
# Using flag instead of positional argument
npx create-c1-app --project-name my-thesys-component --template template-c1-component-next --api-key your-api-key-here
# With specific template choice
npx create-c1-app my-project --template template-c1-next --api-key your-api-key-here
# Interactive with API key provided
npx create-c1-app --api-key your-api-key-hereDevelopment
Building from Source
git clone https://github.com/thesysdev/create-c1-app.git
cd create-c1-app
pnpm install
pnpm run build
pnpm linkAuthentication Options
Create C1 App supports two authentication methods:
Option 1: OAuth 2.0 Authentication (Recommended)
The CLI will automatically open your browser and guide you through the OAuth authentication process:
npx create-c1-appThis method will:
- Open your browser for secure authentication
- Generate an API key automatically after successful login
- Store the API key in your project's
.envfile
Option 2: Manual API Key
If you prefer to provide your API key manually or skip OAuth authentication:
npx create-c1-app --skip-authOr provide your existing API key directly:
npx create-c1-app --api-key your-api-key-hereGetting Your Thesys API Key (Manual Method)
To get an API key manually:
- 🌐 Visit: https://console.thesys.dev/keys
- 🔐 Sign in to your Thesys account
- 🆕 Click "Create New API Key"
- 📝 Give your key a descriptive name
- 📋 Copy the generated API key
💡 Tip: Keep your API key secure and never share it publicly!
Troubleshooting
Common Issues
Error: "Project directory already exists"
# Choose a different name or remove the existing directory
rm -rf existing-project-name
npx create-c1-appError: "Failed to download template"
# Check your internet connection and try again
npx create-c1-appError: "Failed to install dependencies"
# Navigate to your project and install manually
cd your-project-name
npm installDebug Mode
Enable debug logging for detailed troubleshooting:
npx create-c1-app --debugOr set the environment variable:
export CREATE_C1_APP_DEBUG=true
npx create-c1-appTelemetry
create-c1-app collects anonymous telemetry data to help improve the tool. No personally identifiable information is collected.
Managing Telemetry
# Disable for current session
npx create-c1-app --disable-telemetry
# Disable via environment variable
export CREATE_C1_APP_DISABLE_TELEMETRY=trueFor complete details about what data is collected and how to control it, see TELEMETRY.md.
License
MIT License - see LICENSE file for details.
Support
- 🐛 Issues
- 💬 Discussions
Made with ❤️ by Thesys