Categorygithub.com/kernle32dll/ew
repositorypackage
1.0.1
Repository: https://github.com/kernle32dll/ew.git
Documentation: pkg.go.dev

# README

Build Status GoDoc Go Report Card codecov

ew

ew - short for (run things) e(very)w(here) is a tool for grouping folders by tags, and executing tasks in all folders via these tags.

Quickstart

Grab the latest release, and put it in a executable path. (For Linux e.g. /usr/local/bin). If you want to get hands on, install Go, and check out the latest master branch.

Verify ew is working by executing ew version.

Now, you can either jump to any folder and get started tagging by calling ew tags add @mytag, or edit the ew config file by hand (see #Config below)

Now you can run arbitrary commands for this tag (and so in every configured folder):

ew @mytag cat go.mod

How to use

COMMANDDESCRIPTION
ewlist all paths, grouped by their tags
ew helpdisplays this help
ew --helpdisplays this help (alias for ew help)
ew versiondisplays version and build time (if applicable)
ew --versiondisplays version and build time (if applicable) (alias for ew version)
ew migratemigrate from mixu/gr config, and keep json format
ew migrate --yamlmigrate from mixu/gr config, and use new yaml format
ew pathslist all paths (alias for ew paths list)
ew paths listlist all paths
ew tagslist all tags (alias for ew tags list)
ew tags listlist all tags
ew tags add @some-tagadd current directory to tag "some-tag"
ew tags add \some\path @some-tagadd \some\path to tag "some-tag"
ew tags rm @some-tagadd current directory to tag "some-tag"
ew tags rm \some\path @some-tagadd \some\path to tag "some-tag"
ew statusshow quick git status for all paths
ew @tag1 statusshow quick git status for all paths of tag1 (supports multiple tags)
ew @tag1 some-cmdexecutes some-cmd in all paths of tag1 (supports multiple tags)

Examples

[bgerda@voidlight ~]$ ew @github status 
/home/bgerda/github-git/kernle32dll/emissione-go               master     Clean          @github     
/home/bgerda/github-git/kernle32dll/httpbulk-go                master     Clean          @github     
/home/bgerda/github-git/kernle32dll/jwtcache-go                master     Clean          @github     
/home/bgerda/github-git/kernle32dll/nullable                   master     Clean          @github     
/home/bgerda/github-git/kernle32dll/planlagt                   master     1 modified     @github     
/home/bgerda/github-git/kernle32dll/pooler-go                  master     Clean          @github     
/home/bgerda/github-git/kernle32dll/synchronized-cron-task     master     Clean          @github     
/home/bgerda/github-git/kernle32dll/turtleware                 master     Clean          @github
[bgerda@voidlight ~]$ ew @github git pull

in /home/bgerda/github-git/kernle32dll/emissione-go:

Already up to date.

in /home/bgerda/github-git/kernle32dll/httpbulk-go:

Already up to date.

in /home/bgerda/github-git/kernle32dll/jwtcache-go:

Already up to date.

in /home/bgerda/github-git/kernle32dll/nullable:

Already up to date.

in /home/bgerda/github-git/kernle32dll/planlagt:

Already up to date.

in /home/bgerda/github-git/kernle32dll/pooler-go:

Already up to date.

in /home/bgerda/github-git/kernle32dll/synchronized-cron-task:

Already up to date.

in /home/bgerda/github-git/kernle32dll/turtleware:

Already up to date.

Config

Per default, ew tries to loads its config from either ~/.ewconfig.yml or ~/.ewconfig.json. The default is ~/.ewconfig.yml, if you are migrating from gr its ~/.ewconfig.json.

The config file looks as follows:

~/.ewconfig.yml

tags:
  server:
  - /home/bgerda/tc-git/turtlecoding/common/server-common
  github:
  - /home/bgerda/github-git/kernle32dll/emissione-go
  - /home/bgerda/github-git/kernle32dll/httpbulk-go
  - /home/bgerda/github-git/kernle32dll/jwtcache-go
  - /home/bgerda/github-git/kernle32dll/nullable
  - /home/bgerda/github-git/kernle32dll/planlagt
  - /home/bgerda/github-git/kernle32dll/pooler-go
  - /home/bgerda/github-git/kernle32dll/synchronized-cron-task
  - /home/bgerda/github-git/kernle32dll/turtleware

~/.ewconfig.json

{
  "tags": {
    "server": [
      "/home/bgerda/tc-git/turtlecoding/common/server-common"
    ],
    "github": [
      "/home/bgerda/github-git/kernle32dll/emissione-go",
      "/home/bgerda/github-git/kernle32dll/httpbulk-go",
      "/home/bgerda/github-git/kernle32dll/jwtcache-go",
      "/home/bgerda/github-git/kernle32dll/nullable",
      "/home/bgerda/github-git/kernle32dll/planlagt",
      "/home/bgerda/github-git/kernle32dll/pooler-go",
      "/home/bgerda/github-git/kernle32dll/synchronized-cron-task",
      "/home/bgerda/github-git/kernle32dll/turtleware"
    ]
  }
}