feat: WIP add mintlify docs

feature/docs
Travis Fischer 2024-06-09 01:26:33 -05:00
rodzic ba26ae713f
commit d37eda7123
12 zmienionych plików z 3429 dodań i 20 usunięć

49
docs/favicon.svg 100644
Wyświetl plik

@ -0,0 +1,49 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.95343 21.1394C4.89586 21.1304 2.25471 19.458 0.987296 16.2895C-0.280118 13.121 0.108924 9.16314 1.74363 5.61505C4.8012 5.62409 7.44235 7.29648 8.70976 10.465C9.97718 13.6335 9.58814 17.5914 7.95343 21.1394Z" fill="white"/>
<path d="M7.95343 21.1394C4.89586 21.1304 2.25471 19.458 0.987296 16.2895C-0.280118 13.121 0.108924 9.16314 1.74363 5.61505C4.8012 5.62409 7.44235 7.29648 8.70976 10.465C9.97718 13.6335 9.58814 17.5914 7.95343 21.1394Z" fill="url(#paint0_radial_101_2703)"/>
<path d="M7.95343 21.1394C4.89586 21.1304 2.25471 19.458 0.987296 16.2895C-0.280118 13.121 0.108924 9.16314 1.74363 5.61505C4.8012 5.62409 7.44235 7.29648 8.70976 10.465C9.97718 13.6335 9.58814 17.5914 7.95343 21.1394Z" fill="black" fill-opacity="0.5" style="mix-blend-mode:hard-light"/>
<path d="M7.95343 21.1394C4.89586 21.1304 2.25471 19.458 0.987296 16.2895C-0.280118 13.121 0.108924 9.16314 1.74363 5.61505C4.8012 5.62409 7.44235 7.29648 8.70976 10.465C9.97718 13.6335 9.58814 17.5914 7.95343 21.1394Z" fill="url(#paint1_linear_101_2703)" fill-opacity="0.5" style="mix-blend-mode:hard-light"/>
<path d="M8.68359 10.4755C9.94543 13.63 9.56145 17.5723 7.9354 21.1112C4.89702 21.0957 2.27411 19.4306 1.01347 16.279C-0.248375 13.1245 0.135612 9.18218 1.76165 5.64328C4.80004 5.65883 7.42295 7.32386 8.68359 10.4755Z" stroke="url(#paint2_linear_101_2703)" stroke-opacity="0.05" stroke-width="0.056338"/>
<path d="M7.31038 21.2574C11.3543 20.2215 14.8836 17.3754 16.6285 13.2361C18.3735 9.09671 17.9448 4.58749 15.8598 0.976291C11.8159 2.01214 8.2866 4.85826 6.54167 8.99762C4.79674 13.137 5.2254 17.6462 7.31038 21.2574Z" fill="white"/>
<path d="M7.31038 21.2574C11.3543 20.2215 14.8836 17.3754 16.6285 13.2361C18.3735 9.09671 17.9448 4.58749 15.8598 0.976291C11.8159 2.01214 8.2866 4.85826 6.54167 8.99762C4.79674 13.137 5.2254 17.6462 7.31038 21.2574Z" fill="url(#paint3_radial_101_2703)"/>
<path d="M16.6026 13.2251C14.8642 17.349 11.3512 20.1866 7.32411 21.2248C5.25257 17.624 4.82926 13.1324 6.56764 9.00855C8.30603 4.88472 11.819 2.04706 15.8461 1.00889C17.9176 4.60967 18.3409 9.10131 16.6026 13.2251Z" stroke="url(#paint4_linear_101_2703)" stroke-opacity="0.05" stroke-width="0.056338"/>
<path d="M7.23368 21.2069C9.78906 23.2373 13.2102 23.9506 16.5772 22.8141C19.9441 21.6775 22.5058 18.9445 23.7304 15.6382C21.175 13.6078 17.7538 12.8944 14.3869 14.031C11.0199 15.1676 8.45822 17.9006 7.23368 21.2069Z" fill="white"/>
<path d="M7.23368 21.2069C9.78906 23.2373 13.2102 23.9506 16.5772 22.8141C19.9441 21.6775 22.5058 18.9445 23.7304 15.6382C21.175 13.6078 17.7538 12.8944 14.3869 14.031C11.0199 15.1676 8.45822 17.9006 7.23368 21.2069Z" fill="url(#paint5_radial_101_2703)"/>
<path d="M7.23368 21.2069C9.78906 23.2373 13.2102 23.9506 16.5772 22.8141C19.9441 21.6775 22.5058 18.9445 23.7304 15.6382C21.175 13.6078 17.7538 12.8944 14.3869 14.031C11.0199 15.1676 8.45822 17.9006 7.23368 21.2069Z" fill="black" fill-opacity="0.2" style="mix-blend-mode:hard-light"/>
<path d="M7.23368 21.2069C9.78906 23.2373 13.2102 23.9506 16.5772 22.8141C19.9441 21.6775 22.5058 18.9445 23.7304 15.6382C21.175 13.6078 17.7538 12.8944 14.3869 14.031C11.0199 15.1676 8.45822 17.9006 7.23368 21.2069Z" fill="url(#paint6_linear_101_2703)" fill-opacity="0.5" style="mix-blend-mode:hard-light"/>
<path d="M16.5682 22.7874C13.2176 23.9184 9.81361 23.2124 7.2672 21.1975C8.49194 17.9068 11.0444 15.189 14.3959 14.0577C17.7465 12.9266 21.1504 13.6326 23.6968 15.6476C22.4721 18.9383 19.9196 21.656 16.5682 22.7874Z" stroke="url(#paint7_linear_101_2703)" stroke-opacity="0.05" stroke-width="0.056338"/>
<defs>
<radialGradient id="paint0_radial_101_2703" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(-3.00503 15.023) rotate(-10.029) scale(17.9572 17.784)">
<stop stop-color="#00B0BB"/>
<stop offset="1" stop-color="#00DB65"/>
</radialGradient>
<linearGradient id="paint1_linear_101_2703" x1="7.39036" y1="4.81308" x2="1.62975" y2="18.6894" gradientUnits="userSpaceOnUse">
<stop stop-color="#18E299"/>
<stop offset="1"/>
</linearGradient>
<linearGradient id="paint2_linear_101_2703" x1="7.94816" y1="8.01563" x2="1.7612" y2="18.746" gradientUnits="userSpaceOnUse">
<stop/>
<stop offset="1" stop-opacity="0"/>
</linearGradient>
<radialGradient id="paint3_radial_101_2703" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(8.11404 20.8822) rotate(-75.7542) scale(21.6246 23.7772)">
<stop stop-color="#00BBBB"/>
<stop offset="0.712616" stop-color="#00DB65"/>
</radialGradient>
<linearGradient id="paint4_linear_101_2703" x1="7.60205" y1="5.8709" x2="15.5561" y2="16.3719" gradientUnits="userSpaceOnUse">
<stop/>
<stop offset="1" stop-opacity="0"/>
</linearGradient>
<radialGradient id="paint5_radial_101_2703" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(7.84537 21.5181) rotate(-20.3525) scale(18.5603 17.32)">
<stop stop-color="#00B0BB"/>
<stop offset="1" stop-color="#00DB65"/>
</radialGradient>
<linearGradient id="paint6_linear_101_2703" x1="16.8078" y1="13.0071" x2="10.0409" y2="22.9937" gradientUnits="userSpaceOnUse">
<stop stop-color="#00B1BC"/>
<stop offset="1"/>
</linearGradient>
<linearGradient id="paint7_linear_101_2703" x1="16.8078" y1="13.0071" x2="14.1687" y2="23.841" gradientUnits="userSpaceOnUse">
<stop/>
<stop offset="1" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 5.3 KiB

71
docs/intro.mdx 100644
Wyświetl plik

@ -0,0 +1,71 @@
---
title: Introduction
description: 'Welcome to the home of your new documentation'
---
<img
className='block dark:hidden'
src='/images/hero-light.svg'
alt='Hero Light'
/>
<img
className='hidden dark:block'
src='/images/hero-dark.svg'
alt='Hero Dark'
/>
## Setting up
The first step to world-class documentation is setting up your editing environments.
<CardGroup cols={2}>
<Card
title='Edit Your Docs'
icon='pen-to-square'
href='https://mintlify.com/docs/quickstart'
>
Get your docs set up locally for easy development
</Card>
<Card
title='Preview Changes'
icon='image'
href='https://mintlify.com/docs/development'
>
Preview your changes before you push to make sure they're perfect
</Card>
</CardGroup>
## Make it yours
Update your docs to your brand and add valuable content for the best user conversion.
<CardGroup cols={2}>
<Card
title='Customize Style'
icon='palette'
href='https://mintlify.com/docs/settings/global'
>
Customize your docs to your company's colors and brands
</Card>
<Card
title='Reference APIs'
icon='code'
href='https://mintlify.com/docs/api-playground/openapi'
>
Automatically generate endpoints from an OpenAPI spec
</Card>
<Card
title='Add Components'
icon='screwdriver-wrench'
href='https://mintlify.com/docs/components/accordion'
>
Build interactive features and designs to guide your users
</Card>
<Card
title='Get Inspiration'
icon='stars'
href='https://mintlify.com/customers'
>
Check out our showcase of our favorite documentation
</Card>
</CardGroup>

Wyświetl plik

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 406 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 406 KiB

75
docs/mint.json 100644
Wyświetl plik

@ -0,0 +1,75 @@
{
"$schema": "https://mintlify.com/schema.json",
"name": "Agentic",
"logo": {
"dark": "/media/agentic-header.jpg",
"light": "/media/agentic-header.jpg"
},
"favicon": "/favicon.svg",
"colors": {
"primary": "#0D969D",
"light": "#13D3DC",
"dark": "#0D969D",
"anchors": {
"from": "#0D969D",
"to": "#13D3DC"
}
},
"topbarLinks": [
{
"name": "Twitter",
"url": "https://x.com/transitive_bs"
}
],
"topbarCtaButton": {
"name": "GitHub",
"url": "https://github.com/transitive-bullshit/agentic"
},
"anchors": [
{
"name": "Docs",
"icon": "book-open-cover",
"url": "/"
},
{
"name": "GitHub",
"icon": "github",
"url": "https://github.com/transitive-bullshit/agentic"
}
],
"navigation": [
{
"group": "Get Started",
"pages": [
"intro",
"quickstart",
"usage",
{
"group": "AI SDKs",
"pages": [
"sdks/langchain",
"sdks/llamaindex",
"sdks/vercel-ai",
"sdks/firebase-genkit",
"sdks/dexa-dexter"
]
}
]
},
{
"group": "Services",
"pages": ["services/weather"]
},
{
"group": "TS Reference",
"pages": ["ts/todo"]
}
],
"footerSocials": {
"x": "https://x.com/transitive_bs",
"github": "https://github.com/transitive-bullshit/agentic"
},
"seo": {
"indexHiddenPages": true
}
}

Wyświetl plik

@ -0,0 +1,84 @@
---
title: 'Quickstart'
description: 'Start building awesome documentation in under 5 minutes'
---
## Setup your development
Learn how to update your docs locally and and deploy them to the public.
### Edit and preview
<AccordionGroup>
<Accordion icon='github' title='Clone your docs locally'>
During the onboarding process, we created a repository on your Github with
your docs content. You can find this repository on our
[dashboard](https://dashboard.mintlify.com). To clone the repository
locally, follow these
[instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
in your terminal.
</Accordion>
<Accordion icon='rectangle-terminal' title='Preview changes'>
Previewing helps you make sure your changes look as intended. We built a
command line interface to render these changes locally. 1. Install the
[Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the
documentation changes locally with this command: ``` npm i -g mintlify ```
2. Run the following command at the root of your documentation (where
`mint.json` is): ``` mintlify dev ```
</Accordion>
</AccordionGroup>
### Deploy your changes
<AccordionGroup>
<Accordion icon='message-bot' title='Install our Github app'>
Our Github app automatically deploys your changes to your docs site, so you
don't need to manage deployments yourself. You can find the link to install on
your [dashboard](https://dashboard.mintlify.com). Once the bot has been
successfully installed, there should be a check mark next to the commit hash
of the repo.
</Accordion>
<Accordion icon='rocket' title='Push your changes'>
[Commit and push your changes to
Git](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository#about-git-push)
for your changes to update in your docs site. If you push and don't see that
the Github app successfully deployed your changes, you can also manually
update your docs through our [dashboard](https://dashboard.mintlify.com).
</Accordion>
</AccordionGroup>
## Update your docs
Add content directly in your files with MDX syntax and React components. You can use any of our components, or even build your own.
<CardGroup>
<Card title='Style Your Docs' icon='paintbrush' href='/settings/global'>
Add flair to your docs with personalized branding.
</Card>
<Card
title='Add API Endpoints'
icon='square-code'
href='/api-playground/configuration'
>
Implement your OpenAPI spec and enable API user interaction.
</Card>
<Card
title='Integrate Analytics'
icon='chart-mixed'
href='/analytics/supported-integrations'
>
Draw insights from user interactions with your documentation.
</Card>
<Card
title='Host on a Custom Domain'
icon='browser'
href='/settings/custom-domain/subdomain'
>
Keep your docs on your own website's subdomain.
</Card>
</CardGroup>

98
docs/usage.mdx 100644
Wyświetl plik

@ -0,0 +1,98 @@
---
title: 'Development'
description: 'Learn how to preview changes locally'
---
<Info>
**Prerequisite** You should have installed Node.js (version 18.10.0 or
higher).
</Info>
Step 1. Install Mintlify on your OS:
<CodeGroup>
```bash npm
npm i -g mintlify
```
```bash yarn
yarn global add mintlify
```
</CodeGroup>
Step 2. Go to the docs are located (where you can find `mint.json`) and run the following command:
```bash
mintlify dev
```
The documentation website is now available at `http://localhost:3000`.
### Custom Ports
Mintlify uses port 3000 by default. You can use the `--port` flag to customize the port Mintlify runs on. For example, use this command to run in port 3333:
```bash
mintlify dev --port 3333
```
You will see an error like this if you try to run Mintlify in a port that's already taken:
```md
Error: listen EADDRINUSE: address already in use :::3000
```
## Mintlify Versions
Each CLI is linked to a specific version of Mintlify. Please update the CLI if your local website looks different than production.
<CodeGroup>
```bash npm
npm i -g mintlify@latest
```
```bash yarn
yarn global upgrade mintlify
```
</CodeGroup>
## Deployment
<Tip>
Unlimited editors available under the [Startup
Plan](https://mintlify.com/pricing)
</Tip>
You should see the following if the deploy successfully went through:
<Frame>
<img src='/images/checks-passed.png' style={{ borderRadius: '0.5rem' }} />
</Frame>
## Troubleshooting
Here's how to solve some common problems when working with the CLI.
<AccordionGroup>
<Accordion title="Mintlify is not loading">
Update to Node v18. Run `mintlify install` and try again.
</Accordion>
<Accordion title="No such file or directory on Windows">
Go to the `C:/Users/Username/.mintlify/` directory and remove the `mint`
folder. Then Open the Git Bash in this location and run `git clone
https://github.com/mintlify/mint.git`.
Repeat step 3.
</Accordion>
<Accordion title="Getting an unknown error">
Try navigating to the root of your device and delete the ~/.mintlify folder.
Then run `mintlify dev` again.
</Accordion>
</AccordionGroup>
Curious about what changed in a CLI version? [Check out the CLI changelog.](/changelog/command-line)

Wyświetl plik

@ -78,6 +78,10 @@
"pretest": "run-s build",
"prepare": "husky",
"precommit": "lint-staged",
"docs": "run-s docs:*",
"docs:typedoc": "typedoc",
"docs:transform": "tsx bin/transform-docs.ts",
"predocs": "del docs/services docs/ts",
"test": "run-s test:*",
"test:format": "prettier --check \"**/*.{js,ts,tsx}\"",
"test:lint": "eslint .",
@ -118,6 +122,7 @@
"husky": "^9.0.11",
"lint-staged": "^15.2.5",
"llamaindex": "^0.3.16",
"mintlify": "^4.0.166",
"np": "^10.0.5",
"npm-run-all2": "^6.2.0",
"only-allow": "^1.2.1",
@ -128,6 +133,8 @@
"tsup": "^8.1.0",
"tsx": "^4.14.1",
"twitter-api-sdk": "^1.2.1",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "4.0.3",
"typescript": "^5.4.5",
"vitest": "2.0.0-beta.3"
},

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,5 +1,5 @@
<p align="center">
<img alt="Agentic" src="/media/agentic-header.jpg" width="308">
<img alt="Agentic" src="/docs/media/agentic-header.jpg" width="308">
</p>
<p align="center">

Wyświetl plik

@ -5,7 +5,7 @@ import { AIFunctionSet } from './ai-function-set.js'
import { createAIFunction } from './create-ai-function.js'
import { assert } from './utils.js'
export interface PrivateAIFunctionMetadata {
interface PrivateAIFunctionMetadata {
name: string
description: string
inputSchema: z.AnyZodObject

Wyświetl plik

@ -205,9 +205,7 @@ export namespace serper {
}
/**
* Lightweight wrapper around Serper for Google search.
*
* @see https://serper.dev
* Lightweight wrapper around [Serper](https://serper.dev) for Google search.
*/
export class SerperClient extends AIFunctionsProvider {
protected readonly ky: KyInstance

31
typedoc.json 100644
Wyświetl plik

@ -0,0 +1,31 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": [
"src/index.ts",
"src/sdks/ai-sdk.ts",
"src/sdks/dexter.ts",
"src/sdks/genkit.ts",
"src/sdks/langchain.ts",
"src/sdks/llamaindex.ts",
"src/services/twitter/index.ts",
"src/tools/calculator.ts",
"src/tools/e2b.ts"
],
"exclude": ["**/*.test.ts", "examples"],
"plugin": ["typedoc-plugin-markdown"],
"out": "./docs/ts",
"outputFileStrategy": "members",
"entryFileName": "index",
"fileExtension": ".mdx",
"hidePageHeader": true,
"hideBreadcrumbs": true,
"excludePrivate": true,
"excludeProtected": true,
"excludeExternals": true,
"excludeInternal": true,
"excludeGroups": false,
"preserveAnchorCasing": false,
"parametersFormat": "table",
"propertiesFormat": "table",
"typeDeclarationFormat": "table"
}