Task CLI is a command-line interface application designed to manage tasks efficiently. Built with Java and Spring Boot, it leverages an in-memory H2 database for persistence and provides a simple yet powerful way to handle task management.
- Task Management: Create, update, and delete tasks.
 - Task Status: Track task status (Pending, Completed).
 - Timestamping: Automatic creation timestamps for tasks.
 - In-Memory Database: Uses H2 for quick setup and testing.
 
- Java 17
 - Spring Boot 3.3.2
 - Spring Data JPA
 - Spring Shell
 - H2 Database
 - Maven
 
- Java 17 or higher
 - Maven
 
- 
Clone the repository:
git clone https://github.com/Sans-arch/task-cli cd task-cli - 
Build the project:
mvn clean install
 - 
Run the application:
mvn spring-boot:run
 
Once the application is running, you can use the CLI to manage tasks. Here are some basic commands:
- 
Create a new task:
task create "Your task description" - 
List all tasks:
task list
 - 
Get an existing task:
task get <task-id>
 - 
Update a task status:
task update <task-id> --status COMPLETED
 - 
Delete a task:
task delete <task-id>
 
The application uses an in-memory H2 database by default. You can configure the database settings in the src/main/resources/application.properties file.
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.jpa.hibernate.ddl-auto=update
spring.h2.console.enabled=true