@logtura/cli
v0.2.11
Published
OSS CLI for validating Logtura configs and generating Vector forwarder bundles.
Readme
@logtura/cli
OSS command-line tool for the Logtura renderer.
The CLI includes the current Logtura source drivers and destinations. It parses
a human-authored logtura.yaml, feeds the existing @logtura/core renderer,
and writes complete forwarder artifacts: vector.yaml, Dockerfile, .env,
install script, and component manifest.
npm install -g @logtura/cliCommands
logtura validate -c logtura.yaml
logtura validate -c logtura.yaml --vector-validate
logtura bundle -c logtura.yaml -o dist/logtura-forwarder
logtura install-zip -c logtura.yaml -o logtura-forwarder.tgz
logtura stats --metrics metrics.jsonvalidateparses config and renders a bundle without writing files.--vector-validatewrites a temporary generated config and runsvector validateif Vector is installed locally.bundlewrites an unpacked self-hostable forwarder directory.install-zipwrites a gzipped tarball containing the same files.statsreads Vectorinternal_metricsJSON/NDJSON and prints a simple component counter table.
Config
Minimal Cloudflare Workers -> Slack config:
sources:
workers:
provider: cloudflare-worker-tail
account_id: env:CLOUDFLARE_ACCOUNT_ID
api_token: env:CLOUDFLARE_API_TOKEN
scripts:
- dirtsignal
- ipogrid
sinks:
slack:
type: slack
webhook_url: env:SLACK_WEBHOOK_URL
channel: "#alerts"
monitors:
- name: worker-errors
filter:
- errors
- rollup:
window_secs: 30
group_by: [script]
max_samples: 5
sinks: [slack]env:NAME values are resolved from the local environment. Missing env values
are reported by validate; the command exits with code 2 after confirming
the rest of the config can render.
Source Examples
Fly apps:
sources:
fly:
provider: fly-log-tail
account_id: personal
api_token: env:FLY_API_TOKEN
apps: [my-app]Supabase Edge Functions and project gateway:
sources:
supabase:
provider: supabase-edge-logs
account_id: env:SUPABASE_PROJECT_REF
pat: env:SUPABASE_PAT
gateway: true
functions:
- slug: agent-chat
function_id: 00000000-0000-0000-0000-000000000000Cloudflare AI Gateway:
sources:
ai:
provider: cloudflare-ai-gateway
account_id: env:CLOUDFLARE_ACCOUNT_ID
api_token: env:CLOUDFLARE_API_TOKEN
gateways: [my-gateway]Vercel Runtime Logs:
sources:
vercel:
provider: vercel-logs
# Optional for team-owned projects.
team_id: env:VERCEL_TEAM_ID
api_token: env:VERCEL_API_TOKEN
projects:
- prj_xxxCustom Vector source and sink:
sources:
bob:
provider: custom-vector
display_name: Bob
vector:
include: ./vector/bob.yaml
feed: bob_norm
sinks:
joe:
type: custom-vector
vector:
include: ./vector/joe.yaml
monitors:
- name: bob-to-joe
filter: [errors]
sinks: [joe]bob.yaml may define sources and transforms; feed names the component
Logtura reads from. joe.yaml may define transforms and sinks; Logtura
rewrites its single dangling input reference to the monitor output. Set
vector.input when the sink graph has more than one dangling input.
Output
logtura bundle -o dist/logtura-forwarder writes:
Dockerfilevector.yamlmanifest.json.envinstall.shREADME.md
Run the generated forwarder with:
cd dist/logtura-forwarder
./install.shNotes
The CLI starts from explicit config and environment variables. It validates,
bundles, and installs a local forwarder from logtura.yaml.
