Metadata-Version: 2.4
Name: text-expander
Version: 0.1.0
Summary: Terminal-only cross-platform text expander with global shortcut expansion.
Author: Madhu Saini
License: MIT
Project-URL: Homepage, https://github.com/MadhuSaini22/text-expander
Project-URL: Source, https://github.com/MadhuSaini22/text-expander
Project-URL: Issues, https://github.com/MadhuSaini22/text-expander/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Desktop Environment
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pynput>=1.7.6
Requires-Dist: pyperclip>=1.8.2
Requires-Dist: pyobjc-core<12,>=11.1; sys_platform == "darwin" and python_version < "3.10"
Requires-Dist: pyobjc-framework-ApplicationServices<12,>=11.1; sys_platform == "darwin" and python_version < "3.10"
Requires-Dist: pyobjc-framework-Cocoa<12,>=11.1; sys_platform == "darwin" and python_version < "3.10"
Requires-Dist: pyobjc-framework-Quartz<12,>=11.1; sys_platform == "darwin" and python_version < "3.10"
Requires-Dist: pyobjc-core>=11.1; sys_platform == "darwin" and python_version >= "3.10"
Requires-Dist: pyobjc-framework-ApplicationServices>=11.1; sys_platform == "darwin" and python_version >= "3.10"
Requires-Dist: pyobjc-framework-Cocoa>=11.1; sys_platform == "darwin" and python_version >= "3.10"
Requires-Dist: pyobjc-framework-Quartz>=11.1; sys_platform == "darwin" and python_version >= "3.10"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Terminal Text Expander

A terminal-only, local-first text expander for macOS, Windows, and Linux.

Define snippets from the command line, run the daemon in the background, and type triggers anywhere on your system. When a trigger is followed by Space, Enter, or Tab, it is replaced with the saved text.

```bash
pipx install text-expander
text-expander install
text-expander add
```

Example:

```txt
;l<space>
```

expands to:

```txt
https://linkedin.com/in/yourprofile
```

## Install

Recommended:

```bash
pipx install text-expander
text-expander install
```

With pip:

```bash
python -m pip install text-expander
text-expander install
```

From this repository:

```bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
pip install -e .
```

On Linux, global keyboard capture may require additional system permissions depending on your desktop session. On macOS, grant Accessibility permissions to the terminal app that starts the daemon.

## Commands

```bash
text-expander add
text-expander list
text-expander edit ;l
text-expander delete ;l
text-expander search linkedin
text-expander install
text-expander uninstall
text-expander start
text-expander stop
text-expander status
text-expander doctor
text-expander run
text-expander startup install
text-expander startup uninstall
text-expander export snippets.json
text-expander import snippets.json
text-expander backup
```

## Storage

Snippets and runtime files are stored locally:

- macOS: `~/Library/Application Support/text-expander`
- Windows: `%APPDATA%\text-expander`
- Linux: `~/.config/text-expander`

Set `TEXT_EXPANDER_HOME=/path/to/dir` to use a custom data directory.

No cloud services are used.

## Notes

- Expansions are suppressed while the app is simulating replacement text to prevent recursive triggering.
- The daemon uses clipboard paste as the primary expansion path because it is faster and more reliable for long replacements. It restores the previous clipboard contents when possible.
- Startup registration uses LaunchAgents on macOS, the user Startup folder on Windows, and systemd user services on Linux.
- `pip install` only installs the CLI. Run `text-expander install` explicitly to register and start the background daemon.
