https://github.com/pbrisbin/get-netrc
Read values out of ~/.netrc
https://github.com/pbrisbin/get-netrc
Last synced: 4 months ago
JSON representation
Read values out of ~/.netrc
- Host: GitHub
- URL: https://github.com/pbrisbin/get-netrc
- Owner: pbrisbin
- License: mit
- Created: 2016-12-10T20:09:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-21T18:04:34.000Z (over 6 years ago)
- Last Synced: 2025-01-03T16:30:02.806Z (5 months ago)
- Language: Haskell
- Homepage:
- Size: 26.4 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage
```
Usage: get-netrc [-o|--output Field] [-f|--filter Field=value] [PATH]
Read credentials out of ~/.netrcAvailable options:
-h,--help Show this help text
-o,--output Field Fields to output
-f,--filter Field=value Filter the machines returned
PATH Alternate path to ~/.netrcAvailable fields: Name, Login, Password, Account
```**NOTE**: If you pass no `-o` flags, nothing will be output.
## Output Format
If there is exactly one result and you're outputting exactly one field, the
value is printed unadorned. This is to support this tool's primary use-case:
reading passwords into other tools. Otherwise each field is shown as a single
line of the form `Field: value`If there are more than one result, each machine will be numbered with its fields
shown indented below a heading:```
machine N
Field: value
Field: value
machine N
Field: value
Field: value
```**NOTE**: The numbers have no meaning, they're just indexes in the result list.
## GnuPG
`get-netrc PATH` will check for `PATH.gpg`. If found, it will invoke `gpg
--decrypt` and operate on its contents instead.## Install
```
git clone https://github.com/pbrisbin/get-netrc
cd get-netrc
stack install
```---
[LICENSE](./LICENSE) | [CHANGELOG](./CHANGELOG.md])