Skip to content

Initial Structure & Prototype#1

Merged
8bitAlex merged 46 commits into
mainfrom
alpha
Sep 4, 2025
Merged

Initial Structure & Prototype#1
8bitAlex merged 46 commits into
mainfrom
alpha

Conversation

@8bitAlex
Copy link
Copy Markdown
Owner

@8bitAlex 8bitAlex commented Sep 4, 2025

This pull request introduces foundational elements for the Raid project, including documentation, configuration schemas, example profiles, and initial code for building and running the CLI tool. The most important changes are grouped below by theme.

Project Setup and Build Automation

  • Added .github/workflows/build.yml to automate building and testing on multiple operating systems using GitHub Actions.
  • Added .github/workflows/codecov.yml for automated code coverage reporting with Codecov on pushes and pull requests.

Documentation and Contributor Guidelines

  • Created docs/CONTRIBUTING.md, a comprehensive guide for contributors covering setup, code style, testing, submitting changes, and community guidelines.
  • Added schemas/README.md describing the purpose and usage of JSON Schema files for validating Raid configuration files.

Configuration Schemas and Examples

  • Added schemas/raid-defs.schema.json for shared environment and task definitions, supporting shell/script tasks and environment variables.
  • Provided multiple example configuration files in YAML and JSON (docs/examples/env-demo.raid.yaml, docs/examples/example.raid.yaml, docs/examples/install-demo.raid.yaml, docs/examples/multiple-profiles.json, docs/examples/multiple-profiles.yaml, docs/examples/raid.yaml, docs/examples/hello.sh, raid.yaml) to demonstrate profile, environment, and repository setups. [1] [2] [3] [4] [5] [6] [7] [8]

Project Bootstrapping

  • Added go.mod to define the Go module and its dependencies, including libraries for CLI, configuration, and schema validation.
  • Added initial main.go to bootstrap the CLI application, invoking the command execution logic.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 4, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@8bitAlex 8bitAlex requested a review from Copilot September 4, 2025 05:07
@8bitAlex 8bitAlex merged commit 2ea0bcb into main Sep 4, 2025
6 checks passed
@8bitAlex 8bitAlex deleted the alpha branch September 4, 2025 05:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces foundational elements for the Raid project, establishing a CLI tool for orchestrating development tasks across distributed repositories. The PR sets up the core project structure, documentation, schemas, examples, and initial functionality for profile and repository management.

  • Project build automation with GitHub Actions for multi-platform testing and codecov integration
  • JSON schema definitions for validating profile and repository configurations
  • CLI commands for profile management (add, list, use, remove) and repository installation

Reviewed Changes

Copilot reviewed 37 out of 39 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
go.mod Defines Go module and dependencies
main.go Bootstraps CLI application
src/raid/raid.go Primary interface exposing core functionality
src/raid/profile/profile.go Public API for profile management
src/internal/lib/*.go Core implementation for configuration, profiles, and repositories
src/cmd/*.go CLI command implementations
schemas/*.json JSON schema definitions for validation
docs/examples/*.yaml Example configuration files
.github/workflows/*.yml CI/CD automation
docs/CONTRIBUTING.md Comprehensive contributor guidelines

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +35 to +43
func Set(key string, value any) {
viper.Set(key, value)
Write()
}

func Write() {
if err := viper.WriteConfig(); err != nil {
panic(err)
}
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using panic() for configuration write errors is inappropriate for a CLI application. Consider returning the error or logging it gracefully instead of crashing the entire application.

Suggested change
func Set(key string, value any) {
viper.Set(key, value)
Write()
}
func Write() {
if err := viper.WriteConfig(); err != nil {
panic(err)
}
func Set(key string, value any) error {
viper.Set(key, value)
return Write()
}
func Write() error {
if err := viper.WriteConfig(); err != nil {
return err
}
return nil

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +8
import "github.com/8bitalex/raid/src/internal/sys"

const (
ConfigDirName = ".raid"
ConfigFileName = "config.toml"
ConfigPathDefault = "~" + sys.Sep + ConfigDirName + sys.Sep + ConfigFileName
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String concatenation for path construction can be error-prone. Consider using filepath.Join() from the standard library for more reliable cross-platform path handling.

Suggested change
import "github.com/8bitalex/raid/src/internal/sys"
const (
ConfigDirName = ".raid"
ConfigFileName = "config.toml"
ConfigPathDefault = "~" + sys.Sep + ConfigDirName + sys.Sep + ConfigFileName
import (
"github.com/8bitalex/raid/src/internal/sys"
"path/filepath"
)
const (
ConfigDirName = ".raid"
ConfigFileName = "config.toml"
ConfigPathDefault = filepath.Join("~", ConfigDirName, ConfigFileName)

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +29
"concurrent": {
"ref": "#/concurrent"
}
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid JSON Schema reference syntax. Should use '$ref' instead of 'ref'. The correct syntax is '$ref': '#/$defs/concurrent'.

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +47
"concurrent": {
"ref": "#/concurrent"
}
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid JSON Schema reference syntax. Should use '$ref' instead of 'ref'. The correct syntax is '$ref': '#/$defs/concurrent'.

Copilot uses AI. Check for mistakes.
Comment thread src/cmd/profile/use.go
os.Exit(1)
}
fmt.Printf("Profile '%s' is now active.\n", name)
fmt.Print()
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty fmt.Print() call serves no purpose and should be removed.

Suggested change
fmt.Print()

Copilot uses AI. Check for mistakes.
Comment thread src/cmd/profile/remove.go
}
}

fmt.Print()
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty fmt.Print() call serves no purpose and should be removed.

Suggested change
fmt.Print()

Copilot uses AI. Check for mistakes.
Comment thread src/cmd/profile/list.go
}
fmt.Printf("\t%s%s\t%s\n", profile.Name, activeIndicator, profile.Path)
}
fmt.Print()
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty fmt.Print() call serves no purpose and should be removed.

Suggested change
fmt.Print()

Copilot uses AI. Check for mistakes.
Comment thread src/cmd/profile/add.go
}
fmt.Printf("Profiles:\n\t%s\nhave been successfully added from %s\n", strings.Join(names, ",\n\t"), path)
}
fmt.Print()
Copy link

Copilot AI Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty fmt.Print() call serves no purpose and should be removed.

Suggested change
fmt.Print()

Copilot uses AI. Check for mistakes.
@claude claude Bot mentioned this pull request Mar 14, 2026
This was referenced Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants