Skip to content

configjoy is a command line tool and GUI for structured, type safe editing of configuration files.

License

Notifications You must be signed in to change notification settings

cerebralfix/configjoy

Repository files navigation

horizontal_blue(2)

configjoy

configjoy is a command line tool and GUI for structured, type safe editing of configuration files. Behind the scenes it uses Protocol Buffers to define the schema for these files, which allows you to automatically generate serialization code in most programming languages.

Note: configjoy is currently in active development and hasn't yet reached it's 1.0 release. Expect breaking changes on upgrade.

It has three main use cases:

1. Open a well known config file with built in structured editing support

configjoy package.json Screen Shot 2022-10-04 at 4 31 45 PM

2. Auto generate a .proto schema for an unknown config file

configjoy books.json

Screen Shot 2022-10-06 at 9 38 02 AM

Screen Shot 2022-10-06 at 9 39 07 AM

3. Use your own schema to edit an existing config file

configjoy --schema schema/books.proto books.json

Screen Shot 2022-10-06 at 9 41 40 AM

This utility was developed at CerebralFix.

Contributors

Nic Barker

See CONTRIBUTING.md

Installation

Requires node.js

  1. Download and extract the source code
  2. Run npm install from within the extracted folder
  3. Run node configjoy.js
    • See below or use node configjoy.js --help for more information
  4. Optionally you may find it useful to add configjoy to your path for easy access.

Custom config file usage guide

1. Create a proto file

Screen Shot 2022-09-06 at 11 50 51 AM

configjoy --schema schema/books.proto --files data/books.json

2. Admin interface for the file is auto generated

Screen Shot 2022-10-03 at 4 12 07 PM

Admin interface live updates the backing .json data file

Screen.Recording.2022-09-05.at.9.41.17.PM.mov

C# Integration allows Unity to hot reload the data

Screen.Recording.2022-09-05.at.9.18.58.PM.1.mov

Interface usage guide

  • Cut, copy and paste are enables when array elements are selected. Paste will insert the copied data after the last selected array element.
  • Undo & Redo are a custom implementation and will undo array element deletion, field value changes etc.
  • All changes are propagated on blur i.e. when you click your cursor outside of an input field.

About

configjoy is a command line tool and GUI for structured, type safe editing of configuration files.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published