DEV Community

inaba jun
inaba jun

Posted on

The tool to find and edit any tool's config file

When I want to edit fish configuration file, I always google like "fish config" or "fish fishrc".

But I made tool to solve it.

anyconf

https://github.com/inabajunmr/anyconf

Behavior

anyconf

Recommended system requirements

$ go version
go version go1.13.8 darwin/amd64
$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun  5 2020 21:30:37)
macOS version
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.7
BuildVersion:   19H114
Enter fullscreen mode Exit fullscreen mode

Install

go get github.com/inabajunmr/anyconf
Enter fullscreen mode Exit fullscreen mode

Usage

anyconf command shows supported tools like the following example.

$ anyconf
? What's next key?  [Use arrows to move, enter to select, type to filter]
> fish
  screen
  git
  aws
  bash
  curl
  npm
Enter fullscreen mode Exit fullscreen mode

And you can type and filter tools.

$ anyconf
? What's next key? g  [Use arrows to move, enter to select, type to filter]
> git
  wget
Enter fullscreen mode Exit fullscreen mode

After selection, the configuration file open by vim. (vim is the default, you can change it via anyconf configuration.)

Support new tools via Pull Request

The mapping tools and configuration files are managed by the following file.

https://github.com/inabajunmr/anyconf/blob/main/static/configs.txt

anyconf ~/.anyconf/configs.txt
aws/config ~/.aws/config
aws/credentials ~/.aws/credentials
bash/bash_profile ~/.bash_profile
bash/bashrc ~/.bashrc
+NEWTOOL ~/.newtool.conf
Enter fullscreen mode Exit fullscreen mode

You can send pull request if you want to apply NEWTOOL like this.
After merging it, anyconf support NEWTOOL.

Support new tools via Local Configuration

anyconf manages .anyconf/configs.txt and you can support your tool via the configuration.

If you put the following example to configuration, you can use NEWTOOL by anyconf.

NEWTOOL ~/.newtool.conf
Enter fullscreen mode Exit fullscreen mode

The configuration file can be opened via anyconf.

Conclusion

I made anyconf to find and edit any tools configuration.

But it supports only a few tools that I use yet so If I receive Pull Request for other tools, I'll be glad. Thank you.

Top comments (0)