Guide › Setting up › Install in your app
Add the files
Puts Cognolo’s files into your app. You start it with a button on Setup; your developer accepts it.
- What it’s for
- Puts Cognolo’s files into your app: the button people click, the connection to Cognolo, and a place to keep conversations.
- Who does it
- You start it with a button on the Setup page. Your developer checks the result and accepts it. Or your developer runs one command instead.
- You’ll know it worked when
- Your developer has accepted (merged) the change, and the new files are in your app’s code.
Doing your part
- Open your app’s Setup page (the gear at the end of your app’s tabs, then Setup).
- Press Make the change. Cognolo writes the files for you. Nothing in your app changes yet.
- Open Changes, find Add Cognolo to this app, and read the checklist it shows.
- Send it to your developer with the button on that change. They check it, accept it into your app, and run the commands it lists.
Asking someone else to do it
Copy this and send it to your developer, or paste it into an AI coding assistant working in your app:
Cognolo has prepared a change that adds its files to our app (“Add Cognolo to this app”). Please review it, merge it, and work through its checklist. Or run `npx cognolo init` in the app’s folder instead, which does the same and can also add the assistant button. Details are in Cognolo’s guide, “Add the files”.
For your developer
The install writes Cognolo’s files into your app: the route the panel talks to, the panel, the one file you check, and the tables’ definitions. There are two ways to run it.
npx cognolo init or Make the change
Both write the same files and the same checklist. npx cognolo init runs in the app’s own folder, so it can see more:
npx cognolo init- Reads the app itself: whether it uses Prisma, Drizzle or plain SQL, whether its code is in
app/orsrc/app/, and its sign-in (Clerk, or Auth.js version 5). It adds the assistant button to your signed-in layout when it can tell which one that is. Then run lists the commands to run next. - Make the change
- Works from what Cognolo read about the app, without its folders. It assumes the code is in
app/(the checklist says to move the files if it’s undersrc/), fills in sign-in only for Clerk, and doesn’t add the button yet: the checklist says where it goes. After merging, run lists the commands.
What the install writes
lib/cognolo/assistant.ts- The one file to check: who the person is (
open), which tools they get (toolsFor), where conversations are saved, the model and the connection to Cognolo. app/api/assistant/route.ts- The one route the assistant’s panel talks to.
components/cognolo-assistant.tsx- The assistant’s button and panel.
- The tables
- Two models in
prisma/schema.prisma, orlib/cognolo/schema.tsfor Drizzle, ormigrations/cognolo.sqlfor plain SQL, depending on what the app uses. .env.example- The settings below, empty, so each environment knows what to fill in.
It writes new files only, adds the table definitions and settings to the end of the files that hold them, never runs a migration, and never guesses who your users are. The one existing file it may change is your signed-in layout, for the button.