Free launches are open: 12 a day, and open-source projects get a dofollow link with no badge.

Submit

json2dir

Convert JSON files into directory trees and files

Developer ToolsFreeOpen source · verified#cli#configuration-management#json

Listed by the ProductPerch team from lobste.rs · not launched here yet

What is json2dir?

json2dir is a command-line tool that converts structured JSON data into actual directory trees, files, and symbolic links. It reads a JSON object where keys represent filenames and values define their type and content. This approach turns configuration files into human-readable directory snapshots that can be deployed directly to a filesystem.

The tool uses a simple conversion scheme. String values become regular files containing the provided text. Objects are treated as subdirectories. Arrays are used to create symbolic links or executable shell scripts based on a prefix string. All paths must be relative, and the tool processes UTF-8 encoded strings.

Designed for developers and system administrators, json2dir integrates well with configuration management workflows. It can replace traditional dotfile managers when paired with tools like Nix, allowing users to version control and deploy complex directory structures using standard JSON syntax.

json2dir features

  • Converts JSON objects into directory structures
  • Creates regular files from string values
  • Generates symbolic links using array syntax
  • Builds executable shell scripts from arrays
  • Supports nested directories via nested objects
  • Handles UTF-8 encoded file contents
  • Compatible with Nix and home-manager workflows

Who uses json2dir and for what

  • Version controlling and deploying dotfiles across multiple machines
  • Replacing home-manager configurations with JSON-based directory definitions
  • Packaging application templates or scaffolds as deployable directory trees
  • Automating setup scripts that require specific file layouts and permissions
  • Sharing reproducible development environment configurations via JSON

json2dir FAQ

Is json2dir free?

Yes, json2dir is free to use and distributed under an ISC license.

Is json2dir open source?

Yes, the source code is publicly available on GitHub under the ISC license.

What is json2dir used for?

It converts JSON objects into directory trees, files, symlinks, and executable scripts for configuration management and deployment.

Does json2dir work on Mac?

Yes, it can be installed via Cargo or Nix flakes and runs on macOS.

Can json2dir create symbolic links?

Yes, you can use an array with the prefix link followed by the target path to create symbolic links.

Does json2dir support Windows?

The tool runs on Windows, but it does not support creating symbolic links or executable scripts on that platform.

Comments (0)

Comments and upvotes open when this product launches on ProductPerch.

More Developer Tools launches

All Developer Tools tools

Launch packs

Buy paid launches