Metadata-Version: 2.4
Name: cli-pher
Version: 1.0.0
Summary: A command line implementation of common ciphers
Keywords: cipher,puzzle,encode,decode,encrypt,decrypt,cli
Author: donovanvdg
License-Expression: MIT
License-File: LICENSE
Requires-Dist: typer>=0.25.1
Requires-Python: >=3.13
Project-URL: Repository, https://gitlab.com/pluto-puzzle/cli-pher.git
Description-Content-Type: text/markdown

# CLI-pher

## Introduction
Welcome to CLI-pher! This is a command line implementation for quick encoding
and decoding of text using common ciphers.

### Supported ciphers
- Caesar
- Vigenere
- Simple keyword substitution

## Quickstart Guide

### Install

CLI-pher is published to PyPI and can be installed via pip, uv, or
any python package manager of your choice.

```shell
pip install cli-pher
```

### Run

CLI-pher can be run using either `cli-pher` or `clipher`.
For consistency, this guide will use `cli-pher` and the `caesar` command
for each example.

For usage and full list of commands:
```shell
# Display help message for cli-pher
cli-pher --help

# Display help message for a specific supported cipher
# Usage: cli-pher COMMAND --help
cli-pher caesar --help
```

Running cipher encryption/decryption examples:
```shell
# Example - encrypting using caesar cipher with a shift of 3
cli-pher caesar 3 julius

# Example - decrypting using caesar cipher with a shift of 3
cli-pher caesar 3 mxolxv --decrypt
```

### Interactive Mode

CLI-pher supports an "Interactive Mode" that prompts you for all necessary inputs
instead of relying on positional arguments and CLI options. Interactive Mode is
automatically started if any required arguments are missing from your cli-pher command.

Alternatively, you can enter interactive mode by passing the interactive flag:
```shell
cli-pher caesar --interactive
```

Here is an example of what interactive mode looks like:
```commandline
$ cli-pher caesar --interactive
Entering interactive mode!
Encrypt or decrypt? (e/d):
$ e
Key:
$ 3
Text:
$ julius
mxolxv
```

### Using CLI-pher as a library
CLI-pher can be added as a dependency to a python project and the `ciphers` module can be imported
for programmatic encryption and decryption of supported CLI-pher ciphers.
```python
from cli_pher.ciphers import caesar

ciphertext = caesar.encrypt('julius', 3)
print(f'Caesar encrypted text: {ciphertext}')
```
