Skip to content

Commit 804854e

Browse files
committed
feat: add more example templates
1 parent 0162552 commit 804854e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2386
-0
lines changed

examples/with-ai/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DISCORD_TOKEN="DISCORD_TOKEN"
2+
GOOGLE_API_KEY="GOOGLE_API_KEY"
3+
CLIPDROP_API_KEY="CLIPDROP_API_KEY"

examples/with-ai/.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store
35+
36+
# CommandKit
37+
.commandkit
38+
dist
39+
40+
*.db*

examples/with-ai/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Under Ctrl
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

examples/with-ai/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Agent 🤖
2+
3+
Agent is an advanced AI-powered Discord bot built with [CommandKit](https://commandkit.dev/) that leverages natural language processing to provide an intuitive and powerful interaction experience. Built with modern technologies, it offers a seamless way to manage Discord servers and engage with communities through various features.
4+
5+
## ✨ Features
6+
7+
- **Natural Language Commands**: Interact with the bot using everyday language
8+
- **Channel Management**: Create and manage Discord channels effortlessly
9+
- **Interactive Polls**: Create and manage polls with natural language inputs
10+
- **AI Image Generation**: Generate images from text descriptions using Clipdrop API
11+
- **Smart Chatbot**: Engage in natural conversations with context awareness
12+
- **Google AI Integration**: Leverage Google's AI capabilities for enhanced features
13+
14+
> [!NOTE]
15+
> This repository is just a simple example of what can be built with Agent. The actual implementation may vary based on your specific needs and requirements.
16+
17+
> Did you know that this project was vibe coded? 🤖 You can do that yourself by utilizing https://commandkit.dev/llms.txt in your code editor such as Cursor.
18+
19+
## 🚀 Getting Started
20+
21+
### Prerequisites
22+
23+
- [Node.js](https://nodejs.org/) (v22 or higher)
24+
- A Discord bot token
25+
- Google API key
26+
- Clipdrop API key
27+
28+
### Installation
29+
30+
1. Clone the repository:
31+
32+
```bash
33+
git clone https://github.com/underctrl-io/agent.git
34+
cd agent
35+
```
36+
37+
2. Install dependencies:
38+
39+
```bash
40+
npm install
41+
```
42+
43+
3. Configure environment variables:
44+
Create a `.env` file in the root directory with the following variables:
45+
46+
```env
47+
DISCORD_TOKEN="your_discord_token"
48+
GOOGLE_API_KEY="your_google_api_key"
49+
CLIPDROP_API_KEY="your_clipdrop_api_key"
50+
```
51+
52+
You can obtain the required API keys from:
53+
54+
- Discord Token: [Discord Developer Portal](https://discord.com/developers/applications)
55+
- Google API Key: [Google AI Studio](https://aistudio.google.com/apikey)
56+
- Clipdrop API Key: [Clipdrop API Documentation](https://clipdrop.co/apis/docs/text-to-image)
57+
58+
4. Start the bot:
59+
60+
```bash
61+
npm run dev
62+
```
63+
64+
## 🎯 Features Showcase
65+
66+
### Natural Language Poll Creation
67+
68+
Create polls using everyday language. The bot understands context and can handle follow-up questions naturally.
69+
70+
![Create poll with natural language](./assets/create-poll.png)
71+
![Create poll with natural language](./assets/create-poll-2.png)
72+
73+
### AI Image Generation
74+
75+
Generate images from text descriptions using natural language prompts.
76+
77+
![Generate image with natural language](./assets/image-generation.png)
78+
79+
### Context-Aware Chatbot
80+
81+
Engage in natural conversations with the bot that maintains context and provides relevant responses.
82+
83+
![Chatbot](./assets/chatbot.png)
84+
85+
## 🤝 Contributing
86+
87+
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
88+
89+
1. Fork the repository
90+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
91+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
92+
4. Push to the branch (`git push origin feature/AmazingFeature`)
93+
5. Open a Pull Request
94+
95+
## 🙏 Acknowledgments
96+
97+
- [Discord.js](https://discord.js.org/) for the Discord API wrapper
98+
- [CommandKit](https://commandkit.dev/) for the Discord.js framework with AI capabilities
99+
- [Google AI](https://ai.google/) for generative AI models
100+
- [Clipdrop](https://clipdrop.co/) for image generation API
110 KB
Loading
74 KB
Loading
105 KB
Loading
240 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference path="node_modules/commandkit-types/index.d.ts" />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'commandkit/config';
2+
import { ai } from '@commandkit/ai';
3+
import { tasks } from '@commandkit/tasks';
4+
5+
export default defineConfig({
6+
plugins: [ai(), tasks()],
7+
});

0 commit comments

Comments
 (0)