
CLI Anything NSLogger
FreeEfficiently manage NSLogger log files from the command line.
Free · Opens the source repo
What CLI Anything NSLogger does
CLI Anything NSLogger is a command-line interface designed to work with NSLogger, a powerful logging tool for macOS and iOS applications. This skill allows developers to parse, filter, export, and monitor NSLogger log files, enabling them to efficiently analyze logs generated during application execution. By providing a suite of commands, this tool streamlines the process of debugging and log management, making it easier to identify issues and gather insights from log data.
The CLI harness includes several key commands: generate creates sample log files for testing, while read displays messages from existing log files with options to filter by log level, tag, or search terms. The filter command offers advanced filtering capabilities, allowing users to extract specific log entries based on various criteria, such as error levels or regular expressions. For exporting log data, the export command supports multiple formats, including text, JSON, and CSV, making it easy to share or analyze logs in different contexts.
Additionally, the stats command provides summary statistics about the log data, helping developers quickly assess the state of their applications. The listen command allows for real-time log monitoring, mirroring the functionality of the NSLogger GUI, and the interactive repl command offers a command-line interface for direct interaction with log files. This skill is particularly useful for developers working on iOS and macOS applications who need a robust solution for log management and debugging.
When to use it
Use this skill when you need to parse, filter, or export NSLogger log data from the command line, especially during the debugging of iOS or macOS applications.
When not to use it
This skill may not be suitable for users who prefer a graphical interface for log analysis or those who do not work with NSLogger log files.
What you can build with it
Inspecting Crash Logs
Use the 'stats' command to analyze crash log files and identify the number of errors and warnings before a crash.
Filtering Network Errors
Quickly filter log files for network-related errors using the 'filter' command with specific tags and regex patterns.
Exporting Logs for Analysis
Export full log data to JSON or CSV format for offline analysis or sharing with team members.
How to install CLI Anything NSLogger
View source1. Install with the skills CLI
npx skills add hkuds/cli-anything/skills --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by hkudscli-anything-nslogger
A complete CLI harness for NSLogger, the macOS log viewer for iOS/macOS apps.
Installation
cd nslogger/agent-harness
pip install -e .
# Verify
cli-anything-nslogger --help
Command Reference
generate — Create sample files for testing
cli-anything-nslogger generate sample.rawnsloggerdata --count 50
read — Display messages from a file
# All messages
cli-anything-nslogger read session.rawnsloggerdata
# Errors only (level 0)
cli-anything-nslogger read session.rawnsloggerdata --level 0
# Filter by tag and text search
cli-anything-nslogger read session.rawnsloggerdata --tag Network --search "timeout"
# First 20 messages as JSON
cli-anything-nslogger read session.rawnsloggerdata --limit 20 --json
filter — Advanced filtering
# Errors and warnings only
cli-anything-nslogger filter session.rawnsloggerdata --level 1
# By tag
cli-anything-nslogger filter session.rawnsloggerdata --tag Auth --tag Network
# Regex search
cli-anything-nslogger filter session.rawnsloggerdata --regex "(timeout|failed|error)"
# By thread
cli-anything-nslogger filter session.rawnsloggerdata --thread "main"
# JSON output
cli-anything-nslogger filter session.rawnsloggerdata --level 0 --json
export — Export to text/JSON/CSV
# JSON to stdout
cli-anything-nslogger export session.rawnsloggerdata --format json
# CSV to file
cli-anything-nslogger export session.rawnsloggerdata --format csv --output logs.csv
# Filtered text export
cli-anything-nslogger export session.rawnsloggerdata --format text --level 1 --tag Network
stats — Summary statistics
# Human-readable summary
cli-anything-nslogger stats session.rawnsloggerdata
# JSON for agent consumption
cli-anything-nslogger stats session.rawnsloggerdata --json
JSON output shape:
{
"total": 342,
"by_level": {"ERROR": 12, "WARNING": 34, "INFO": 200, "DEBUG": 96},
"by_tag": {"Network": 89, "Auth": 45, "UI": 120},
"by_thread": {"main": 200, "bg-queue": 142},
"by_type": {"text": 340, "client_info": 1, "disconnect": 1},
"clients": ["MyApp"],
"first_timestamp": "2024-01-01T10:00:00+00:00",
"last_timestamp": "2024-01-01T10:05:30+00:00",
"duration_seconds": 330.0
}
listen — Receive live connections
# Match the NSLogger.app GUI Bonjour behavior for iOS auto-discovery
cli-anything-nslogger listen --bonjour --name bazinga --debug
# Mirror live logs to a text file while still printing stdout
cli-anything-nslogger listen --bonjour --name bazinga --output app.log
# Write machine-readable JSON Lines
cli-anything-nslogger listen --bonjour --name bazinga --output app.jsonl --output-format jsonl
# Direct TCP/TLS mode for manually configured clients
cli-anything-nslogger listen --port 50000 --ssl --debug
# Show only errors while listening, output as JSON stream
cli-anything-nslogger listen --bonjour --name bazinga --level 0 --json
# Run until Ctrl-C
cli-anything-nslogger listen --bonjour --name bazinga
Use Bonjour mode first for iOS apps because it matches the desktop NSLogger GUI:
the CLI publishes a native macOS NetService with _nslogger-ssl._tcp and
accepts TLS NSLogger frames. Use direct TCP/TLS only when the app is manually
configured with the Mac host and port.
repl — Interactive Command REPL
cli-anything-nslogger repl session.rawnsloggerdata
# Or launch it by running cli-anything-nslogger with no subcommand.
Log Levels
| Value | Name | Use for |
|---|---|---|
| 0 | ERROR | Unrecoverable failures |
| 1 | WARNING | Recoverable issues |
| 2 | INFO | Normal operation |
| 3 | DEBUG | Developer details |
| 4 | VERBOSE | Trace-level noise |
Message JSON Shape
{
"sequence": 42,
"timestamp": "2024-01-01T10:01:23+00:00",
"timestamp_ms": 456,
"thread_id": "main",
"tag": "Network",
"level": 0,
"level_name": "ERROR",
"type": "text",
"text": "Connection timed out after 30s",
"image_width": 0,
"image_height": 0,
"client_name": "MyApp",
"client_version": "2.1.0",
"os_name": "iOS",
"os_version": "17.0",
"machine": "iPhone15,2"
}
Agent Workflow Examples
# 1. Inspect a captured crash session
cli-anything-nslogger stats crash.rawnsloggerdata --json
# 2. Find all errors in the 5 minutes before crash
cli-anything-nslogger filter crash.rawnsloggerdata --level 0 --json
# 3. Get network failures only
cli-anything-nslogger filter crash.rawnsloggerdata --tag Network --regex "fail|timeout|error" --json
# 4. Export full log for offline analysis
cli-anything-nslogger export crash.rawnsloggerdata --format json --output crash_log.json
# 5. Monitor an iOS app live and keep a local copy
cli-anything-nslogger listen --bonjour --name bazinga --output app.log --debug
Frequently asked questions about CLI Anything NSLogger
Similar skills
Agent Host Debug Logs
Analyze Agent Host debug logs for deeper insights.
Code OSS Dev - Launch + Debug
Launch and debug Code OSS with isolated profiles.
Phoenix CLI
Debug LLM applications with structured analysis tools.
Power Automate Debugging
Diagnose and fix Power Automate flow errors effectively.
Arize Trace
Inspect and export traces for LLM applications.
Runtime Behavior Probe
Investigate real runtime behavior with precision.
