Skip to content

Commit 6ca9359

Browse files
committed
Update README and add help command to CLI; bump version to 1.0.3
1 parent 899bfed commit 6ca9359

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

README.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Private version control for your Git ignored files.
44

5-
---
6-
75
## Why use GitGhost?
86

97
- **Keep sensitive files private:** Manage secrets, configs, or personal files outside your public repo.
@@ -12,16 +10,12 @@ Private version control for your Git ignored files.
1210
- **Separate private repo:** Keeps your private data secure and versioned.
1311
- **Cross-platform:** Designed for Linux, works on any system with Python 3.10+.
1412

15-
---
16-
1713
## Requirements
1814

1915
- Python 3.10 or higher
2016
- Git installed
2117
- GitHub CLI (`gh`) is required for private repo automation
2218

23-
---
24-
2519
## Installation
2620

2721
Install GitGhost directly from PyPI:
@@ -30,9 +24,7 @@ Install GitGhost directly from PyPI:
3024
pip install gitghost
3125
```
3226

33-
---
34-
35-
## Quick Start
27+
## Commands
3628

3729
Initialize GitGhost in your project:
3830

@@ -58,7 +50,11 @@ Discard private changes:
5850
gitghost discard
5951
```
6052

61-
---
53+
Get help and list all commands:
54+
55+
```bash
56+
gitghost help
57+
```
6258

6359
## How it works
6460

@@ -68,16 +64,12 @@ gitghost discard
6864
- `gitghost status` shows private file changes.
6965
- Keeps private data out of your public repo, but safely versioned.
7066

71-
---
72-
7367
## Links
7468

7569
- **PyPI:** [https://pypi.org/project/gitghost/](https://pypi.org/project/gitghost/)
7670
- **Source Code:** [https://github.com/decodingchris/gitghost](https://github.com/decodingchris/gitghost)
7771
- **Issue Tracker:** [https://github.com/decodingchris/gitghost/issues](https://github.com/decodingchris/gitghost/issues)
7872

79-
---
80-
8173
## License
8274

8375
This project is licensed under the **MIT License**. See the [LICENSE](https://opensource.org/licenses/MIT) file for details.

gitghost/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@ def block_present(content):
301301
with open(gitignore_path, "w") as f:
302302
f.write(vault_block)
303303
click.echo("Created .gitignore with GitGhost block")
304+
@cli.command()
305+
@click.pass_context
306+
def help(ctx):
307+
"""Show this message and exit."""
308+
click.echo(cli.get_help(ctx))
309+
304310

305311
if __name__ == "__main__":
306312
cli()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "gitghost"
7-
version = "1.0.2"
7+
version = "1.0.3"
88
description = "Private version control for your Git ignored files."
99
authors = [
1010
{ name = "Decoding Chris" }

tests/test_integration.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,10 @@ def test_cli_entry_point():
281281
# Cover line 300
282282
from gitghost import cli as cli_module
283283
with pytest.raises(SystemExit):
284-
cli_module.cli()
284+
cli_module.cli()
285+
286+
def test_help_command(runner):
287+
result = runner.invoke(cli, ['help'])
288+
assert result.exit_code == 0
289+
assert 'Usage:' in result.output
290+
assert 'Commands:' in result.output

0 commit comments

Comments
 (0)