Moved cli and web directory into app dir

This commit is contained in:
Lucas
2026-01-02 12:27:03 -08:00
parent c9f5feb9cb
commit 3fba4355fe
12 changed files with 0 additions and 0 deletions

48
apps/cli/new/add.go Normal file
View File

@@ -0,0 +1,48 @@
package cli
import (
"bufio"
"fmt"
"os"
"strings"
"definitive-opencore/data"
"definitive-opensource/models"
)
func AddProject() error {
scanner := bufio.NewScanner(os.Stdin)
fmt.Print("GitHub repo URL: ")
scanner.Scan()
repo := strings.TrimSpace(scanner.Text())
fmt.Print("Project name: ")
scanner.Scan()
name := strings.TrimSpace(scanner.Text())
category, err := selectCategory(scanner)
if err != nil {
return err
}
platforms, err := selectPlatforms(scanner)
if err != nil {
return err
}
tags, err := selectTags(scanner)
if err != nil {
return err
}
entry := models.Application{
Name: name,
RepoURL: repo,
Category: category,
Platforms: platforms,
Tags: tags,
}
return data.AppendApplication(entry)
}