yosi.ai
Version:
AI-powered code generation tool using Google's Gemini API
214 lines (147 loc) • 6.43 kB
Markdown
# Use Cases for yosi.ai
This guide covers common use cases for yosi.ai in different development scenarios.
## Table of Contents
- [Web Development](#web-development)
- [Backend Development](#backend-development)
- [Mobile Development](#mobile-development)
- [Data Science](#data-science)
- [DevOps](#devops)
- [Testing](#testing)
- [Learning New Technologies](#learning-new-technologies)
- [Prototyping](#prototyping)
## Web Development
### Generate React Components
```bash
# Generate a basic component
yosi "create a React component named Header with logo and navigation" --output Header.jsx
# Generate a form component
yosi advanced "create a React form component for user registration with validation" --framework react --language jsx --output RegisterForm.jsx
# Generate a custom hook
yosi --language typescript "create a React hook for managing form state" --output useForm.ts
```
### Generate CSS/SCSS
```bash
# Generate CSS for a component
yosi --language css "create CSS styles for a responsive navigation bar" --output navbar.css
# Generate SCSS with variables and mixins
yosi --language scss "create SCSS styles for a card component with different themes" --output card.scss
```
### Generate JavaScript Utilities
```bash
# Generate a date formatting utility
yosi "create a utility function to format dates in different formats" --output dateUtils.js
# Generate a validation library
yosi "create a validation library for email, password, and phone numbers" --output validators.js
```
## Backend Development
### Generate API Endpoints
```bash
# Generate a REST API endpoint
yosi advanced "create an Express.js API endpoint for user authentication" --framework express --output auth.js
# Generate a GraphQL resolver
yosi "create a GraphQL resolver for querying and mutating user data" --output userResolver.js
```
### Generate Database Models
```bash
# Generate a Mongoose model
yosi "create a Mongoose schema and model for a blog post" --output Post.js
# Generate a Sequelize model
yosi "create a Sequelize model for a product with associations" --output Product.js
```
### Generate Server Configuration
```bash
# Generate a Node.js server setup
yosi "create a Node.js server configuration with Express, CORS, and error handling" --output server.js
# Generate a middleware
yosi "create an authentication middleware for JWT verification" --output authMiddleware.js
```
## Mobile Development
### Generate React Native Components
```bash
# Generate a React Native screen
yosi advanced "create a React Native screen for user profile with styling" --framework "react native" --output ProfileScreen.js
# Generate a navigation setup
yosi advanced "create a React Native navigation setup with tab and stack navigators" --framework "react native" --output Navigation.js
```
### Generate Native Code
```bash
# Generate Swift code for iOS
yosi --language swift "create a Swift view controller for a login screen" --output LoginViewController.swift
# Generate Kotlin code for Android
yosi --language kotlin "create a Kotlin activity for a settings screen" --output SettingsActivity.kt
```
## Data Science
### Generate Data Processing Scripts
```bash
# Generate a Python script for data cleaning
yosi --language python "create a Python script to clean and preprocess CSV data" --output data_cleaner.py
# Generate a data visualization script
yosi --language python "create a Python script using matplotlib to visualize sales data" --output visualize_sales.py
```
### Generate Machine Learning Code
```bash
# Generate a model training script
yosi --language python "create a Python script to train a classification model using scikit-learn" --output train_model.py
# Generate a model evaluation script
yosi --language python "create a Python script to evaluate a machine learning model with cross-validation" --output evaluate_model.py
```
## DevOps
### Generate Configuration Files
```bash
# Generate a Docker configuration
yosi --language dockerfile "create a Dockerfile for a Node.js application" --output Dockerfile
# Generate a GitHub Actions workflow
yosi --language yaml "create a GitHub Actions workflow for CI/CD of a Node.js app" --output .github/workflows/ci.yml
```
### Generate Shell Scripts
```bash
# Generate a deployment script
yosi --language bash "create a bash script to deploy an application to a server" --output deploy.sh
# Generate a backup script
yosi --language bash "create a bash script to backup a database" --output backup.sh
```
## Testing
### Generate Unit Tests
```bash
# Generate Jest tests for a React component
yosi advanced "create Jest tests for a Button component with different states" --framework jest --language javascript --output Button.test.js
# Generate Mocha tests for an API
yosi --language javascript "create Mocha tests for user authentication API endpoints" --output auth.test.js
```
### Generate E2E Tests
```bash
# Generate Cypress tests
yosi --language javascript "create Cypress tests for a user registration flow" --output register.spec.js
# Generate Selenium tests
yosi --language python "create Selenium tests for a login page" --output test_login.py
```
## Learning New Technologies
### Generate Example Code
```bash
# Generate a React hooks example
yosi "create an example of React hooks (useState, useEffect, useContext)" --output hooks-example.jsx
# Generate a GraphQL example
yosi "create an example of a GraphQL server with Apollo" --output graphql-example.js
```
### Generate Tutorial Code
```bash
# Generate a step-by-step tutorial
yosi --language markdown "create a tutorial on building a REST API with Node.js and Express" --output rest-api-tutorial.md
# Generate code snippets for a tutorial
yosi "create code snippets for a tutorial on React state management" --output state-management-snippets.js
```
## Prototyping
### Generate MVP Components
```bash
# Generate a quick prototype
yosi advanced "create a React dashboard with charts and tables" --framework react --language jsx --output Dashboard.jsx
# Generate a landing page
yosi --language html "create an HTML landing page with CSS for a SaaS product" --output landing.html
```
### Generate Mockups
```bash
# Generate API mock data
yosi --language json "create mock data for a user API with 10 sample users" --output mock-users.json
# Generate a mock service
yosi "create a mock service for simulating API responses" --output mockService.js
```