id = "fblog"
name = "fblog"
homepage = "https://github.com/brocode/fblog"
description = "Small command-line JSON log viewer"
executables = ["fblog"]
[dotfiles]
paths = [
"[appData]/fblog.toml",
"~/.config/fblog.toml",
"%APPDATA%/fblog.toml",
]
secret = []
side_effect = false
[commands]
format = 1
label = "View JSON logs"
description = "Pretty-print JSON log lines from a file or stdin with optional Lua filter and extra fields. Output templates and level mapping are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true }
[[commands.source]]
id = "help"
kind = "help"
url = "https://github.com/brocode/fblog/blob/master/src/app.rs"
revision = "master 2026-10-27"
evidence = """
-a, --additional-value <additional-value> adds additional values
-x, --excluded-value <excluded-value> Excludes values (--dump-all is enabled implicitly)
-d, --dump-all dumps all values
-p, --with-prefix consider all text before opening curly brace as prefix
-f, --filter <filter> lua expression to filter log entries. `message ~= nil and string.find(message, "text.*") ~= nil`
-m, --message-key <message-key> Adds an additional key to detect the message in the log entry.
-t, --time-key <time-key> Adds an additional key to detect the time in the log entry.
-l, --level-key <level-key> Adds an additional key to detect the level in the log entry.
--no-implicit-filter-return-statement if you pass a filter expression 'return' is automatically prepended. Pass this switch to disable the implicit return.
[INPUT] Sets the input file to use, otherwise assumes stdin
"""
[[commands.field]]
id = "input"
label = "Log file"
description = "Leave empty to read stdin."
type = "path"
position = 0
path = { kind = "file", role = "input" }
sources = ["help"]
[[commands.field]]
id = "filter"
label = "Lua filter"
type = "string"
option = ["--filter", "-f"]
sources = ["help"]
[[commands.field]]
id = "dump_all"
label = "Dump all values"
type = "boolean"
option = ["--dump-all", "-d"]
sources = ["help"]
[[commands.field]]
id = "additional_value"
label = "Additional values"
type = "string"
option = ["--additional-value", "-a"]
multiple = true
sources = ["help"]
[[commands.field]]
id = "excluded_value"
label = "Excluded values"
type = "string"
option = ["--excluded-value", "-x"]
multiple = true
sources = ["help"]
[[commands.field]]
id = "with_prefix"
label = "Lines have a text prefix"
type = "boolean"
option = ["--with-prefix", "-p"]
sources = ["help"]
[[commands.field]]
id = "message_key"
label = "Extra message key"
type = "string"
option = ["--message-key", "-m"]
multiple = true
sources = ["help"]
[[commands.field]]
id = "time_key"
label = "Extra time key"
type = "string"
option = ["--time-key", "-t"]
multiple = true
sources = ["help"]
[[commands.field]]
id = "level_key"
label = "Extra level key"
type = "string"
option = ["--level-key", "-l"]
multiple = true
sources = ["help"]
[[commands.field]]
id = "no_implicit_return"
label = "No implicit return in filter"
type = "boolean"
option = ["--no-implicit-filter-return-statement"]
sources = ["help"]
[[commands.task]]
id = "view"
label = "View a log file"
fields = ["input"]
required = ["input"]
[[commands.task]]
id = "filter"
label = "Filter entries"
fields = ["input", "filter"]
required = ["filter"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["input", "filter", "dump_all", "additional_value", "excluded_value", "with_prefix"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["message_key", "time_key", "level_key", "no_implicit_return"]