Skip to content

Commit 8ba55bb

Browse files
authored
Add Nix installation instructions to CLI README (#232)
add Arch Linux, Debian and Nix platforms installation instructions to README
1 parent c96f08e commit 8ba55bb

File tree

1 file changed

+48
-7
lines changed

1 file changed

+48
-7
lines changed

refinery_cli/README.md

+48-7
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,78 @@
33
Run Refinery migrations via cli.
44

55
## Installation
6-
Install refinery_cli via cargo.
6+
7+
The binary name for `refinery_cli` is `refinery`.
8+
9+
**[Archives of precompiled binaries for refinery are available for Windows,
10+
macOS and Linux.](https://github.com/rust-db/refinery/releases/)** Linux and
11+
Windows binaries are static executables. Users of platforms not explicitly
12+
mentioned below are advised to download one of these archives.
13+
14+
### Debian/Ubuntu
15+
16+
If you're a **Debian** user (or a user of a Debian derivative like **Ubuntu**),
17+
then ripgrep can be installed using a binary `.deb` file provided in each
18+
[refinery_cli release](https://github.com/rust-db/refinery/releases/).
719

820
```sh
9-
cargo install refinery_cli
21+
$ curl -LO https://github.com/rust-db/refinery/releases/download/0.8.4/refinery_0.8.4_amd64.deb
22+
$ sudo dpkg -i refinery_0.8.4_amd64.deb
23+
```
24+
25+
### Arch Linux
26+
27+
If you're an **Arch Linux** user, then you can install
28+
the [`refinery_cli`](https://aur.archlinux.org/packages/refinery_cli) package from AUR:
29+
30+
```sh
31+
$ yay refinery_cli
32+
```
33+
34+
### NixOs
35+
36+
If you're a **Nix** user, you can install ripgrep via
37+
the [`refinery-cli`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/refinery-cli/default.nix) package:
38+
39+
```sh
40+
$ nix-env -iA refinery-cli
41+
```
42+
43+
### Cargo.
44+
45+
If you're a **Rust programmer**, `refinery_cli` can be installed with `cargo`.
46+
47+
48+
```sh
49+
$ cargo install refinery_cli
1050
```
1151

1252
## Usage
53+
1354
Setup your database type and access credentials with `setup`.
1455

1556
```sh
16-
refinery setup
57+
$ refinery setup
1758
```
1859

1960
After that, just run your migrations giving your config file with `-c` flag (by defaults it is the `refinery.toml` generated by the setup) and migrations dir with `files -p $dir`.
2061

2162
```sh
22-
refinery migrate -c sqlite_refinery.toml -p ./sql_migrations
63+
$ refinery migrate -c sqlite_refinery.toml -p ./sql_migrations
2364
```
2465

2566
### Running via database uri
2667

2768
To run migrations from a database [uri](http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING) (like: postgres://user_name:passwd@hostname:5432/myDB ) stored in an environment variable DB_URI.
2869

2970
```sh
30-
refinery migrate -e DB_URI -p ./sql_migrations
71+
$ refinery migrate -e DB_URI -p ./sql_migrations
3172
```
32-
This option is also useful when running refinery inside a docker container, where you usually have the db connection info stored as an environment variable.
3373

74+
This option is also useful when running refinery inside a docker container, where you usually have the db connection info stored as an environment variable.
3475

3576
For more info and migration options run.
3677

3778
```sh
38-
refinery migrate --help
79+
$ refinery migrate --help
3980
```

0 commit comments

Comments
 (0)