Read attribute file from outside script


I’m building some internal app for my company and as part of it I need get all attribute names from attribute file (not from chef-server). Of course I can write a parser, but may be there is some existing way doing it?
For example I’m thinking of creating a test node (‘testnode’)), and then may be some how load attribute file using ready methods.But I’m a little confused here. Do I need to create ‘Chef::RunContext’ and then somehow use ‘Chef::RunContext::CookbookCompiler.compile_attributes’? Or I’m complicating things and just don’t see a simple solution.
I would be greatful for any tips or solutions.
–Thanks in advance, Daniil.