@logfox/cli
v0.0.1
Published
Logfox CLI for local development logging
Readme
@logfox/cli
CLI tool for sending local development logs to Logfox.
Installation
npm install -g @logfox/cliQuick Start
# Authenticate
logspace login
# Run your app with logging
logspace run --name my-app -- npm startLogs appear in Logfox under environment "local".
Commands
Run logspace --help to see all available commands.
How it Works
logspace runwraps your command and captures stdout/stderr- Logs are parsed (JSON or plain text) and batched
- Sent to Logfox under environment "local" with app name
local-{hash}-{name} - Issues are detected and grouped just like production logs
Log Parsing
- JSON logs (pino, winston, bunyan): Structure is extracted automatically
- Plain text: Log levels detected from common patterns (ERROR, WARN, INFO, DEBUG)
Configuration
Config is stored in ~/.logfox/config.json. Use logspace config to view current settings.
| Key | Default | Description |
|-----|---------|-------------|
| apiUrl | https://api.logfox.ai | Logfox API endpoint |
| appUrl | https://app.logfox.ai | Logfox web app (for login) |
| teamId | (from login) | Active team |
Local Development
To point the CLI at local services:
logspace config:set apiUrl http://localhost:3000
logspace config:set appUrl http://localhost:4000
logspace login