https://github.com/tddschn/gitignore-cli-tddschn
https://github.com/tddschn/gitignore-cli-tddschn
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tddschn/gitignore-cli-tddschn
- Owner: tddschn
- Created: 2022-05-04T15:10:38.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-11T01:44:20.000Z (over 3 years ago)
- Last Synced: 2026-04-16T21:06:07.813Z (about 2 months ago)
- Language: Python
- Size: 104 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gitignore CLI
Fast gitignore CLI tool with cached templates
- [gitignore CLI](#gitignore-cli)
- [Features](#features)
- [Installation](#installation)
- [pipx](#pipx)
- [pip](#pip)
- [Usage](#usage)
- [Develop](#develop)
## Features
- Extremely fast - no network calls made if the cache has been retrieved with `gi --refresh`.
- [Templates source](https://github.com/toptal/gitignore), you can also set additional custom templates dir with `-c` or via `$GITIGNORE_CLI_TEMPLATE_DIR`.
## Installation
First make sure the `git` executable is installed and in your `$PATH`,
as it is required to retrieve the gitignore templates.
### pipx
This is the recommended installation method.
```
$ pipx install gitignore-cli-tddschn
```
### [pip](https://pypi.org/project/gitignore-cli-tddschn/)
```
$ pip install gitignore-cli-tddschn
```
## Usage
You can either invoke gitignore CLI with `gi` or `gitignore`.
```
$ gi -h
usage: gi [-h] [-c CUSTOM_TEMPLATES_DIR] [-o FILE] [-r] [-l] [-a] [-w] [TEMPLATES ...]
gitignore CLI
positional arguments:
TEMPLATES A positional argument (default: None)
options:
-h, --help show this help message and exit
-c CUSTOM_TEMPLATES_DIR, --custom-templates-dir CUSTOM_TEMPLATES_DIR
Custom templates dir, gitignore CLI will look for templates named *.gitignore in this dir first. Defaults to the value of
$GITIGNORE_CLI_TEMPLATE_DIR env var (default: /Users/tscp/.cache/gitignore-cli/gitignore-tddschn/templates)
-o FILE, --out FILE Output to file, append if exists, if -a or -w is not specified (default: <_io.TextIOWrapper name='' mode='w'
encoding='utf-8'>)
-r, --refresh Refresh gitignore cache (default: False)
-l, --list Lists available gitignore templates (default: False)
-a, --append Append to the .gitignore of current git repository (default: False)
-w, --write Write to the .gitignore of current git repository (overwrite) (default: False)
```
## Develop
```
$ git clone https://github.com/tddschn/gitignore-cli-tddschn.git
$ cd gitignore-cli-tddschn
$ poetry install
```