# omry-cli

[![builds.sr.ht status](https://forgejo.e37a.net/flora/omry-cli/badges/workflows/push.yml/badge.svg?label=build)](https://forgejo.e37a.net/flora/omry-cli/actions)

Experimental terminal client for [Omry](https://forgejo.e37a.net/flora/omry)
([Codeberg mirror](https://codeberg.org/omry/omry)), an offline archive and search for web pages.

*Note: this project's initial name was 'flora-cli', which you may still find throughout the code and documentation.*

Changes introduced in new versions are documented in the [changelog.](CHANGELOG)

## Getting started

### Prerequisites:

- Latest stable Rust toolchain (use [rustup](https://rustup.rs/) if you are unsure how to get it).

### Start the Omry backend

`omry-cli` requires the Omry backend.

[Follow these instructions](https://forgejo.e37a.net/flora/omry#running-omry-on-your-system)
to run the Omry backend.
Make note of `omry-server`'s ports, which will be in "listening on ..." log
message when the server is ready.

#### Omry server address

The default web address (assuming you're running on `localhost`) is `http://localhost:37374`.

The host can be different, depending on your environment
(if running Omry in `Docker`, `Podman`, on a different machine on the network, etc.)

### Install 

To install or update `omry-cli`, run:

**Latest release:**

```
cargo install --locked omry-cli
```

**From the main branch of this repo:**

```
cargo install --git https://forgejo.e37a.net/flora/omry-cli.git
```

Both will install `omry-cli`, and should add it to your `PATH`.

When the installation finishes, run the client:

```
omry-cli
```

Once open, enter any text to search your Omry archive, or `/help` to see what else you can do.

#### Note for WSL

If you're using `omry-cli` in WSL, you need [`wslu`](https://github.com/wslutilities/wslu)
to open saved pages in your default Windows browser. `wslu` was discontinued, but it's the only
tool I've found to actually work reliably. See
[this answer on Superuser](https://superuser.com/a/1368878) if you need help setting it up.

## Configuring the Omry host and port

The first time `omry-cli` runs, it will prompt you to input the host and port for the Omry backend service.
On most systemts, `omry-cli` will then put those in a new config file, stored under
your system's standard config directory.

Those are (if your username is "Alice"):

- Linux/WSL: `/home/alice/.config/omry-cli`
- macOS: `/Users/Alice/Library/Application Support/me.anyahope.omry.omry-cli`

*See [directories](https://docs.rs/directories/latest/directories/struct.ProjectDirs.html) for details about standard
locations on different systems.*

If you switch to using the Omry backend at a different network location, you will need to change the `config.toml`
in your config directory.

## Adding documents to Omry

You can add documents to Omry from your browser.
See [these instructions.](https://forgejo.e37a.net/flora/omry/src/branch/main/docs/import_from_browser.md)

## License

omry-cli, a terminal client for Omry

Copyright (C) 2025-2026  Lake Hope (also known as Anna Hope)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

## Acknowledgements

ASCII art was generated with [Image to ASCII Art](https://www.asciiart.eu/image-to-ascii).
