ai-todo-app v1.0.6
AI-Powered TODO CLI with Gemini šš¤
A smart command-line TODO list manager powered by Google Gemini AI, featuring natural language understanding and persistent storage with PostgreSQL.
Features āØ
- š§ AI-Powered Task Management - Interact using natural language
- š CRUD Operations - Create, Read, Update, Delete todos
- š Smart Search - Fuzzy search using ILIKE queries
- š¾ Persistent Storage - PostgreSQL database with Drizzle ORM
- š Conversational Workflow - PLAN ā ACTION ā OBSERVATION pattern
- š Type Safe - Built with modern Javascript practices
Get Started š
A CLI todo application powered by Google's Gemini AI and PostgreSQL.
To use App follow the below steps: 1. Create a new directory and navigate to it:
mkdir my-todo-app
cd my-todo-app
- Create a
.env
file:
echo "GOOGLE_API_KEY=your-gemini-api-key-here" > .env
echo "DATABASE_URL=your-postgresql-url-here" >> .env
- Install and run the packages:
npm i ai-todo-app
npx ai-todo-app
or
#you can install package globally
npm i -g ai-todo-app
ai-todo-app
Or run it directly with environment variables:
GOOGLE_API_KEY=your-gemini-api-key-here DATABASE_URL=your-postgresql-url-here npx ai-todo-app
Getting the Required Keys
Gemini API Key: Get your key from Google AI Studio
PostgreSQL Database URL: You can either:
- Use a local PostgreSQL installation:
postgresql://username:password@localhost:5432/database_name
- Use a cloud service like Supabase, Railway, or Render
- Format:
postgresql://username:password@host:port/database_name
- Use a local PostgreSQL installation:
CLI Output will look like this:
>> hey who are you?
š¤: Hello! I am your Personal TODO Handler. How can I help you today?
>> can you tell me any todo left for me to do?
š¤: Currently, there are no tasks in your to-do list.
>> can you add one task as i have to debug the code for AI.
š¤: The task "debug the code for AI" has been added to your to-do list.
>> can i see the list of all my tasks
š¤: Your to-do list:
- debug the code for AI
>> ohk thank you!
š¤: You're welcome! Is there anything else I can assist you with?
Now you can start interacting with the AI-powered TODO app!
Tech Stack š ļø
Component | Technology |
---|---|
AI Engine | Google Gemini 1.5 Flash |
Backend | Node.js + Javascript |
Database | PostgreSQL + Drizzle ORM |
Package Manager | pnpm |
CLI Interface | readline-sync |
Prerequisites š
- Node.js v18+
- PostgreSQL 14+
- Google Gemini API key
- pnpm (
npm install -g pnpm
)
Installation ā”
- Clone the repository
git clone https://github.com/SAHIL-Sharma21/Ai-Todo-App.git
cd Ai-Todo-App
- Install dependencies
pnpm install
- Configure environment variables
cp .env.example .env
Edit the .env
file with your Google Gemini API key.
GOOGLE_API_KEY=YOUR_API_KEY
DATABASE_URL=postgresql://user:password@localhost:5431/postgres
- Database setup
pnpm generate
pnpm migrate
pnpm studio #to open the drizzle studio
Usage š
- Run the application
pnpm start
Example Interactions:
>> "Add buy milk to my shopping list"
š¤: Your todo has been added successfully!
>> "Show all my shopping tasks"
š¤: Here are your matching todos:
1. [ID: 5] Buy milk for weekly shopping
2. [ID: 8] Purchase new shopping bags
>> "Delete task number 5"
š¤: Todo ID 5 has been deleted
Contributing š¤
Fork the repository
Install dependencies with pnpm install
Create your feature branch (
git checkout -b feature/amazing-feature
)Commit your changes
Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
License š
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments š
- Google Gemini API team
- Drizzle ORM maintainers
- OpenAI for initial inspiration
Contact š§
If you have any questions or feedback, please don't hesitate to reach out to me at SAHIL-Sharma21