digit-cli 0.3.0

A finger protocol client (RFC 1288 / RFC 742)
Documentation
# digit

[![crates.io](https://img.shields.io/crates/v/digit-cli.svg)](https://crates.io/crates/digit-cli)
[![docs.rs](https://docs.rs/digit-cli/badge.svg)](https://docs.rs/digit-cli)

A finger protocol client implementing [RFC 1288](https://datatracker.ietf.org/doc/html/rfc1288) and [RFC 742](https://datatracker.ietf.org/doc/html/rfc742), written in Rust.

To try this on active finger servers (as of 2026), try the domains `graph.no` and `tilde.town`

## Installation

```
cargo install digit-cli
```

Or from source:

```
cargo install --path .
```

## Usage

```
digit [OPTIONS] [QUERY]
digit completions <SHELL>
```

### Examples

```bash
# Query a user at a host
digit user@example.com

# List all users at a host
digit @example.com

# Query a user with verbose/long output
digit -l user@example.com

# Use a non-standard port
digit -p 7979 user@example.com

# Set a connection timeout (in seconds)
digit -t 5 user@example.com

# Write raw bytes to stdout (useful for piping)
digit --raw user@example.com | hexdump -C

# Limit response size to 64 KiB
digit --max-size 65536 user@example.com

# Query a user at localhost
digit user

# List users at localhost
digit
```

### Forwarding queries

The finger protocol supports forwarding queries through a chain of hosts using the `@host1@host2` syntax (RFC 1288, section 2.5.1). For example:

```bash
digit user@host1@host2
```

This connects to `host2` and asks it to forward the query to `host1`. Note that many modern finger servers disable forwarding for security reasons, so this feature depends on server support.

### Options

| Option | Description |
|---|---|
| `-l, --long` | Request verbose/long output (sends `/W` prefix) |
| `-p, --port <PORT>` | Port to connect on (default: 79) |
| `-t, --timeout <SECS>` | Connection timeout in seconds (default: 10) |
| `--max-size <BYTES>` | Maximum response size in bytes (default: 1048576) |
| `--raw` | Write raw response bytes to stdout without UTF-8 decoding |
| `-h, --help` | Print help |
| `-V, --version` | Print version |

### Shell completions

Generate shell completions with the `completions` subcommand:

```bash
# Bash
digit completions bash > ~/.bash_completion.d/digit

# Zsh
digit completions zsh > ~/.zfunc/_digit

# Fish
digit completions fish > ~/.config/fish/completions/digit.fish

# PowerShell
digit completions powershell > digit.ps1

# Elvish
digit completions elvish > digit.elv
```

## Library

`digit` can also be used as a Rust library. See the [API documentation](https://docs.rs/digit-cli) for details.

## License

MIT