Home Explore Blog CI



nushell

commands/docs/from_ini.md
df3c4b3538fa27deb3545412470d4af96e0ff642f4613c1e00000003000004a9
---
title: from ini
categories: |
  formats
version: 0.104.0
formats: |
  Parse text as .ini and create table.
usage: |
  Parse text as .ini and create table.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `from ini` for [formats](/commands/categories/formats.md)

<div class='command-title'>Parse text as .ini and create table.</div>

::: warning This command requires a plugin
The `from ini` command resides in the `formats` plugin.
To use this command, you must install and register `nu_plugin_formats`.
See the [Plugins](/book/plugins.html) chapter in the book for more information.
:::


## Signature

```> from ini {flags} ```


## Input/output types:

| input  | output |
| ------ | ------ |
| string | record |
## Examples

Converts ini formatted string to record
```nu
> '[foo]
a=1
b=2' | from ini
╭─────┬───────────╮
│     │ ╭───┬───╮ │
│ foo │ │ a │ 1 │ │
│     │ │ b │ 2 │ │
│     │ ╰───┴───╯ │
╰─────┴───────────╯
```

Chunks
3f7699ba (1st chunk of `commands/docs/from_ini.md`)
Title: from ini: Parse INI formatted text into a table
Summary
The `from ini` command is part of the `formats` category and parses text formatted as .ini, converting it into a Nushell table or record. This command is designed to handle .ini formatted strings, extracting the data and structuring it in a way that is easily accessible and usable within Nushell. Due to its reliance on external functionality, the command necessitates the `nu_plugin_formats` plugin to be installed and registered before it can be utilized. The command accepts a string as input, which should contain the .ini formatted data, and outputs a record that represents the parsed content of the .ini file. This allows users to easily work with configuration files or other data stored in the .ini format within their Nushell scripts.