{"id":13758510,"url":"https://github.com/simonkowallik/tmconfjs","last_synced_at":"2026-05-04T03:34:16.384Z","repository":{"id":223772678,"uuid":"761507968","full_name":"simonkowallik/tmconfjs","owner":"simonkowallik","description":"serialize F5 config (bigip.conf) to JSON","archived":false,"fork":false,"pushed_at":"2024-03-17T11:57:23.000Z","size":93,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T00:49:47.972Z","etag":null,"topics":["bigip","config","f5","f5-bigip","json","serialization"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonkowallik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-22T00:40:33.000Z","updated_at":"2024-02-26T20:59:28.000Z","dependencies_parsed_at":"2024-02-22T01:43:55.378Z","dependency_job_id":"dc405ce3-a427-4f99-805a-ed1710a7b7f9","html_url":"https://github.com/simonkowallik/tmconfjs","commit_stats":null,"previous_names":["simonkowallik/tmconfjs"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Ftmconfjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Ftmconfjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Ftmconfjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonkowallik%2Ftmconfjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonkowallik","download_url":"https://codeload.github.com/simonkowallik/tmconfjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246068301,"owners_count":20718503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigip","config","f5","f5-bigip","json","serialization"],"created_at":"2024-08-03T13:00:31.552Z","updated_at":"2026-05-04T03:34:11.364Z","avatar_url":"https://github.com/simonkowallik.png","language":"JavaScript","funding_links":[],"categories":["Automation Toolchain"],"sub_categories":[],"readme":"# tmconfjs\n\n**tmconfjs** provides a simple parser (`tmconfjs` command) to serialize a tmconf file (eg. `/config/bigip.conf`) to JSON. The produced JSON is printed to `STDOUT` or a specified file.\n\nThis project aims to be a minimalistic dependency free tool. It vendors the necessary code from the community project [F5 BIG-IP Automation Config Converter (BIG-IP ACC)](https://github.com/f5devcentral/f5-automation-config-converter/).\n\nThe TMOS configuration parser [f5-corkscrew](https://github.com/f5devcentral/f5-corkscrew) is a more sophisticated alternative with advanced functionality and active development.\n\n## Documentation by example\n\n### Installation\n\n```shell\nnpm install --global simonkowallik/tmconfjs\n```\n\n### Command line usage\n\nWhen installed globally, `tmconfjs` can be invoked as a command:\n\n```shell\ntmconfjs example/test.tmconf 2\u003e/dev/null \\\n    | jq '.\"ltm profile client-ssl clientssl-secure\"'\n```\n\n```json\n{\n  \"app-service\": \"none\",\n  \"cert\": \"/Common/default.crt\",\n  \"cert-key-chain\": {\n    \"default\": {\n      \"cert\": \"/Common/default.crt\",\n      \"key\": \"/Common/default.key\"\n    }\n  },\n  \"chain\": \"none\",\n  \"ciphers\": \"ecdhe:rsa:!sslv3:!rc4:!exp:!des\",\n  \"defaults-from\": \"/Common/clientssl\",\n  \"inherit-certkeychain\": \"true\",\n  \"key\": \"/Common/default.key\",\n  \"options\": [\n    \"no-ssl\",\n    \"no-tlsv1.3\"\n  ],\n  \"passphrase\": \"none\",\n  \"renegotiation\": \"disabled\"\n}\n```\n\nWhen this repo has been copied or cloned, invoke tmconfjs.js using node. An alternative is using npx, `npx tmconfjs` would work also.\nErrors, warnings or any debug information is written to `STDERR`:\n\n```shell\nnode ./tmconfjs.js example/test.tmconf \\\n    \u003e/dev/null 2\u003e example/test.tmconf.log\n\ncat example/test.tmconf.log\n```\n\n```shell\n2024-02-23T21:47:31.594Z WARN UNRECOGNIZED LINE: '     auto-check enabled'\n2024-02-23T21:47:31.595Z WARN UNRECOGNIZED LINE: '     auto-phonehome enabled'\n2024-02-23T21:47:31.602Z WARN UNRECOGNIZED LINE: '\ttime 500'\n2024-02-23T21:47:31.602Z WARN UNRECOGNIZED LINE: '\tenabled yes'\n```\n\nInput is also accepted from `STDIN`:\n\n```shell\ncat example/imap.tmconf | node tmconfjs.js\n```\n\n```json\n{\n    \"ltm profile imap imap\": {\n        \"activation-mode\": \"require\"\n    }\n}\n```\n\nThe `\u003cfile_path\u003e` argument is preferred over `STDIN` however:\n\n```shell\ncat example/imap.tmconf | node tmconfjs.js example/pop3.tmconf\n```\n\n```json\n{\n    \"ltm profile pop3 pop3\": {\n        \"activation-mode\": \"require\"\n    }\n}\n```\n\nThe output can be written to a specified file using `--output` or `-o` when `STDOUT` is not desired:\n\n```shell\nnode tmconfjs.js --output example/pop3.json example/pop3.tmconf\ncat example/pop3.json\n```\n\n```json\n{\n    \"ltm profile pop3 pop3\": {\n        \"activation-mode\": \"require\"\n    }\n}\n```\n\nMore debug information is available and might help understand issues:\n\n```shell\nexport LOG_LEVEL=debug\ncat example/imap.tmconf | node tmconfjs.js example/pop3.tmconf 2\u003e debug.log\n```\n\n```json\n{\n    \"ltm profile pop3 pop3\": {\n        \"activation-mode\": \"require\"\n    }\n}\n```\n\n```shell\ncat debug.log\n```\n\n```shell\n2024-02-23T21:54:04.300Z DEBUG Parsing from \u003cfile_path\u003e: example/pop3.tmconf\n2024-02-23T21:54:04.302Z DEBUG Parsing data\n```\n\n### Container / Docker\n\nNote the docker run options, `--rm` deletes the container right after it was executed and ended,\n`-i` run the container interactively (required for STDIN to work). Also note the absence of the common `-t` option, which indicates a TTY/terminal - STDIN would fail when this is used.\n\n```shell\ncat example/imap.tmconf | docker run --rm -i simonkowallik/tmconfjs\n```\n\n```json\n{\n    \"ltm profile imap imap\": {\n        \"activation-mode\": \"require\"\n    }\n}\n```\n\nUsing volumes is another option:\n\n```shell\ndocker run --rm -v $PWD/example:/data simonkowallik/tmconfjs \\\n    tmconfjs /data/pop3.tmconf -o /data/pop3.json\n\ncat example/pop3.json\n```\n\n```json\n{\n    \"ltm profile pop3 pop3\": {\n        \"activation-mode\": \"require\"\n    }\n}\n```\n\n### Use as module\n\nA simple `demo.js` is available at [example/demo.js](./example/demo.js).\n\nJust require either `parse` or `parseFile`. Both take a string as input, `parse` expects tmconf within the string while `parseFile` expects a path to a tmconf file.\n\n```javascript\n// demo.js\n'use strict'\n\n// use parse function from tmconfjs.js\nconst parse = require('../tmconfjs.js').parse\n\nconst tmconf = `\nltm profile pop3 pop3 {\n    activation-mode require\n}`\n\n// supply string with tmconf to parse function\nconst tmconfAsJSON = parse(tmconf)\n\nconsole.log(JSON.stringify(tmconfAsJSON, null, 4))\n```\n\n```shell\nnode example/demo.js\n```\n\n```json\n{\n    \"ltm profile pop3 pop3\": {\n        \"activation-mode\": \"require\"\n    }\n}\n```\n\n## Disclaimer, Support, License\n\nPlease read and understand the [LICENSE](./LICENSE) first.\n\nThere is no support on this project. It is maintained on best effort basis without any warranties.\n\nFor any software or components used in this project, read their own LICENSE and SUPPORT policies.\n\nIf you decide to use this project, you are solely responsible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonkowallik%2Ftmconfjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonkowallik%2Ftmconfjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonkowallik%2Ftmconfjs/lists"}