{"id":40081095,"url":"https://github.com/jysk-oss/netbox-securecrt-inventory","last_synced_at":"2026-01-19T09:07:32.560Z","repository":{"id":222335875,"uuid":"731494454","full_name":"jysk-oss/netbox-securecrt-inventory","owner":"jysk-oss","description":"NetBox SecureCRT Inventory sync","archived":false,"fork":false,"pushed_at":"2025-03-31T11:43:43.000Z","size":387,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T12:34:12.780Z","etag":null,"topics":["netbox","securecrt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jysk-oss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-12-14T07:58:46.000Z","updated_at":"2025-03-31T11:43:47.000Z","dependencies_parsed_at":"2025-03-10T13:22:10.967Z","dependency_job_id":"2c79359a-734b-4a29-800a-22c83e5189c1","html_url":"https://github.com/jysk-oss/netbox-securecrt-inventory","commit_stats":null,"previous_names":["jysk-oss/netbox-securecrt-inventory","jysk-network/netbox-securecrt-inventory"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/jysk-oss/netbox-securecrt-inventory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jysk-oss%2Fnetbox-securecrt-inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jysk-oss%2Fnetbox-securecrt-inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jysk-oss%2Fnetbox-securecrt-inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jysk-oss%2Fnetbox-securecrt-inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jysk-oss","download_url":"https://codeload.github.com/jysk-oss/netbox-securecrt-inventory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jysk-oss%2Fnetbox-securecrt-inventory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28565001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T08:53:44.001Z","status":"ssl_error","status_checked_at":"2026-01-19T08:52:40.245Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["netbox","securecrt"],"created_at":"2026-01-19T09:07:32.501Z","updated_at":"2026-01-19T09:07:32.554Z","avatar_url":"https://github.com/jysk-oss.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NetBox SecureCRT Inventory\n\nHave you always wanted the ability to synchronize your NetBox devices with your SecureCRT client? Then this is for you!\n\nThis tool will automatically run in the background and perform periodic synchronization or run on-demand depending on your needs. It's highly flexible in terms of how the device structure is organized.\n\n## Installation\n\n1. Download the latest release zip file to your computer and unzip it.\n2. Create a config file named `.securecrt-inventory.yaml` in your home directory (see below for a full config example):\n   - Change `netbox_url`, and `netbox_token` as needed.\n   - Update `overrides` as needed.\n   - NB: It's also possible to create the config file by running the program as it will be created with defaults if missing.\n3. Run the program. It should now start running as a systray program.\n4. Optional: Set it to start automatically on Windows/macOS/Linux startup.\n\n*Note:* On macOS, you might need to run `xattr -cr securecrt-inventory` to be able to execute it, as the binary is not signed. Alternatively, consider building the code yourself as a workaround.\n\n## Templates and Expressions\n\nThe config supports two special types: templates and expressions. In this section, we'll cover the differences and how to use them.\n\n### Templates\n\nTemplates provide a simple way to describe what value should be placed in a field. A good example is how it's used for the default path.\n\nA template is a string with one or more `{}` placeholders inside. For example: `NetBox/{tenant_name}/{site_name}`.\nIf the tenant is \"Example\" and the site is \"Test\", the template would evaluate to `\"NetBox/Example/Test`.\n\nTemplates have access to the following variables:\n```\nsession_type: Either device or virtual_machine\ncredential: The default session credential name\npath_template: The default path template\ndevice_name_template: The default device name template\nfirewall_template: The default firewall template\nconnection_protocol_template: The default connection protocol template\ndevice_name: Device name from NetBox\ndevice_role: Device role name from NetBox\ndevice_type: Device type name from NetBox\ndevice_ip: Device IP without subnet/prefix\nregion_name: Region name from NetBox\ntenant_name: Tenant name from NetBox\nsite_name: Site name from NetBox\nsite_group: Site Group slug from NetBox\nsite_address: Site address from NetBox\nvirtual_chassis_name: Virtual Chassis name from NetBox\n```\n\n### Expressions\n\nExpressions are powered by https://expr-lang.org/ and should always start with `{{` and end with `}}`. They are used extensively to define overrides and manipulate the session output.\n\nHere are a few sample expressions to get you started:\n```\n# Returns true if the NetBox site group is adm\n{{ site_group == 'adm' }}\n\n# Returns the value of the tag \"connection_protocol\" if found, otherwise \"SSH\"\n{{ FindTag(device.Tags, 'connection_protocol') ?? 'SSH' }}\n\n# Returns true if the device name ends with example.com\n{{ device_name endsWith '.example.com' }}\n```\n\nExpressions have access to the same variables as templates, but they can also access the following:\n```\ndevice: The device object (go struct, most fields are CamelCase, ex: device.Tags)\nsite: The site object  (go struct, most fields are CamelCase, ex: site.Slug)\n```\n\nExpressions have access to all expr functions and the following:\n```\nFindTag(\u003ctags\u003e, \u003ctag_name\u003e)\n```\n\n### Debug\nIt's possible to debug expressions and templates, by enabling debug in the config file and examining the log file. The log file can be opened by clicking the icon and selecting \"Open Log\", when debug is enabled all variables will be output together with templates, and result.\n\n**IMPORTANT**: This should not be enabled always as the log file is not rotated, and debug WILL output a lot of data.\n\n## Config Example\n\n```\n# ERROR/DEBUG/INFO, default is ERROR. DEBUG logs a lot and should not be used in day-to-day operations as the log is not cleared.\nlog_level: ERROR \nnetbox_url: \u003cnetbox_url\u003e\nnetbox_token: \u003cnetbox_token\u003e\nroot_path: NetBox\n\n# Enable / Disable sync of console server ports\n# WARNING: By default the sessions will have the same name as the device, we suggest to override them (see below for an example)\n# This is by design, as to not force a preference on users.\nconsole_server_sync_enable: false\n\n# Enable/Disable periodic sync (note: SecureCRT needs to be restarted for changes to take effect)\nperiodic_sync_enable: true\nperiodic_sync_interval: 120\n\n# Filter what is synced, default is sync everything\n# All filters are evaluated for each item, and they all need to return true,\n# if any of the filters return false it will not be synced.\nfilters:\n  #- condition: \"{{ site_group != 'external' }}\" # uncomment to skip sync of one site group\n  #- condition: \"{{ site_group in ['external', 'admin'] }}\" # uncomment to only sync the defined site groups\n\n# Session settings\nsession:\n  # path: is the default session path template\n  path: \"{tenant_name}/{region_name}/{site_name}/{device_role}\"\n  # device_name: allows you to override the device name at a global level; supports templates and expressions\n  device_name: \"{device_name}\"\n\n  # Global Session Options\n  session_options:\n    # Allows you to override the connection protocol; supports templates and expressions\n    connection_protocol: \"{{ FindTag(device.Tags, 'connection_protocol') ?? 'SSH' }}\"\n    # Set default credentials; they should be defined in SecureCRT beforehand under \"Preferences -\u003e General -\u003e Credentials\"\n    credential: \u003cusername\u003e\n    # Set a firewall; supports templates and expressions\n    firewall: \"{{ FindTag(device.Tags, 'connection_firewall') ?? ''None'' }}\"\n\n  # Overrides based on conditions\n  # target can be one of: path, device_name, description, connection_protocol, credential, firewall\n  # condition should always be an expression that evaluates to true or false\n  # value is what to replace the target with; it can be a template or expression that returns a value\n  overrides:\n    - target: path\n      condition: \"{{ site_group == 'adm' }}\"\n      value: _Stores/{region_name}/{site_name}\n\n    - target: path\n      condition: \"{{ device_type == 'virtual_machine' }}\"\n      value: _Servers/{region_name}\n    \n    # device_name override use cases include removing domain names, extra values like .1, and so on\n    # note that this example could also be done with device_name and just using replace\n    - target: device_name\n      condition: \"{{ device_name endsWith '.1' }}\"\n      value: \"{{ replace(device_name, '.1', '') }}\"\n\n    # if console_server_sync_enable is enabled, we can use is_console_session to check if its a console server, and console_server_port is set to the port name\n    # in the example below we transform \"Port 1\" to 3001 and change the device name to append (console)\n    - target: device_port\n      condition: '{{ is_console_session == true }}'\n      value: '{{ 3000 + int(replace(console_server_port, \"Port \", \"\")) }}'\n    - target: device_name\n      condition: '{{ is_console_session == true }}'\n      value: '{{ device_name }} (console)'\n```\n\n## Development\nPull requests and issues are welcome.\n\nA VSCode launch file has been included for debugging the code directly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjysk-oss%2Fnetbox-securecrt-inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjysk-oss%2Fnetbox-securecrt-inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjysk-oss%2Fnetbox-securecrt-inventory/lists"}