Skip to content
/ ag Public

ag is a tool for defining an alias for a group of commands

Notifications You must be signed in to change notification settings

afraprg/ag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AG

GO Version TAG

Introduction

ag is a command line tool that similar to Makefile. with ag you can make an alias for group of commands with custom flags.

This tool is developed with golang.

Installation

You can download the latest version on the Release page, after download you must move the binary file to /usr/local/bin/ag .

Docker

In <your_config_path> you must create a .ag.yaml file

docker pull mostafahosseinime/ag
docker run -v <your_config_path>:/root -it mostafahosseinime/ag:latest <your_command>

Build from source

go build .
mv ag /usr/local/bin/ag

Config

for the first step you have to create a config file, In the file below I have created an example of a config, you can create a file with your custom config.

- name: glcp
  description: with this command you can create a goland project
  flags:
    - name: pn
      description: project name
      optional: false
      default: project 1
    - name: pt
      description: location
      optional: true
      default: "/Users/mostafahosseini/go/src/"
  cmds:
    - cd ${pt}
    - mkdir ${pn}
    - cd ${pn}
    - git init
    - touch main.go
    - git add .
    - goland .

after create the config file you must run the following command:

   $ ag init your_config.yaml

Run

after run init command with that config you can create a new golang project and finaly open in goland with this command:

   $ ag glcp --pn=example_project --pt=/users/mostafahosseini/go/src/example_project

also, I created an example file in this repository.

About

ag is a tool for defining an alias for a group of commands

Resources

Stars

Watchers

Forks

Packages

No packages published