You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
docs: add CLI usage and integrate generation in release
This commit is contained in:
29
www/docs/cli/filebrowser-cmds-add.md
Normal file
29
www/docs/cli/filebrowser-cmds-add.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# filebrowser cmds add
|
||||
|
||||
Add a command to run on a specific event
|
||||
|
||||
## Synopsis
|
||||
|
||||
Add a command to run on a specific event.
|
||||
|
||||
```
|
||||
filebrowser cmds add <event> <command> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for add
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser cmds](filebrowser-cmds.md) - Command runner management utility
|
||||
|
||||
30
www/docs/cli/filebrowser-cmds-ls.md
Normal file
30
www/docs/cli/filebrowser-cmds-ls.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# filebrowser cmds ls
|
||||
|
||||
List all commands for each event
|
||||
|
||||
## Synopsis
|
||||
|
||||
List all commands for each event.
|
||||
|
||||
```
|
||||
filebrowser cmds ls [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-e, --event string event name, without 'before' or 'after'
|
||||
-h, --help help for ls
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser cmds](filebrowser-cmds.md) - Command runner management utility
|
||||
|
||||
37
www/docs/cli/filebrowser-cmds-rm.md
Normal file
37
www/docs/cli/filebrowser-cmds-rm.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# filebrowser cmds rm
|
||||
|
||||
Removes a command from an event hooker
|
||||
|
||||
## Synopsis
|
||||
|
||||
Removes a command from an event hooker. The provided index
|
||||
is the same that's printed when you run 'cmds ls'. Note
|
||||
that after each removal/addition, the index of the
|
||||
commands change. So be careful when removing them after each
|
||||
other.
|
||||
|
||||
You can also specify an optional parameter (index_end) so
|
||||
you can remove all commands from 'index' to 'index_end',
|
||||
including 'index_end'.
|
||||
|
||||
```
|
||||
filebrowser cmds rm <event> <index> [index_end] [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for rm
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser cmds](filebrowser-cmds.md) - Command runner management utility
|
||||
|
||||
28
www/docs/cli/filebrowser-cmds.md
Normal file
28
www/docs/cli/filebrowser-cmds.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# filebrowser cmds
|
||||
|
||||
Command runner management utility
|
||||
|
||||
## Synopsis
|
||||
|
||||
Command runner management utility.
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for cmds
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser](filebrowser.md) - A stylish web-based file browser
|
||||
* [filebrowser cmds add](filebrowser-cmds-add.md) - Add a command to run on a specific event
|
||||
* [filebrowser cmds ls](filebrowser-cmds-ls.md) - List all commands for each event
|
||||
* [filebrowser cmds rm](filebrowser-cmds-rm.md) - Removes a command from an event hooker
|
||||
|
||||
50
www/docs/cli/filebrowser-completion-bash.md
Normal file
50
www/docs/cli/filebrowser-completion-bash.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# filebrowser completion bash
|
||||
|
||||
Generate the autocompletion script for bash
|
||||
|
||||
## Synopsis
|
||||
|
||||
Generate the autocompletion script for the bash shell.
|
||||
|
||||
This script depends on the 'bash-completion' package.
|
||||
If it is not installed already, you can install it via your OS's package manager.
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
source <(filebrowser completion bash)
|
||||
|
||||
To load completions for every new session, execute once:
|
||||
|
||||
### Linux:
|
||||
|
||||
filebrowser completion bash > /etc/bash_completion.d/filebrowser
|
||||
|
||||
### macOS:
|
||||
|
||||
filebrowser completion bash > $(brew --prefix)/etc/bash_completion.d/filebrowser
|
||||
|
||||
You will need to start a new shell for this setup to take effect.
|
||||
|
||||
|
||||
```
|
||||
filebrowser completion bash
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for bash
|
||||
--no-descriptions disable completion descriptions
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser completion](filebrowser-completion.md) - Generate the autocompletion script for the specified shell
|
||||
|
||||
41
www/docs/cli/filebrowser-completion-fish.md
Normal file
41
www/docs/cli/filebrowser-completion-fish.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# filebrowser completion fish
|
||||
|
||||
Generate the autocompletion script for fish
|
||||
|
||||
## Synopsis
|
||||
|
||||
Generate the autocompletion script for the fish shell.
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
filebrowser completion fish | source
|
||||
|
||||
To load completions for every new session, execute once:
|
||||
|
||||
filebrowser completion fish > ~/.config/fish/completions/filebrowser.fish
|
||||
|
||||
You will need to start a new shell for this setup to take effect.
|
||||
|
||||
|
||||
```
|
||||
filebrowser completion fish [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for fish
|
||||
--no-descriptions disable completion descriptions
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser completion](filebrowser-completion.md) - Generate the autocompletion script for the specified shell
|
||||
|
||||
38
www/docs/cli/filebrowser-completion-powershell.md
Normal file
38
www/docs/cli/filebrowser-completion-powershell.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# filebrowser completion powershell
|
||||
|
||||
Generate the autocompletion script for powershell
|
||||
|
||||
## Synopsis
|
||||
|
||||
Generate the autocompletion script for powershell.
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
filebrowser completion powershell | Out-String | Invoke-Expression
|
||||
|
||||
To load completions for every new session, add the output of the above command
|
||||
to your powershell profile.
|
||||
|
||||
|
||||
```
|
||||
filebrowser completion powershell [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for powershell
|
||||
--no-descriptions disable completion descriptions
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser completion](filebrowser-completion.md) - Generate the autocompletion script for the specified shell
|
||||
|
||||
52
www/docs/cli/filebrowser-completion-zsh.md
Normal file
52
www/docs/cli/filebrowser-completion-zsh.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# filebrowser completion zsh
|
||||
|
||||
Generate the autocompletion script for zsh
|
||||
|
||||
## Synopsis
|
||||
|
||||
Generate the autocompletion script for the zsh shell.
|
||||
|
||||
If shell completion is not already enabled in your environment you will need
|
||||
to enable it. You can execute the following once:
|
||||
|
||||
echo "autoload -U compinit; compinit" >> ~/.zshrc
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
source <(filebrowser completion zsh)
|
||||
|
||||
To load completions for every new session, execute once:
|
||||
|
||||
### Linux:
|
||||
|
||||
filebrowser completion zsh > "${fpath[1]}/_filebrowser"
|
||||
|
||||
### macOS:
|
||||
|
||||
filebrowser completion zsh > $(brew --prefix)/share/zsh/site-functions/_filebrowser
|
||||
|
||||
You will need to start a new shell for this setup to take effect.
|
||||
|
||||
|
||||
```
|
||||
filebrowser completion zsh [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for zsh
|
||||
--no-descriptions disable completion descriptions
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser completion](filebrowser-completion.md) - Generate the autocompletion script for the specified shell
|
||||
|
||||
31
www/docs/cli/filebrowser-completion.md
Normal file
31
www/docs/cli/filebrowser-completion.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# filebrowser completion
|
||||
|
||||
Generate the autocompletion script for the specified shell
|
||||
|
||||
## Synopsis
|
||||
|
||||
Generate the autocompletion script for filebrowser for the specified shell.
|
||||
See each sub-command's help for details on how to use the generated script.
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for completion
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser](filebrowser.md) - A stylish web-based file browser
|
||||
* [filebrowser completion bash](filebrowser-completion-bash.md) - Generate the autocompletion script for bash
|
||||
* [filebrowser completion fish](filebrowser-completion-fish.md) - Generate the autocompletion script for fish
|
||||
* [filebrowser completion powershell](filebrowser-completion-powershell.md) - Generate the autocompletion script for powershell
|
||||
* [filebrowser completion zsh](filebrowser-completion-zsh.md) - Generate the autocompletion script for zsh
|
||||
|
||||
29
www/docs/cli/filebrowser-config-cat.md
Normal file
29
www/docs/cli/filebrowser-config-cat.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# filebrowser config cat
|
||||
|
||||
Prints the configuration
|
||||
|
||||
## Synopsis
|
||||
|
||||
Prints the configuration.
|
||||
|
||||
```
|
||||
filebrowser config cat [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for cat
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser config](filebrowser-config.md) - Configuration management utility
|
||||
|
||||
31
www/docs/cli/filebrowser-config-export.md
Normal file
31
www/docs/cli/filebrowser-config-export.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# filebrowser config export
|
||||
|
||||
Export the configuration to a file
|
||||
|
||||
## Synopsis
|
||||
|
||||
Export the configuration to a file. The path must be for a
|
||||
json or yaml file. This exported configuration can be changed,
|
||||
and imported again with 'config import' command.
|
||||
|
||||
```
|
||||
filebrowser config export <path> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for export
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser config](filebrowser-config.md) - Configuration management utility
|
||||
|
||||
36
www/docs/cli/filebrowser-config-import.md
Normal file
36
www/docs/cli/filebrowser-config-import.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# filebrowser config import
|
||||
|
||||
Import a configuration file
|
||||
|
||||
## Synopsis
|
||||
|
||||
Import a configuration file. This will replace all the existing
|
||||
configuration. Can be used with or without unexisting databases.
|
||||
|
||||
If used with a nonexisting database, a key will be generated
|
||||
automatically. Otherwise the key will be kept the same as in the
|
||||
database.
|
||||
|
||||
The path must be for a json or yaml file.
|
||||
|
||||
```
|
||||
filebrowser config import <path> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for import
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser config](filebrowser-config.md) - Configuration management utility
|
||||
|
||||
87
www/docs/cli/filebrowser-config-init.md
Normal file
87
www/docs/cli/filebrowser-config-init.md
Normal file
@@ -0,0 +1,87 @@
|
||||
# filebrowser config init
|
||||
|
||||
Initialize a new database
|
||||
|
||||
## Synopsis
|
||||
|
||||
Initialize a new database to use with File Browser. All of
|
||||
this options can be changed in the future with the command
|
||||
'filebrowser config set'. The user related flags apply
|
||||
to the defaults when creating new users and you don't
|
||||
override the options.
|
||||
|
||||
```
|
||||
filebrowser config init [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
--aceEditorTheme string ace editor's syntax highlighting theme for users
|
||||
-a, --address string address to listen on (default "127.0.0.1")
|
||||
--auth.command string command for auth.method=hook
|
||||
--auth.header string HTTP header for auth.method=proxy
|
||||
--auth.method string authentication type (default "json")
|
||||
-b, --baseurl string base url
|
||||
--branding.color string set the theme color
|
||||
--branding.disableExternal disable external links such as GitHub links
|
||||
--branding.disableUsedPercentage disable used disk percentage graph
|
||||
--branding.files string path to directory with images and custom styles
|
||||
--branding.name string replace 'File Browser' by this name
|
||||
--branding.theme string set the theme
|
||||
--cache-dir string file cache directory (disabled if empty)
|
||||
-t, --cert string tls certificate
|
||||
--commands strings a list of the commands a user can execute
|
||||
--create-user-dir generate user's home directory automatically
|
||||
--dateFormat use date format (true for absolute time, false for relative)
|
||||
--dir-mode string Mode bits that new directories are created with (default "0o750")
|
||||
--disable-exec disables Command Runner feature (default true)
|
||||
--disable-preview-resize disable resize of image previews
|
||||
--disable-thumbnails disable image thumbnails
|
||||
--disable-type-detection-by-header disables type detection by reading file headers
|
||||
--file-mode string Mode bits that new files are created with (default "0o640")
|
||||
-h, --help help for init
|
||||
--hide-login-button hide login button from public pages
|
||||
--hideDotfiles hide dotfiles
|
||||
--img-processors int image processors count (default 4)
|
||||
-k, --key string tls key
|
||||
--locale string locale for users (default "en")
|
||||
--lockPassword lock password
|
||||
-l, --log string log output (default "stdout")
|
||||
--minimum-password-length uint minimum password length for new users (default 12)
|
||||
--perm.admin admin perm for users
|
||||
--perm.create create perm for users (default true)
|
||||
--perm.delete delete perm for users (default true)
|
||||
--perm.download download perm for users (default true)
|
||||
--perm.execute execute perm for users (default true)
|
||||
--perm.modify modify perm for users (default true)
|
||||
--perm.rename rename perm for users (default true)
|
||||
--perm.share share perm for users (default true)
|
||||
-p, --port string port to listen on (default "8080")
|
||||
--recaptcha.host string use another host for ReCAPTCHA. recaptcha.net might be useful in China (default "https://www.google.com")
|
||||
--recaptcha.key string ReCaptcha site key
|
||||
--recaptcha.secret string ReCaptcha secret
|
||||
-r, --root string root to prepend to relative paths (default ".")
|
||||
--scope string scope for users (default ".")
|
||||
--shell string shell command to which other commands should be appended
|
||||
-s, --signup allow users to signup
|
||||
--singleClick use single clicks only
|
||||
--socket string socket to listen to (cannot be used with address, port, cert nor key flags)
|
||||
--socket-perm uint32 unix socket file permissions (default 438)
|
||||
--sorting.asc sorting by ascending order
|
||||
--sorting.by string sorting mode (name, size or modified) (default "name")
|
||||
--token-expiration-time string user session timeout (default "2h")
|
||||
--viewMode string view mode for users (default "list")
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser config](filebrowser-config.md) - Configuration management utility
|
||||
|
||||
84
www/docs/cli/filebrowser-config-set.md
Normal file
84
www/docs/cli/filebrowser-config-set.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# filebrowser config set
|
||||
|
||||
Updates the configuration
|
||||
|
||||
## Synopsis
|
||||
|
||||
Updates the configuration. Set the flags for the options
|
||||
you want to change. Other options will remain unchanged.
|
||||
|
||||
```
|
||||
filebrowser config set [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
--aceEditorTheme string ace editor's syntax highlighting theme for users
|
||||
-a, --address string address to listen on (default "127.0.0.1")
|
||||
--auth.command string command for auth.method=hook
|
||||
--auth.header string HTTP header for auth.method=proxy
|
||||
--auth.method string authentication type (default "json")
|
||||
-b, --baseurl string base url
|
||||
--branding.color string set the theme color
|
||||
--branding.disableExternal disable external links such as GitHub links
|
||||
--branding.disableUsedPercentage disable used disk percentage graph
|
||||
--branding.files string path to directory with images and custom styles
|
||||
--branding.name string replace 'File Browser' by this name
|
||||
--branding.theme string set the theme
|
||||
--cache-dir string file cache directory (disabled if empty)
|
||||
-t, --cert string tls certificate
|
||||
--commands strings a list of the commands a user can execute
|
||||
--create-user-dir generate user's home directory automatically
|
||||
--dateFormat use date format (true for absolute time, false for relative)
|
||||
--dir-mode string Mode bits that new directories are created with (default "0o750")
|
||||
--disable-exec disables Command Runner feature (default true)
|
||||
--disable-preview-resize disable resize of image previews
|
||||
--disable-thumbnails disable image thumbnails
|
||||
--disable-type-detection-by-header disables type detection by reading file headers
|
||||
--file-mode string Mode bits that new files are created with (default "0o640")
|
||||
-h, --help help for set
|
||||
--hide-login-button hide login button from public pages
|
||||
--hideDotfiles hide dotfiles
|
||||
--img-processors int image processors count (default 4)
|
||||
-k, --key string tls key
|
||||
--locale string locale for users (default "en")
|
||||
--lockPassword lock password
|
||||
-l, --log string log output (default "stdout")
|
||||
--minimum-password-length uint minimum password length for new users (default 12)
|
||||
--perm.admin admin perm for users
|
||||
--perm.create create perm for users (default true)
|
||||
--perm.delete delete perm for users (default true)
|
||||
--perm.download download perm for users (default true)
|
||||
--perm.execute execute perm for users (default true)
|
||||
--perm.modify modify perm for users (default true)
|
||||
--perm.rename rename perm for users (default true)
|
||||
--perm.share share perm for users (default true)
|
||||
-p, --port string port to listen on (default "8080")
|
||||
--recaptcha.host string use another host for ReCAPTCHA. recaptcha.net might be useful in China (default "https://www.google.com")
|
||||
--recaptcha.key string ReCaptcha site key
|
||||
--recaptcha.secret string ReCaptcha secret
|
||||
-r, --root string root to prepend to relative paths (default ".")
|
||||
--scope string scope for users (default ".")
|
||||
--shell string shell command to which other commands should be appended
|
||||
-s, --signup allow users to signup
|
||||
--singleClick use single clicks only
|
||||
--socket string socket to listen to (cannot be used with address, port, cert nor key flags)
|
||||
--socket-perm uint32 unix socket file permissions (default 438)
|
||||
--sorting.asc sorting by ascending order
|
||||
--sorting.by string sorting mode (name, size or modified) (default "name")
|
||||
--token-expiration-time string user session timeout (default "2h")
|
||||
--viewMode string view mode for users (default "list")
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser config](filebrowser-config.md) - Configuration management utility
|
||||
|
||||
30
www/docs/cli/filebrowser-config.md
Normal file
30
www/docs/cli/filebrowser-config.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# filebrowser config
|
||||
|
||||
Configuration management utility
|
||||
|
||||
## Synopsis
|
||||
|
||||
Configuration management utility.
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for config
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser](filebrowser.md) - A stylish web-based file browser
|
||||
* [filebrowser config cat](filebrowser-config-cat.md) - Prints the configuration
|
||||
* [filebrowser config export](filebrowser-config-export.md) - Export the configuration to a file
|
||||
* [filebrowser config import](filebrowser-config-import.md) - Import a configuration file
|
||||
* [filebrowser config init](filebrowser-config-init.md) - Initialize a new database
|
||||
* [filebrowser config set](filebrowser-config-set.md) - Updates the configuration
|
||||
|
||||
29
www/docs/cli/filebrowser-hash.md
Normal file
29
www/docs/cli/filebrowser-hash.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# filebrowser hash
|
||||
|
||||
Hashes a password
|
||||
|
||||
## Synopsis
|
||||
|
||||
Hashes a password using bcrypt algorithm.
|
||||
|
||||
```
|
||||
filebrowser hash <password> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for hash
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser](filebrowser.md) - A stylish web-based file browser
|
||||
|
||||
33
www/docs/cli/filebrowser-rules-add.md
Normal file
33
www/docs/cli/filebrowser-rules-add.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# filebrowser rules add
|
||||
|
||||
Add a global rule or user rule
|
||||
|
||||
## Synopsis
|
||||
|
||||
Add a global rule or user rule.
|
||||
|
||||
```
|
||||
filebrowser rules add <path|expression> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-a, --allow indicates this is an allow rule
|
||||
-h, --help help for add
|
||||
-r, --regex indicates this is a regex rule
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
-i, --id uint id of user to which the rules apply
|
||||
-u, --username string username of user to which the rules apply
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser rules](filebrowser-rules.md) - Rules management utility
|
||||
|
||||
31
www/docs/cli/filebrowser-rules-ls.md
Normal file
31
www/docs/cli/filebrowser-rules-ls.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# filebrowser rules ls
|
||||
|
||||
List global rules or user specific rules
|
||||
|
||||
## Synopsis
|
||||
|
||||
List global rules or user specific rules.
|
||||
|
||||
```
|
||||
filebrowser rules ls [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for ls
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
-i, --id uint id of user to which the rules apply
|
||||
-u, --username string username of user to which the rules apply
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser rules](filebrowser-rules.md) - Rules management utility
|
||||
|
||||
40
www/docs/cli/filebrowser-rules-rm.md
Normal file
40
www/docs/cli/filebrowser-rules-rm.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# filebrowser rules rm
|
||||
|
||||
Remove a global rule or user rule
|
||||
|
||||
## Synopsis
|
||||
|
||||
Remove a global rule or user rule. The provided index
|
||||
is the same that's printed when you run 'rules ls'. Note
|
||||
that after each removal/addition, the index of the
|
||||
commands change. So be careful when removing them after each
|
||||
other.
|
||||
|
||||
You can also specify an optional parameter (index_end) so
|
||||
you can remove all commands from 'index' to 'index_end',
|
||||
including 'index_end'.
|
||||
|
||||
```
|
||||
filebrowser rules rm <index> [index_end] [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for rm
|
||||
--index uint index of rule to remove
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
-i, --id uint id of user to which the rules apply
|
||||
-u, --username string username of user to which the rules apply
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser rules](filebrowser-rules.md) - Rules management utility
|
||||
|
||||
34
www/docs/cli/filebrowser-rules.md
Normal file
34
www/docs/cli/filebrowser-rules.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# filebrowser rules
|
||||
|
||||
Rules management utility
|
||||
|
||||
## Synopsis
|
||||
|
||||
On each subcommand you'll have available at least two flags:
|
||||
"username" and "id". You must either set only one of them
|
||||
or none. If you set one of them, the command will apply to
|
||||
an user, otherwise it will be applied to the global set or
|
||||
rules.
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for rules
|
||||
-i, --id uint id of user to which the rules apply
|
||||
-u, --username string username of user to which the rules apply
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser](filebrowser.md) - A stylish web-based file browser
|
||||
* [filebrowser rules add](filebrowser-rules-add.md) - Add a global rule or user rule
|
||||
* [filebrowser rules ls](filebrowser-rules-ls.md) - List global rules or user specific rules
|
||||
* [filebrowser rules rm](filebrowser-rules-rm.md) - Remove a global rule or user rule
|
||||
|
||||
48
www/docs/cli/filebrowser-users-add.md
Normal file
48
www/docs/cli/filebrowser-users-add.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# filebrowser users add
|
||||
|
||||
Create a new user
|
||||
|
||||
## Synopsis
|
||||
|
||||
Create a new user and add it to the database.
|
||||
|
||||
```
|
||||
filebrowser users add <username> <password> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
--aceEditorTheme string ace editor's syntax highlighting theme for users
|
||||
--commands strings a list of the commands a user can execute
|
||||
--dateFormat use date format (true for absolute time, false for relative)
|
||||
-h, --help help for add
|
||||
--hideDotfiles hide dotfiles
|
||||
--locale string locale for users (default "en")
|
||||
--lockPassword lock password
|
||||
--perm.admin admin perm for users
|
||||
--perm.create create perm for users (default true)
|
||||
--perm.delete delete perm for users (default true)
|
||||
--perm.download download perm for users (default true)
|
||||
--perm.execute execute perm for users (default true)
|
||||
--perm.modify modify perm for users (default true)
|
||||
--perm.rename rename perm for users (default true)
|
||||
--perm.share share perm for users (default true)
|
||||
--scope string scope for users (default ".")
|
||||
--singleClick use single clicks only
|
||||
--sorting.asc sorting by ascending order
|
||||
--sorting.by string sorting mode (name, size or modified) (default "name")
|
||||
--viewMode string view mode for users (default "list")
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser users](filebrowser-users.md) - Users management utility
|
||||
|
||||
30
www/docs/cli/filebrowser-users-export.md
Normal file
30
www/docs/cli/filebrowser-users-export.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# filebrowser users export
|
||||
|
||||
Export all users to a file.
|
||||
|
||||
## Synopsis
|
||||
|
||||
Export all users to a json or yaml file. Please indicate the
|
||||
path to the file where you want to write the users.
|
||||
|
||||
```
|
||||
filebrowser users export <path> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for export
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser users](filebrowser-users.md) - Users management utility
|
||||
|
||||
29
www/docs/cli/filebrowser-users-find.md
Normal file
29
www/docs/cli/filebrowser-users-find.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# filebrowser users find
|
||||
|
||||
Find a user by username or id
|
||||
|
||||
## Synopsis
|
||||
|
||||
Find a user by username or id. If no flag is set, all users will be printed.
|
||||
|
||||
```
|
||||
filebrowser users find <id|username> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for find
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser users](filebrowser-users.md) - Users management utility
|
||||
|
||||
34
www/docs/cli/filebrowser-users-import.md
Normal file
34
www/docs/cli/filebrowser-users-import.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# filebrowser users import
|
||||
|
||||
Import users from a file
|
||||
|
||||
## Synopsis
|
||||
|
||||
Import users from a file. The path must be for a json or yaml
|
||||
file. You can use this command to import new users to your
|
||||
installation. For that, just don't place their ID on the files
|
||||
list or set it to 0.
|
||||
|
||||
```
|
||||
filebrowser users import <path> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for import
|
||||
--overwrite overwrite users with the same id/username combo
|
||||
--replace replace the entire user base
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser users](filebrowser-users.md) - Users management utility
|
||||
|
||||
25
www/docs/cli/filebrowser-users-ls.md
Normal file
25
www/docs/cli/filebrowser-users-ls.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# filebrowser users ls
|
||||
|
||||
List all users.
|
||||
|
||||
```
|
||||
filebrowser users ls [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for ls
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser users](filebrowser-users.md) - Users management utility
|
||||
|
||||
29
www/docs/cli/filebrowser-users-rm.md
Normal file
29
www/docs/cli/filebrowser-users-rm.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# filebrowser users rm
|
||||
|
||||
Delete a user by username or id
|
||||
|
||||
## Synopsis
|
||||
|
||||
Delete a user by username or id
|
||||
|
||||
```
|
||||
filebrowser users rm <id|username> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for rm
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser users](filebrowser-users.md) - Users management utility
|
||||
|
||||
51
www/docs/cli/filebrowser-users-update.md
Normal file
51
www/docs/cli/filebrowser-users-update.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# filebrowser users update
|
||||
|
||||
Updates an existing user
|
||||
|
||||
## Synopsis
|
||||
|
||||
Updates an existing user. Set the flags for the
|
||||
options you want to change.
|
||||
|
||||
```
|
||||
filebrowser users update <id|username> [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
--aceEditorTheme string ace editor's syntax highlighting theme for users
|
||||
--commands strings a list of the commands a user can execute
|
||||
--dateFormat use date format (true for absolute time, false for relative)
|
||||
-h, --help help for update
|
||||
--hideDotfiles hide dotfiles
|
||||
--locale string locale for users (default "en")
|
||||
--lockPassword lock password
|
||||
-p, --password string new password
|
||||
--perm.admin admin perm for users
|
||||
--perm.create create perm for users (default true)
|
||||
--perm.delete delete perm for users (default true)
|
||||
--perm.download download perm for users (default true)
|
||||
--perm.execute execute perm for users (default true)
|
||||
--perm.modify modify perm for users (default true)
|
||||
--perm.rename rename perm for users (default true)
|
||||
--perm.share share perm for users (default true)
|
||||
--scope string scope for users (default ".")
|
||||
--singleClick use single clicks only
|
||||
--sorting.asc sorting by ascending order
|
||||
--sorting.by string sorting mode (name, size or modified) (default "name")
|
||||
-u, --username string new username
|
||||
--viewMode string view mode for users (default "list")
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser users](filebrowser-users.md) - Users management utility
|
||||
|
||||
32
www/docs/cli/filebrowser-users.md
Normal file
32
www/docs/cli/filebrowser-users.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# filebrowser users
|
||||
|
||||
Users management utility
|
||||
|
||||
## Synopsis
|
||||
|
||||
Users management utility.
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for users
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser](filebrowser.md) - A stylish web-based file browser
|
||||
* [filebrowser users add](filebrowser-users-add.md) - Create a new user
|
||||
* [filebrowser users export](filebrowser-users-export.md) - Export all users to a file.
|
||||
* [filebrowser users find](filebrowser-users-find.md) - Find a user by username or id
|
||||
* [filebrowser users import](filebrowser-users-import.md) - Import users from a file
|
||||
* [filebrowser users ls](filebrowser-users-ls.md) - List all users.
|
||||
* [filebrowser users rm](filebrowser-users-rm.md) - Delete a user by username or id
|
||||
* [filebrowser users update](filebrowser-users-update.md) - Updates an existing user
|
||||
|
||||
25
www/docs/cli/filebrowser-version.md
Normal file
25
www/docs/cli/filebrowser-version.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# filebrowser version
|
||||
|
||||
Print the version number
|
||||
|
||||
```
|
||||
filebrowser version [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-h, --help help for version
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser](filebrowser.md) - A stylish web-based file browser
|
||||
|
||||
83
www/docs/cli/filebrowser.md
Normal file
83
www/docs/cli/filebrowser.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# filebrowser
|
||||
|
||||
A stylish web-based file browser
|
||||
|
||||
## Synopsis
|
||||
|
||||
File Browser CLI lets you create the database to use with File Browser,
|
||||
manage your users and all the configurations without accessing the
|
||||
web interface.
|
||||
|
||||
If you've never run File Browser, you'll need to have a database for
|
||||
it. Don't worry: you don't need to setup a separate database server.
|
||||
We're using Bolt DB which is a single file database and all managed
|
||||
by ourselves.
|
||||
|
||||
For this specific command, all the flags you have available (except
|
||||
"config" for the configuration file), can be given either through
|
||||
environment variables or configuration files.
|
||||
|
||||
If you don't set "config", it will look for a configuration file called
|
||||
.filebrowser.{json, toml, yaml, yml} in the following directories:
|
||||
|
||||
- ./
|
||||
- $HOME/
|
||||
- /etc/filebrowser/
|
||||
|
||||
The precedence of the configuration values are as follows:
|
||||
|
||||
- flags
|
||||
- environment variables
|
||||
- configuration file
|
||||
- database values
|
||||
- defaults
|
||||
|
||||
The environment variables are prefixed by "FB_" followed by the option
|
||||
name in caps. So to set "database" via an env variable, you should
|
||||
set FB_DATABASE.
|
||||
|
||||
Also, if the database path doesn't exist, File Browser will enter into
|
||||
the quick setup mode and a new database will be bootstrapped and a new
|
||||
user created with the credentials from options "username" and "password".
|
||||
|
||||
```
|
||||
filebrowser [flags]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
-a, --address string address to listen on (default "127.0.0.1")
|
||||
-b, --baseurl string base url
|
||||
--cache-dir string file cache directory (disabled if empty)
|
||||
-t, --cert string tls certificate
|
||||
-c, --config string config file path
|
||||
-d, --database string database path (default "./filebrowser.db")
|
||||
--disable-exec disables Command Runner feature (default true)
|
||||
--disable-preview-resize disable resize of image previews
|
||||
--disable-thumbnails disable image thumbnails
|
||||
--disable-type-detection-by-header disables type detection by reading file headers
|
||||
-h, --help help for filebrowser
|
||||
--img-processors int image processors count (default 4)
|
||||
-k, --key string tls key
|
||||
-l, --log string log output (default "stdout")
|
||||
--noauth use the noauth auther when using quick setup
|
||||
--password string hashed password for the first user when using quick config
|
||||
-p, --port string port to listen on (default "8080")
|
||||
-r, --root string root to prepend to relative paths (default ".")
|
||||
--socket string socket to listen to (cannot be used with address, port, cert nor key flags)
|
||||
--socket-perm uint32 unix socket file permissions (default 438)
|
||||
--token-expiration-time string user session timeout (default "2h")
|
||||
--username string username for the first user when using quick config (default "admin")
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
* [filebrowser cmds](filebrowser-cmds.md) - Command runner management utility
|
||||
* [filebrowser completion](filebrowser-completion.md) - Generate the autocompletion script for the specified shell
|
||||
* [filebrowser config](filebrowser-config.md) - Configuration management utility
|
||||
* [filebrowser hash](filebrowser-hash.md) - Hashes a password
|
||||
* [filebrowser rules](filebrowser-rules.md) - Rules management utility
|
||||
* [filebrowser users](filebrowser-users.md) - Users management utility
|
||||
* [filebrowser version](filebrowser-version.md) - Print the version number
|
||||
|
||||
@@ -34,8 +34,6 @@ theme:
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.tabs.sticky
|
||||
- navigation.sections
|
||||
- navigation.expand
|
||||
- navigation.indexes
|
||||
- navigation.top
|
||||
- navigation.instant
|
||||
@@ -44,7 +42,6 @@ theme:
|
||||
- search.share
|
||||
- content.code.copy
|
||||
- toc.follow
|
||||
- toc.integrate
|
||||
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
@@ -97,10 +94,41 @@ extra:
|
||||
|
||||
nav:
|
||||
- Home: index.md
|
||||
- Getting Started:
|
||||
- Documentation:
|
||||
- Installation: installation.md
|
||||
- Configuration: configuration.md
|
||||
- Deployment: deployment.md
|
||||
- Command Line Usage:
|
||||
- cli/filebrowser.md
|
||||
- cli/filebrowser-cmds.md
|
||||
- cli/filebrowser-cmds-add.md
|
||||
- cli/filebrowser-cmds-ls.md
|
||||
- cli/filebrowser-cmds-rm.md
|
||||
- cli/filebrowser-completion.md
|
||||
- cli/filebrowser-completion-bash.md
|
||||
- cli/filebrowser-completion-fish.md
|
||||
- cli/filebrowser-completion-powershell.md
|
||||
- cli/filebrowser-completion-zsh.md
|
||||
- cli/filebrowser-config.md
|
||||
- cli/filebrowser-config-cat.md
|
||||
- cli/filebrowser-config-export.md
|
||||
- cli/filebrowser-config-import.md
|
||||
- cli/filebrowser-config-init.md
|
||||
- cli/filebrowser-config-set.md
|
||||
- cli/filebrowser-hash.md
|
||||
- cli/filebrowser-rules.md
|
||||
- cli/filebrowser-rules-add.md
|
||||
- cli/filebrowser-rules-ls.md
|
||||
- cli/filebrowser-rules-rm.md
|
||||
- cli/filebrowser-users.md
|
||||
- cli/filebrowser-users-add.md
|
||||
- cli/filebrowser-users-export.md
|
||||
- cli/filebrowser-users-find.md
|
||||
- cli/filebrowser-users-import.md
|
||||
- cli/filebrowser-users-ls.md
|
||||
- cli/filebrowser-users-rm.md
|
||||
- cli/filebrowser-users-update.md
|
||||
- cli/filebrowser-version.md
|
||||
- Contributing:
|
||||
- Contributing: contributing.md
|
||||
- Code of Conduct: code-of-conduct.md
|
||||
|
||||
Reference in New Issue
Block a user