cli: add JSON output to get and list commands, and JSON and raw output to message poll
Los mantenedores suelen responder en 2 días
@shAn-kor ya está trabajando en esto.
Desde el 24/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 49/100
Línea de trabajo
Start with core/cli/src/commands/binary_system/stats.rs for existing output options, core/cli/src/commands/binary_message/poll_messages.rs for poll formatting, and core/cli/src/main.rs for the execution line. Then locate get/list command definitions and tests; the issue does not enumerate them. Done when all get/list commands support the requested JSON output and message poll meets the output, encoding, stdout, and acceptance requirements.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
- Only
iggy statscan print JSON or TOML (-o json|toml,core/cli/src/commands/binary_system/stats.rs:243-244). All other get and list commands print tables, and the list commands use another flag,-l, --list-mode table|list. #749 asked for JSON output in 2024 and was closed afterstatsonly (#756). iggy message pollprints a table and converts each payload withString::from_utf8_lossy(core/cli/src/commands/binary_message/poll_messages.rs:141). Invalid UTF-8 prints as U+FFFD, and a payload with\nspans two rows.--output-filewrites whole messages, but no option prints the payloads alone.- The
Executing ...line goes to stdout (core/cli/src/main.rs:428-432), soiggy stats -o json | jq .fails.-qhides this line, but it also hides the output of all commands exceptstatsandpat create. #772 asked to move the logs to stderr.
Proposal
- Add
-o, --output <table|list|json>to every get and list command, and keep-l, --list-modefor the list commands. Use the JSON shapes of the HTTP API, because the server response types already implementSerialize. - In the context commands, mask passwords and tokens, as
context showdoes. - Add
--output <table|json|raw>tomessage poll, with no short form, because-ois--offsetthere.jsonwrites one JSON object per message per line. Write the message ID as a string, because JavaScript and many JSON tools round 128-bit numbers.--payload-encoding <base64|hex|utf8>sets the payload format, and the default isbase64.utf8fails on a payload that is not valid UTF-8.rawwrites only the payload bytes, each followed by\n.
- In JSON and raw mode, write only the output to stdout.
Notes
- TOML cannot hold a top-level array, so the list commands cannot print TOML.
Acceptance
jqcan parse the output of every get and list command with-o json, and ofmessage poll --output json.- For non-empty, single-line UTF-8 payloads,
message poll --output raw | message sendsends the same payloads again.
- Lenguaje dominante
- Rust
- Estrellas
- 5.3k
- Forks
- 548
- Merge medio
- 2 d 20 h
- PR fusionados (30 d)
- 194
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/iggy
-
go good first issue test
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
go good first issue test
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días
-
go good first issue test
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
good first issue java test
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
good first issue javascript test
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
Todos los issues de apache/iggy
Issues similares
-
bug triaged tui ux wontfix
Dificultad 2/5 Medio día Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
bevyengine/bevy#26642 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día