civic.json-cli is a command line interface that helps make civic.json easier to use. This tool will let you:
- Install a civic.json template to your repository
- Validate one that's already there.
It implements the civic.json (extended) specification, a (backwards compatible) modification to BetaNYC's original civic.json specification. The update aims to broaden civic.json's user base to include civic hackers inside and outside of government.
You can read more about that on the civic.json (extended) homepage or in its GitHub repository.
civic.json-cli is available on PyPi and can be installed with pip as:
pip install civicjson
- Python 2.7 or 3.3+
- jsonschema to validate civic.json files against the schema
- requests to get the schema and template files from GitHub and ensure they're up to date
- An active internet connection
Run civicjson init
from the base directory of your repository to initialize a civic.json file (with explanatory text).
Run civicjson validate
from the folder containing your civic.json file. If there are any errors, it will output them to the console.
Hey! Glad you're interested in getting involved, whether by flagging bugs, submitting feature requests, or otherwise improving civic.json-cli or the civic.json (extended) specification.
To get you oriented, there are two project repositories to be aware of:
- This one here, which contains the civic.json-cli Python package.
- DCgov/civic.json, which contains the schema and template on the master branch and the civic.json site (with a webform builder and validator) on the gh-pages branch.
You should also read over the LICENSE.md and CONTRIBUTING.md, which govern the terms under which this project's code and your hypothetical contributions are being made available.
If you're going to modify a civic.json-cli fork and submit pull requests, be sure to add tests to validate your changes.