Welcome! In this repository, you'll find a simple example of how to write your first Book and run it using the Promptbook Engine via the CLI.
TODO: !!!!!! Merge Book and Next Getting Started
Follow these steps to get up and running:
First, clone this repository to your local machine.
Navigate to the root of the project and run the following command to install Promptbook:
npm i ptbk
Note: Currently, installation is supported only via NPM. We are actively working on adding support for other package managers and installer files such as .msi
, .rpm
, and .deb
.
Create a .env
file in the root of the project to configure the necessary API keys for the model providers you plan to use:
# You only need to configure one provider:
# OpenAI
OPENAI_API_KEY=sk-proj-...
# Anthropic Claude
ANTHROPIC_CLAUDE_API_KEY=sk-ant-api03-...
# Azure OpenAI
AZUREOPENAI_API_KEY=...
AZUREOPENAI_RESOURCE_NAME=...
AZUREOPENAI_DEPLOYMENT_NAME=...
From the root of the repository, execute the following command to run the example:
npx ptbk books/hello.book.md
If everything is set up correctly, you should see the following output:
$ npx ptbk books/hello.book.md
√ yourName ... The World
--- Result: ---
greeting: Hello World!
🚀✨ Congratulations! You've successfully created your first book with Promptbook! Now you can continue with the examples or the book language blueprint to dive deeper into the book language, integrate books into your app or create instant miniapps without classical programming.
This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.