promptlineapp 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -0
- package/bin/cli.js +1911 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# create-promptline-app
|
|
2
|
+
|
|
3
|
+
Create AI-powered applications with [PromptLine](https://promptlineops.com) - no configuration needed.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx create-promptline-app my-app
|
|
9
|
+
cd my-app
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
That's it! You now have a fully-configured PromptLine package ready for development.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
### Interactive Mode (Recommended)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx create-promptline-app my-app
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
You'll be prompted for:
|
|
23
|
+
- Display name
|
|
24
|
+
- Description
|
|
25
|
+
- Brand color
|
|
26
|
+
- Contact email
|
|
27
|
+
- Template preset
|
|
28
|
+
|
|
29
|
+
### Non-Interactive Mode
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx create-promptline-app my-app --yes
|
|
33
|
+
npx create-promptline-app my-app --preset saas -y
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Template Presets
|
|
37
|
+
|
|
38
|
+
| Preset | Description | Best For |
|
|
39
|
+
|--------|-------------|----------|
|
|
40
|
+
| `contact` | Landing page + contact form + dashboard | Marketing sites, lead generation |
|
|
41
|
+
| `saas` | Full app with auth, dashboard, settings | SaaS products, internal tools |
|
|
42
|
+
| `api` | Minimal frontend, backend-focused | API services, integrations |
|
|
43
|
+
| `blank` | Empty template | Custom builds from scratch |
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx create-promptline-app my-app --preset saas
|
|
47
|
+
npx create-promptline-app my-api --preset api
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## What You Get
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
my-app/
|
|
54
|
+
├── public/ # Public pages (no auth required)
|
|
55
|
+
│ └── index.tsx # Landing page
|
|
56
|
+
├── private/ # Protected pages (auth required)
|
|
57
|
+
│ ├── dashboard.tsx # Dashboard
|
|
58
|
+
│ └── settings.tsx # Settings
|
|
59
|
+
├── backend/ # Custom API endpoints (FastAPI)
|
|
60
|
+
│ └── api.py
|
|
61
|
+
├── assets/ # Static files
|
|
62
|
+
├── promptline.yaml # Package configuration
|
|
63
|
+
├── README.md
|
|
64
|
+
└── .gitignore
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Configuration
|
|
68
|
+
|
|
69
|
+
Your app is configured via `promptline.yaml`:
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
name: "My App"
|
|
73
|
+
version: "1.0.0"
|
|
74
|
+
|
|
75
|
+
# Connect AI prompts/agents
|
|
76
|
+
ai_sources:
|
|
77
|
+
main:
|
|
78
|
+
type: prompt
|
|
79
|
+
source_id: null # Set in Creator Studio
|
|
80
|
+
|
|
81
|
+
# Define data models
|
|
82
|
+
collections:
|
|
83
|
+
submissions:
|
|
84
|
+
fields:
|
|
85
|
+
- name: email
|
|
86
|
+
type: email
|
|
87
|
+
required: true
|
|
88
|
+
|
|
89
|
+
# Instance variables
|
|
90
|
+
variables:
|
|
91
|
+
app_name:
|
|
92
|
+
type: string
|
|
93
|
+
default: "My App"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## SDK Usage
|
|
97
|
+
|
|
98
|
+
In your React pages:
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
import { usePromptLine } from '@promptline/sdk'
|
|
102
|
+
|
|
103
|
+
export default function MyPage() {
|
|
104
|
+
const { config, submitForm, callAI, user } = usePromptLine()
|
|
105
|
+
|
|
106
|
+
// Access instance config
|
|
107
|
+
const appName = config.app_name
|
|
108
|
+
|
|
109
|
+
// Submit data
|
|
110
|
+
await submitForm('submissions', { email: 'user@example.com' })
|
|
111
|
+
|
|
112
|
+
// Call AI
|
|
113
|
+
const result = await callAI('main', { text: 'Hello!' })
|
|
114
|
+
|
|
115
|
+
return <h1 style={{ color: config.primary_color }}>{appName}</h1>
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Deployment
|
|
120
|
+
|
|
121
|
+
1. **Upload** - Zip your package and upload to [PromptLine Creator Studio](https://app.promptlineops.com/apps/creator)
|
|
122
|
+
2. **Configure** - Connect your AI sources and set variables
|
|
123
|
+
3. **Publish** - Deploy to your users or the App Store
|
|
124
|
+
|
|
125
|
+
## Documentation
|
|
126
|
+
|
|
127
|
+
- [Package Development Guide](https://docs.promptlineops.com/packages)
|
|
128
|
+
- [SDK Reference](https://docs.promptlineops.com/sdk)
|
|
129
|
+
- [API Endpoints](https://docs.promptlineops.com/packages/backend)
|
|
130
|
+
|
|
131
|
+
## Requirements
|
|
132
|
+
|
|
133
|
+
- Node.js 16+
|
|
134
|
+
- npm or yarn
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
MIT - [PromptLine](https://promptlineops.com)
|