docs: add readme

This commit is contained in:
inkch
2025-07-09 01:16:56 +09:00
parent ea8fbd0c22
commit 086e4d6626

54
README.md Normal file
View File

@@ -0,0 +1,54 @@
# chot
**`chot` (ちょっと)** - pronounced /cho-tto/ - is a minimalist launcher for running or editing ephemeral, one-off scripts.
It lets you keep messy glue code, experimental snippets, or temporary scripts in a central place — and run or edit them with a simple command.
## Features
- `chot foo` runs a script called `foo`
- `chot edit foo` opens the script in `$EDITOR`
- `help` and `--help` are supported
- Script directory is configurable and auto-created
- Fish shell completion included
## Usage
```sh
chot foo # Runs the script named 'foo'
chot edit foo # Opens 'foo' in your $EDITOR
chot help # Show help
```
## Script Directory Resolution
chot stores and looks for scripts in this order:
1. `$CHOT_SCRIPT` (if set)
2. `$XDG_DATA_HOME/chot/scripts` (if `$XDG_DATA_HOME` is set)
3. `~/.local/share/chot/scripts`
If the directory does not exist, it will be created automatically the first time you run or edit a script.
💡 **Note:** We intentionally delay creating this directory until it's needed — just viewing `--help` shouldn't modify your filesystem.
## Installation
```sh
make install
```
This will install:
- `bin/chot` to `~/.local/bin/`
- Fish shell completion to the appropriate directory
## Uninstallation
```sh
make uninstall
```
## License
MIT