Skip to main content
skill CX Codex

cli-anything-nslogger — Claude Code skill: how to install and use

CLI harness for parsing, filtering, and streaming NSLogger files. It lets your coding agent inspect iOS and macOS crash logs without launching the desktop GUI.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add HKUDS/CLI-Anything --skill cli-anything-nslogger -a claude-code
Open on GitHub

What cli-anything-nslogger does

The skill exposes the cli-anything-nslogger command-line utility to inspect .rawnsloggerdata and .nsloggerdata session files. Agents can read log streams, apply regex patterns, filter by thread, and isolate errors marked with log level 0. Output formats include plain text, structured JSON, and CSV tables.

For live diagnostics, the listen command accepts incoming traffic directly from iOS apps. Its Bonjour discovery mode mirrors the official macOS desktop viewer by advertising a native _nslogger-ssl._tcp service. When auto-discovery is unavailable, direct TLS connections over custom ports keep the pipeline working.

Running live captures without network discovery will fail if the client lacks manual host settings. You must also install the Python package before running any commands, since the CLI binary handles all parsing under the hood.

What it helps with

  • inspect captured .rawnsloggerdata crash dumps from iOS devices
  • filter unrecoverable errors and warnings by tag or thread ID
  • stream live logs over Bonjour during an interactive debugging session
  • convert binary NSLogger data into CSV or JSON summaries

Example prompts for the agent

  • cli-anything-nslogger stats crash.rawnsloggerdata --json
  • Find all level 0 errors in session.rawnsloggerdata with tag Network
  • cli-anything-nslogger listen --bonjour --name bazinga --output app.log

How to install cli-anything-nslogger

1Skills CLI (Vercel)

npx skills add HKUDS/CLI-Anything --skill cli-anything-nslogger -a claude-code

2Manually: put the files in place

~/.claude/skills/cli-anything-nslogger/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cli-anything-nslogger/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about cli-anything-nslogger

How to install cli-anything-nslogger in Claude Code?

Run npx skills add HKUDS/CLI-Anything --skill cli-anything-nslogger -a claude-code in your terminal. You will also need the cli-anything-nslogger Python binary installed in your environment.

What does cli-anything-nslogger do?

It provides CLI commands to parse, filter, export, and monitor log files generated by the NSLogger framework for iOS and macOS. This enables automated crash inspection and live log streaming from the terminal.

When should you use Bonjour mode instead of direct TCP?

Bonjour mode matches the desktop NSLogger GUI behavior by advertising the _nslogger-ssl._tcp service for auto-discovery. Direct TCP mode is necessary only when the mobile app specifies a static host and port.

Source text

SKILL.md · Apache-2.0
---
name: "cli-anything-nslogger"
description: CLI harness for NSLogger — parse, filter, export, and monitor NSLogger log files (.rawnsloggerdata / .nsloggerdata)
version: 0.1.0
install: pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=nslogger/agent-harness
binary: cli-anything-nslogger
tags: [logging, ios, macos, debugging, nslogger]
---

# cli-anything-nslogger

A complete CLI harness for [NSLogger](https://github.com/fpillet/NSLogger), the macOS log viewer for iOS/macOS apps.

## Installation

```bash
cd nslogger/agent-harness
pip install -e .
# Verify
cli-anything-nslogger --help
```

## Command Reference

### `generate` — Create sample files for testing

```bash
cli-anything-nslogger generate sample.rawnsloggerdata --count 50
```

### `read` — Display messages from a file

```bash
# 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

```bash
# 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

```bash
# 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

```bash
# Human-readable summary
cli-anything-nslogger stats session.rawnsloggerdata

# JSON for agent consumption
cli-anything-nslogger stats session.rawnsloggerdata --json
```

JSON output shape:
```json
{
  "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

```bash
# 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

```bash
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

```json
{
  "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

```bash
# 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
```

© HKUDS · Apache-2.0 · HKUDS/CLI-Anything

Similar skills

Everything for Mobile →

From the same set55

cli-anything-nsight-graphics Runs NVIDIA Nsight Graphics captures and analysis from the command line. Use it when investigating frames or GPU trace output. CX Codex +1 412installs cli-anything-lldb This skill runs stateful LLDB workflows with JSON output for breakpoints, process inspection, memory reads, and AI-client debugging through DAP. CX Codex +1 405installs cli-anything-quietshrink Compresses macOS screen recordings using Apple Silicon hardware HEVC encoding without stressing the CPU. It reduces .mov and .mp4 file size by 70–90% with visually lossless quality. CX Codex +1 387installs cli-anything-sbox A CLI with 79+ commands for s&box (Source 2): edit scenes, prefabs, materials, and configs from your agent, generate C# code, and validate your project without launching the editor. CX Codex +1 378installs cli-anything-macrocli This skill converts GUI workflows into parameterized CLI commands. An agent calls macro run <name> with parameters, and the system automatically routes execution to the right backend — API, file transformation, or UI automation. CX Codex +1 373installs cli-anything-firefly-iii Connects coding agents to Firefly III via a stateless command-line interface. Helps track accounts and transactions without lingering background processes. CX Codex +1 347installs cli-anything-mailchimp A skill that hands your agent a CLI harness for the Mailchimp Marketing API v3.0: 303 commands covering lists, campaigns, reports and automations. Useful when audiences and sends belong in code, not in the web UI. CX Codex +1 340installs cli-anything-calibre Controls Calibre libraries, edits e-book metadata, and runs format conversions directly from CLI agents. CX Codex +1 322installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor