@@ -89,13 +89,23 @@ curl -LSsf https://raw.githubusercontent.com/achristmascarl/rainfrog/main/instal
89
89
90
90
## usage
91
91
92
- all arguments are optional; you will be prompted to provide any missing information.
93
-
94
92
``` sh
95
- rainfrog
93
+ Usage: rainfrog [OPTIONS]
94
+
95
+ Options:
96
+ -M, --mouse < MOUSE_MODE> Whether to enable mouse event support. If enabled, your terminal\' s default mouse event handling will not
97
+ work. [possible values: true, false]
98
+ -u, --url < URL> Full connection URL for the database, e.g. postgres://username:password@localhost:5432/dbname
99
+ --username < USERNAME> Username for database connection
100
+ --password < PASSWORD> Password for database connection
101
+ --host < HOST> Host for database connection (ex. localhost)
102
+ --port < PORT> Port for database connection (ex. 5432)
103
+ --database < DATABASE> Name of database for connection (ex. postgres)
104
+ -h, --help Print help
105
+ -V, --version Print version
96
106
```
97
107
98
- ### with individual options
108
+ ### with connection options
99
109
100
110
if any options are not provided, you will be prompted to input them.
101
111
if you do not provide an input, that option will
@@ -112,7 +122,8 @@ rainfrog \
112
122
### with connection url
113
123
114
124
the ` connection_url ` must include all the necessary options for connecting
115
- to the database (ex. ` postgres://username:password@localhost:5432/postgres ` )
125
+ to the database (ex. ` postgres://username:password@localhost:5432/postgres ` ).
126
+ it will take precedence over all connection options.
116
127
117
128
``` sh
118
129
rainfrog --url $( connection_url)
@@ -130,9 +141,41 @@ docker run --platform linux/amd64 -it --rm --name rainfrog \
130
141
-e db_name=" <db_name>" achristmascarl/rainfrog:latest
131
142
```
132
143
133
- ## keybindings
144
+ ## customization
145
+
146
+ rainfrog can be customized by placing a ` rainfrog_config.toml ` file in
147
+ one of the following locations depending on your os, as determined by
148
+ the [ directories] ( https://crates.io/crates/directories ) crate:
149
+
150
+ | Platform | Value | Example |
151
+ | -------- | ----------------------------------------------------------------------- | ------------------------------------------------------------- |
152
+ | Linux | ` $XDG_CONFIG_HOME ` /` _project_path_ ` or ` $HOME ` /.config/` _project_path_ ` | /home/alice/.config/barapp |
153
+ | macOS | ` $HOME ` /Library/Application Support/` _project_path_ ` | /Users/Alice/Library/Application Support/com.Foo-Corp.Bar-App |
154
+ | Windows | ` {FOLDERID_LocalAppData} ` \\ ` _project_path_ ` \\ config | C:\Users\Alice\AppData\Local\Foo Corp\Bar App\config |
155
+
156
+ you can change the default config location by exporting an environment variable.
157
+ to make the change permanent, add it to your .zshrc/.bashrc/.\* rc file:
158
+
159
+ ``` sh
160
+ export RAINFROG_CONFIG=~ /.config
161
+ ```
162
+
163
+ ### settings
164
+
165
+ right now, the only setting available is whether rainfrog
166
+ captures mouse events by default. capturing mouse events
167
+ allows you to change focus and scroll using the mouse.
168
+ however, your terminal will not handle mouse events like it
169
+ normally does (you won't be able to copy by highlighting, for example).
170
+
171
+ ### keybindings
172
+
173
+ you can customize some of the default keybindings, but not all of
174
+ them. to see a list of the ones you can customize, see the default
175
+ config file at [ .config/rainfrog_config.toml] ( ./.config/rainfrog_config.toml ) . below
176
+ are the default keybindings.
134
177
135
- ### general
178
+ #### general
136
179
137
180
| keybinding | description |
138
181
| ---------------------------- | ----------------------------- |
@@ -145,7 +188,7 @@ docker run --platform linux/amd64 -it --rm --name rainfrog \
145
188
| ` Shift+Tab ` | cycle focus backwards |
146
189
| ` q ` , ` Alt+q ` in query editor | abort current query |
147
190
148
- ### menu (list of schemas and tables)
191
+ #### menu (list of schemas and tables)
149
192
150
193
| keybinding | description |
151
194
| ---------------------------- | --------------------------------- |
@@ -163,7 +206,7 @@ docker run --platform linux/amd64 -it --rm --name rainfrog \
163
206
| ` Enter ` with selected table | preview table (100 rows) |
164
207
| ` R ` | reload schemas and tables |
165
208
166
- ### query editor
209
+ #### query editor
167
210
168
211
Keybindings may not behave exactly like Vim. The full list of active Vim keybindings in Rainfrog can be found at [ vim.rs] ( ./src/vim.rs ) .
169
212
@@ -197,7 +240,7 @@ Keybindings may not behave exactly like Vim. The full list of active Vim keybind
197
240
| ` Ctrl+e ` | Scroll down |
198
241
| ` Ctrl+y ` | Scroll up |
199
242
200
- ### query history
243
+ #### query history
201
244
202
245
| keybinding | description |
203
246
| ---------- | ----------------------------- |
@@ -209,7 +252,7 @@ Keybindings may not behave exactly like Vim. The full list of active Vim keybind
209
252
| ` I ` | edit selected query in editor |
210
253
| ` D ` | delete all history |
211
254
212
- ### results
255
+ #### results
213
256
214
257
| keybinding | description |
215
258
| ------------------------- | ------------------------------ |
@@ -275,6 +318,8 @@ features
275
318
276
319
## known issues and limitations
277
320
321
+ - for x11 and wayland, yanking does not copy to the system clipboard, only
322
+ to the query editor's buffer. see < https://github.com/achristmascarl/rainfrog/issues/83 >
278
323
- in addition to the experience being subpar if the terminal window is too
279
324
small, if the terminal window is too large, rainfrog will crash due to the
280
325
maximum area of ratatui buffers being ` u16::MAX ` (65,535). more details in
@@ -293,6 +338,12 @@ features
293
338
not currently support mouse events, and menu items cannot be selected using
294
339
the mouse
295
340
341
+ ## Contributing
342
+
343
+ for bug reports and feature requests, please [ create an issue] ( https://github.com/achristmascarl/rainfrog/issues/new/choose ) .
344
+
345
+ please read [ CONTRIBUTING.md] ( ./CONTRIBUTING.md ) before opening issues or creating PRs.
346
+
296
347
## acknowledgements
297
348
298
349
- [ ratatui] ( https://github.com/ratatui-org/ratatui ) (this project used ratatui's
0 commit comments