https://github.com/0bmario/askman
CLI tool for quickly finding terminal commands.
https://github.com/0bmario/askman
cli manpages rust semantic-search tldr
Last synced: 4 months ago
JSON representation
CLI tool for quickly finding terminal commands.
- Host: GitHub
- URL: https://github.com/0bmario/askman
- Owner: 0bmario
- License: mit
- Created: 2025-05-04T20:19:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-24T22:39:11.000Z (4 months ago)
- Last Synced: 2026-02-25T03:45:16.198Z (4 months ago)
- Topics: cli, manpages, rust, semantic-search, tldr
- Language: Rust
- Homepage:
- Size: 64.8 MB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# askman
A simple, offline CLI tool that finds terminal commands from natural language descriptions. Just describe what you want to do.
## Installation
### macOS / Linux (recommended)
```bash
curl -sSL https://raw.githubusercontent.com/0bmario/askman/main/install.sh | bash
```
### From source
Requires [Rust](https://rust-lang.org/tools/install/):
```bash
cargo install --git https://github.com/0bmario/askman
```
On first run, `askman` downloads a small embedding model and command database. Everything runs offline after that.
## Usage
```bash
askman move files to docs
```
By default, results are filtered to your host OS. If you need a command for a different system, override it with flags:
```bash
askman --linux restart systemd
askman --osx flush dns
askman --windows clear dns cache
```
## How it works
- `askman` uses semantic search to match your query to real command examples from [tldr-pages](https://github.com/tldr-pages/tldr).
- Input is embedded into a vector using a local [AllMiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) model, then matched against a pre-built SQLite database via [sqlite-vec](https://github.com/asg017/sqlite-vec) cosine distance.
- Everything runs on your machine after the initial setup.
## Uninstall
First, remove cached data (models and database):
```bash
askman --clean
```
Then remove the binary itself:
- **If installed via `install.sh`:**
```bash
rm ~/.local/bin/askman
```
- **If installed via `cargo`:**
```bash
cargo uninstall askman
```
## Acknowledgments
Kudos to the [tldr-pages](https://github.com/tldr-pages/tldr) project. The used command data is sourced from their collection of simplified examples :raised_hands:
## Rebuilding the Database
Want to refresh the database with the absolute latest commands?
```bash
cargo run --bin import_tldr --features="dev"
```
This automatically fetches the newest data from the tldr repository, extracts it, and generates a fresh database for your system.