Network intent DSL — declare desired network state, generate vendor-specific configs.
Network engineers express intent ("all guest traffic should be rate-limited to 100 Mbps") but implement it as vendor-specific CLI commands scattered across device types. When you manage Cisco, Juniper, and Arista devices, the same intent becomes three different configurations.
intentlang provides a simple DSL for declaring network intents, then compiles them to vendor-specific configurations. Write once, deploy to any supported vendor.
+----------------+ +----------+ +------------+ +--------------+
| Intent File | --> | Parser | --> | Validator | --> | Compiler |
| | | | | | | (per vendor) |
| deny telnet; | | AST | | Semantic | | |
| limit vlan.. | | | | checks | | Cisco IOS |
| | | | | | | JunOS |
+----------------+ +----------+ +------------+ | Arista EOS |
+------+-------+
|
+------v-------+
| Config Lines |
+--------------+
- 5 actions: ensure, deny, limit, allow, require
- 7 target types: traffic, interface, vlan, protocol, subnet, service, route
- 3 vendor compilers: Cisco IOS, JunOS, Arista EOS
- 8 built-in templates: common security and QoS patterns
- Validation: semantic checks before compilation
- Extensible: add custom compilers via registry
pip install intentlang# network-policy.intent
deny protocol telnet on all interfaces;
require service ssh on management interfaces;
limit traffic on vlan 100 to 100 mbps;
allow traffic from subnet 192.168.1.0/24 to subnet 10.0.0.0/8;
# Cisco IOS
intentlang compile network-policy.intent --vendor cisco_ios
# JunOS
intentlang compile network-policy.intent --vendor junos
# Arista EOS
intentlang compile network-policy.intent --vendor arista_eosintentlang list-intents
intentlang list-intents --category security
intentlang list-intents --search ssh<action> <target> [<conditions>] [<method>] [<value>];
Actions: ensure | deny | limit | allow | require
Targets: traffic | interface | vlan | protocol | subnet | service
Conditions: from <target> | to <target> | on <target>
Methods: using <method>
Values: to <number> <unit> (mbps, gbps, kbps)
from intentlang.parser import parse_intent
from intentlang.compiler import get_compiler
import intentlang.compilers # Register compilers
program = parse_intent("deny protocol telnet on all interfaces;")
compiler = get_compiler("cisco_ios")
result = compiler.compile_program(program)
print(result.to_config())MIT