A web-based editor for TextFSM templates with real-time parsing capabilities. This tool enables network engineers and developers to efficiently create and test TextFSM templates with instant feedback.
日本語版はこちら: Japanese README
Note
This project is currently under development. Some parts of the code may be inefficient. Security considerations may be insufficient. This documentation is a work in progress and may be incomplete or inaccurate.
- 🎨 Interface Themes
- Light and Dark mode support
- 📝 Advanced Editor Integration (Monaco Editor)
- TextFSM syntax highlighting
- Intelligent word suggestions and auto-completion
- Code folding and minimap navigation
- 📄 Downloads Files
- Supports downloading entered data and result data as files
- 📋 Clipboard Integration
- Quick copy support
- ⚡ Real-time Template Parsing
- Instant feedback on template changes
- Error detection
- 🔍 Multiple Data View Options
- Table view for structured data representation
- JSON view for programmatic access
- 🕰️ Parsing history
- The values of Data, Template, and Result are temporarily stored in LocalStorage
- 🗃️ Presets
- Load template from NTC Templates
- Template search using regular expressions, fuzzy search
- 🗂️ Template Management
- Save templates to LocalStorage
- Load existing templates
- 🖇️ Import/Export Capabilities
- Import templates from files
- Export templates to files
Word suggestion and syntax highlighting

textfsm-editor.react.web/
├ Frontend/ # React frontend application
│ ├ src/ # Source files
│ ├ package.json # Frontend project information and dependencies
│ └ *** # Frontend other files
├ Backend/ # Python backend application
│ ├ src/ # Source files
│ ├ pyproject.toml # Backend project information and dependencies
│ └ *** # Backend other files
├ textfsm-editor.react.web.code-workspace # VSCode workspace file
├ README.md # This file
└ *** # Workspace other files
Open the textfsm-editor.react.web.code-workspace file with VSCode to open the workspace.
- Basic Environment (Node.js + Python)
- Run Node.js and Python directly without Docker.
- See: Getting Started (Basic Environment)
- Docker Compose
This software loads Monaco Editor (Microsoft) from jsDelivr, an external CDN.
- Node.js (v16 or higher)
- npm
- Python (v3.8 or higher)
- uv (recommended for Python environment)
- Clone the repository:
git clone https://github.com/yourusername/textfsm-editor.react.web.git
cd textfsm-editor.react.web- Setup Frontend
# run command in the project root directory
cd frontend
npm install- Setup Backend
# run command in the project root directory
cd backend
uv syncThe frontend and backend must be run separately. It is recommended to open them in separate terminals.
- Run Frontend
cd frontend
npm run devTip: If you want to change the port number at startup, use the --port option.
- Run Backend
cd backend
uv run uvicorn src.main:app --reloadTip: If you want to change the port number at startup, use the --port option.
- Access the services
- Frontend Service:
http://localhost:5173 - Backend Service:
http://localhost:8000
- Frontend Service:
Warning
This production configuration is intended for personal use or internal tools. It may not provide sufficient security or performance for public-facing applications. For production deployments exposed to the internet, consider additional measures such as:
- Reverse proxy with SSL/TLS termination (e.g., Nginx, Caddy, Traefik)
- Rate limiting and DDoS protection
- Web Application Firewall (WAF)
- Build and deploy frontend to backend
cd frontend
npm run build:deployThis command builds the frontend and copies the output to backend/public/static/.
- Run Backend in production mode
cd backend
MODE=production uv run uvicorn src.main:app --host 0.0.0.0 --port 8000- Access the service
- Service:
http://localhost:8000
- Service:
| Variable | Default | Description |
|---|---|---|
MODE |
development |
Set to production for production mode |
LOG_LEVEL |
INFO |
Logging level (DEBUG, INFO, WARNING, ERROR) |
DOCS_ENABLED |
true |
Enable/disable API documentation (/docs) |
ALLOWED_HOSTS |
localhost:5173,localhost:8000,localhost |
Comma-separated list of allowed hosts |
CORS_ALLOWED_ORIGINS |
http://localhost:5173 |
Comma-separated list of allowed CORS origins |
ENABLE_HTTPS_REDIRECT |
false |
Enable HTTPS redirect (set true when using reverse proxy with SSL) |
- Docker
- Docker Compose
- Clone the repository
git clone https://github.com/yourusername/textfsm-editor.react.web.git
cd textfsm-editor.react.web- Build containers
docker compose build- Start containers
docker compose --profile dev up --build --watch- Access the services
- Frontend Service:
http://localhost:5173 - Backend Service:
http://localhost:8000
- Frontend Service:
Warning
This production configuration is intended for personal use or internal tools. It may not provide sufficient security or performance for public-facing applications. For production deployments exposed to the internet, consider additional measures such as:
- SSL/TLS termination
- Rate limiting and DDoS protection
- Web Application Firewall (WAF)
- Regular security audits
Two production configurations are available:
docker compose --profile prod up --build- Access:
http://localhost:8000
docker compose --profile prod-nginx up --build- Access:
http://localhost:80
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT License Copyright (c) 2023 yuyosy




