buddy

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

README

Buddy

This project is still in development and is not ready for use.
And will be subject to breaking changes often.

A CLI to help automate your development workflow.

Requirements

  • Go (>= 1.21)

Installation

go install github.com/dreadster3/buddy@latest

Usage

Initialization

Initialize a new project with buddy.

buddy init <project-name>

Or initialize an already existing project, which defaults the project name to the current directory name.

buddy init

This will generate an empty buddy.json file in the root of your project. Here is an example.

{
  "name": "<project-name>",
  "version": "0.0.1",
  "description": "A new buddy project",
  "author": "Anonymous",
  "scripts": {}
}

You can add scripts to the scripts object in the buddy.json file.

{
  "name": "<project-name>",
  "version": "0.0.1",
  "description": "A new buddy project",
  "author": "Anonymous",
  "scripts": {
    "start": "go run main.go",
    "build": "go build -o dist/main main.go",
    "test": "go test"
  }
}
Running scripts

You can run these scripts using the buddy run command.

buddy run <script-name> <args>

buddy <script-name> # Shorthand notation (cannot be used if it overlaps with existing `buddy` commands)

Use the buddy run --list command to list all the scripts in the buddy.json file.

buddy run --list
Get attribute from buddy.json

You can get the value of an attribute from the buddy.json file using the buddy get command.

buddy get <attribute-name>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL