Skip to content

Commit a644a6c

Browse files
committed
Rename
1 parent edaaf1b commit a644a6c

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ We can chat straight from the command line.
1313
For example, via the DeepInfra API:
1414

1515
```sh
16-
$ DEEPINFRA_KEY="<KEY>"; echo "hi there" | ata chat
16+
$ DEEPINFRA_KEY="<KEY>"; echo "hi there" | trf chat
1717
```
1818

1919
This defaults to the `meta-llama/Llama-3.3-70B-Instruct` model.
@@ -25,21 +25,21 @@ For example, create a file called `chat.sh` with the following content:
2525

2626
export OPENAI_KEY="$(cat /path/to/key)"
2727

28-
ata chat --model="gpt-4o"
28+
trf chat --model="gpt-4o"
2929
```
3030

3131
and add it to your PATH.
3232
Now, we can use it like this:
3333

3434
```sh
35-
$ echo "This is a test. Respond with 'hello'." | ata chat
35+
$ echo "This is a test. Respond with 'hello'." | trf chat
3636
hello
3737
```
3838

3939
Or we can run a spellcheck on a file:
4040

4141
```sh
42-
$ echo "Do you see spelling errors in the following text?"; cat myfile.txt | ata chat
42+
$ echo "Do you see spelling errors in the following text?"; cat myfile.txt | trf chat
4343
```
4444

4545
Here is a more complex example.
@@ -61,7 +61,7 @@ Here is the text to check:
6161
"
6262
MODEL="deepseek-ai/DeepSeek-R1-Distill-Llama-70B"
6363

64-
(echo "$PROMPT"; cat README.md) | ata chat --model="$MODEL"
64+
(echo "$PROMPT"; cat README.md) | trf chat --model="$MODEL"
6565
```
6666

6767
### Text to Speech in Bash
@@ -70,10 +70,10 @@ We can read a file out loud from the command line.
7070
For example, with the OpenAI API:
7171

7272
```sh
73-
$ OPENAI_KEY="$(cat /path/to/key)"; cat myfile.txt | ata tts | vlc - --intf dummy
73+
$ OPENAI_KEY="$(cat /path/to/key)"; cat myfile.txt | trf tts | vlc - --intf dummy
7474
```
7575

76-
Here, we set the key, print the file `myfile.txt` to stdout, pipe it to `ata` to generate mp3 audio, and pipe that to `vlc` to play it.
76+
Here, we set the key, print the file `myfile.txt` to stdout, pipe it to `trf` to generate mp3 audio, and pipe that to `vlc` to play it.
7777
The `--intf dummy` is optional; it just prevents `vlc` from opening a GUI.
7878

7979
One way to make this easier to use is to create a Bash script that sets the environment variable and runs the command.
@@ -87,7 +87,7 @@ set -euo pipefail
8787

8888
export OPENAI_KEY="$(cat /path/to/key)"
8989

90-
ata tts | vlc - --intf dummy
90+
trf tts | vlc - --intf dummy
9191
```
9292

9393
After adding `spk.sh` to your PATH, you can use it like this:
@@ -99,11 +99,11 @@ $ cat myfile.txt | spk
9999
### Other Text to Speech Commands
100100

101101
```sh
102-
$ DEEPINFRA_KEY="$(cat /path/to/key)"; cat myfile.txt | ata tts | vlc -
102+
$ DEEPINFRA_KEY="$(cat /path/to/key)"; cat myfile.txt | trf tts | vlc -
103103
```
104104

105105
```sh
106-
$ DEEPINFRA_KEY="$(cat /path/to/key)"; cat myfile.txt | ata tts --output myfile.mp3
106+
$ DEEPINFRA_KEY="$(cat /path/to/key)"; cat myfile.txt | trf tts --output myfile.mp3
107107
```
108108

109109
## Philosophy

tests/chat.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod common;
22

3-
use common::ata;
43
use common::load_key;
4+
use common::trf;
55
use predicates::prelude::*;
66
use transformrs::Provider;
77

@@ -15,7 +15,7 @@ fn canonicalize_response(text: &str) -> String {
1515

1616
#[test]
1717
fn unexpected_argument() -> Result<(), Box<dyn std::error::Error>> {
18-
let mut cmd = ata();
18+
let mut cmd = trf();
1919
cmd.arg("foobar");
2020
cmd.assert()
2121
.failure()
@@ -27,7 +27,7 @@ fn unexpected_argument() -> Result<(), Box<dyn std::error::Error>> {
2727
#[test]
2828
fn tts_no_args() -> Result<(), Box<dyn std::error::Error>> {
2929
let dir = tempfile::tempdir().unwrap();
30-
let mut cmd = ata();
30+
let mut cmd = trf();
3131
let key = load_key(&Provider::DeepInfra);
3232
let cmd = cmd
3333
.arg("chat")

tests/common/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use assert_cmd::Command;
22
use std::io::BufRead;
33
use transformrs::Provider;
44

5-
pub fn ata() -> Command {
6-
Command::cargo_bin("ata").unwrap()
5+
pub fn trf() -> Command {
6+
Command::cargo_bin("trf").unwrap()
77
}
88

99
#[allow(dead_code)]

tests/tts.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
mod common;
22

3-
use common::ata;
43
use common::load_key;
4+
use common::trf;
55
use predicates::prelude::*;
66
use transformrs::Provider;
77

88
#[test]
99
fn unexpected_argument() -> Result<(), Box<dyn std::error::Error>> {
10-
let mut cmd = ata();
10+
let mut cmd = trf();
1111
cmd.arg("foobar");
1212
cmd.assert()
1313
.failure()
@@ -18,19 +18,19 @@ fn unexpected_argument() -> Result<(), Box<dyn std::error::Error>> {
1818

1919
#[test]
2020
fn help() -> Result<(), Box<dyn std::error::Error>> {
21-
let mut cmd = ata();
21+
let mut cmd = trf();
2222
cmd.arg("--help");
2323
cmd.assert()
2424
.success()
25-
.stdout(predicate::str::contains("Usage: ata"));
25+
.stdout(predicate::str::contains("Usage: trf"));
2626

2727
Ok(())
2828
}
2929

3030
#[test]
3131
fn tts_no_args() -> Result<(), Box<dyn std::error::Error>> {
3232
let dir = tempfile::tempdir().unwrap();
33-
let mut cmd = ata();
33+
let mut cmd = trf();
3434
let key = load_key(&Provider::DeepInfra);
3535
let cmd = cmd
3636
.arg("tts")
@@ -46,7 +46,7 @@ fn tts_no_args() -> Result<(), Box<dyn std::error::Error>> {
4646

4747
fn tts_default_settings_helper(provider: &Provider) -> Result<(), Box<dyn std::error::Error>> {
4848
let dir = tempfile::tempdir().unwrap();
49-
let mut cmd = ata();
49+
let mut cmd = trf();
5050
let key = load_key(provider);
5151
let name = provider.key_name();
5252
cmd.arg("tts")

0 commit comments

Comments
 (0)