{"id":16248082,"url":"https://github.com/vincentbernat/junos-mode","last_synced_at":"2025-03-19T19:31:44.612Z","repository":{"id":140173537,"uuid":"21614603","full_name":"vincentbernat/junos-mode","owner":"vincentbernat","description":"Emacs major mode for JunOS configuration file","archived":false,"fork":false,"pushed_at":"2022-11-05T09:11:39.000Z","size":149,"stargazers_count":11,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T20:39:30.687Z","etag":null,"topics":["emacs","junos-mode","junos-pyez","netops","org-mode"],"latest_commit_sha":null,"homepage":"https://vincent.bernat.im/en/blog/2017-netops-org-mode","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vincentbernat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2014-07-08T13:56:00.000Z","updated_at":"2024-12-04T18:32:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea6116b8-274b-4139-ae11-cf3e89a46caf","html_url":"https://github.com/vincentbernat/junos-mode","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fjunos-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fjunos-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fjunos-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fjunos-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vincentbernat","download_url":"https://codeload.github.com/vincentbernat/junos-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244014132,"owners_count":20383715,"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":["emacs","junos-mode","junos-pyez","netops","org-mode"],"created_at":"2024-10-10T14:39:59.540Z","updated_at":"2025-03-19T19:31:44.605Z","avatar_url":"https://github.com/vincentbernat.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mode for Junos configuration files\n\nThis features `junos-mode` a mode for editing Junos-like files.\n\nThere is currently no configuration knob.\n\n![Screenshot of junos-mode](screenshot.jpg)\n\n## Install\n\nWith `use-package` and `quelpa`:\n\n``` emacs-lisp\n(use-package junos-mode\n  :quelpa (junos-mode :fetcher github\n                      :repo \"vincentbernat/junos-mode\"\n                      :files (:defaults \"junos.py\"))\n  :defer t)\n```\n\nWith Doom Emacs:\n\n``` emacs-lisp\n(package! junos-mode :recipe (:host github\n                              :repo \"vincentbernat/junos-mode\"\n                              :files (:defaults \"junos.py\")))\n```\n\n## Integration with org-mode and Babel\n\nIt also comes with an integration with org-mode and Babel. It uses a\nsmall Python helper to efficiently handle several parallel sessions\nasynchronously. This helper\nuses [Junos PyEZ](https://github.com/Juniper/py-junos-eznc).\n\n``` org\n#+BEGIN_SRC junos :host alfred.exoscale.local\nsystem {\n    time-zone Europe/Paris;\n}\n#+END_SRC\n\n#+RESULTS:\n#+begin_example\nLoad replace: ✓\nChecks: ✓\n\nDifferences\n‾‾‾‾‾‾‾‾‾‾‾\n   [edit system]\n   -  time-zone Europe/Zurich;\n   +  time-zone Europe/Paris;\n   \n#+end_example\n```\n\n    \nYou can also execute CLI commands:\n\n``` org\n#+BEGIN_SRC junos :host alfred.exoscale.local\nshow version\n#+END_SRC\n\n#+RESULTS:\n#+begin_example\n   \n   fpc0:\n   --------------------------------------------------------------------------\n   Hostname: alfred\n   Model: qfx5100-48s-6q\n   Junos: 14.1X53-D35.3\n   JUNOS Base OS Software Suite [14.1X53-D35.3]\n   JUNOS Base OS boot [14.1X53-D35.3]\n   JUNOS Online Documentation [14.1X53-D35.3]\n   JUNOS Crypto Software Suite [14.1X53-D35.3]\n   JUNOS Kernel Software Suite [14.1X53-D35.3]\n   JUNOS Packet Forwarding Engine Support (qfx-ex-x86-32) [14.1X53-D35.3]\n   JUNOS Routing Software Suite [14.1X53-D35.3]\n   JUNOS SDN Software Suite [14.1X53-D35.3]\n   JUNOS Enterprise Software Suite [14.1X53-D35.3]\n   JUNOS Web Management Platform Package [14.1X53-D35.3]\n   JUNOS py-base-i386 [14.1X53-D35.3]\n   JUNOS Host Software [13.2X51-D38]\n   \n#+end_example\n```\n\nThere are some limitations with this integration. Notably, it expects\nthe output of the execution will be in a block, like above. If you\nforce another representation, this won't work as expected.\n\nThis is only compatible with with Org 9. It also requires\nthe [UUID module](https://github.com/nicferrier/emacs-uuid).\n\nNote that the helper program is\nusing [Junos PyEZ](http://junos-pyez.readthedocs.io/) which doesn't\ncheck SSH keys.\n\nA host should use one of the following form:\n\n - `host.example.com` (default user from `~/.ssh/config` and\n   authentication with SSH key)\n - `user@host.example.com` (authentication with SSH key)\n - `user:password@host.example.com` (authentication with password)\n\n## Demo\n\nSee this [blog post](https://vincent.bernat.ch/en/blog/2017-netops-org-mode). It\nincludes 3 videos demonstrating this mode.\n\n## License\n\n\u003e This file is free software; you can redistribute it and/or modify\n\u003e it under the terms of the GNU General Public License as published by\n\u003e the Free Software Foundation; either version 2, or (at your option)\n\u003e any later version.\n\u003e\n\u003e This file is distributed in the hope that it will be useful,\n\u003e but WITHOUT ANY WARRANTY; without even the implied warranty of\n\u003e MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\u003e GNU General Public License for more details.\n\u003e\n\u003e You should have received a copy of the GNU General Public License\n\u003e along with GNU Emacs; see the file COPYING.  If not, write to\n\u003e the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n\u003e Boston, MA 02111-1307, USA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentbernat%2Fjunos-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvincentbernat%2Fjunos-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentbernat%2Fjunos-mode/lists"}