{"id":35159352,"url":"https://github.com/marcuwynu23/likhis","last_synced_at":"2026-04-10T11:03:36.914Z","repository":{"id":328904565,"uuid":"1113230838","full_name":"marcuwynu23/likhis","owner":"marcuwynu23","description":"cli tool that scans backend code to auto-discover API routes, methods, and parameters, generating ready-to-import collections for popular API testing tools.","archived":false,"fork":false,"pushed_at":"2025-12-16T05:02:23.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-19T16:11:03.951Z","etag":null,"topics":["curl","golang","httpie","insomnia","java","js","nodejs","php","python","rest-api","router"],"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/marcuwynu23.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":"FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://paypal.me/wynumarcu23"]}},"created_at":"2025-12-09T17:39:36.000Z","updated_at":"2025-12-16T05:02:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marcuwynu23/likhis","commit_stats":null,"previous_names":["marcuwynu23/likhis"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/marcuwynu23/likhis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flikhis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flikhis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flikhis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flikhis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcuwynu23","download_url":"https://codeload.github.com/marcuwynu23/likhis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flikhis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31639526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: 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":["curl","golang","httpie","insomnia","java","js","nodejs","php","python","rest-api","router"],"created_at":"2025-12-28T17:52:33.338Z","updated_at":"2026-04-10T11:03:36.908Z","avatar_url":"https://github.com/marcuwynu23.png","language":"Go","funding_links":["https://paypal.me/wynumarcu23"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eLikhis - Universal API Route Mapper\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eCross-Platform API Route Discovery and Export Tool\u003c/strong\u003e\u003c/p\u003e\n  \u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/marcuwynu23/likhis?include_prereleases\u0026style=flat-square\" alt=\"Release\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/go-mod/go-version/marcuwynu23/likhis?style=flat-square\" alt=\"Go Version\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/marcuwynu23/likhis?style=flat-square\" alt=\"GitHub Stars\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/marcuwynu23/likhis?style=flat-square\" alt=\"GitHub Forks\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/marcuwynu23/likhis?style=flat-square\" alt=\"License\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/marcuwynu23/likhis?style=flat-square\" alt=\"GitHub Issues\"/\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003e **Automated API route discovery and export tool for modern backend frameworks**\n\nLikhis is a high-performance, cross-platform command-line tool written in Go that automatically analyzes backend source code to discover API routes, extract HTTP methods and parameters, and generate ready-to-import collections for popular API testing tools. It eliminates manual route documentation by intelligently parsing your codebase and producing standardized exports compatible with industry-standard testing platforms.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Usage](#usage)\n- [Supported Frameworks](#supported-frameworks)\n- [Export Formats](#export-formats)\n- [Plugin System](#plugin-system)\n- [Architecture](#architecture)\n- [Limitations](#limitations)\n- [Contributing](#contributing)\n- [Documentation](#documentation)\n- [Support](#support)\n- [License](#license)\n\n## Overview\n\nLikhis streamlines the API documentation and testing workflow by automatically extracting route definitions from your backend codebase. The tool supports multiple popular frameworks and generates standardized exports compatible with industry-standard API testing tools, significantly reducing the time and effort required for manual route documentation and collection creation.\n\n### Key Benefits\n\n- **Zero Configuration**: Automatically detects framework patterns and extracts routes\n- **Multi-Framework Support**: Works with Express, Flask, Django, Spring Boot, Laravel, and more\n- **Extensible Architecture**: YAML-based plugin system for adding new framework support\n- **Multiple Export Formats**: Generate collections for Postman, Insomnia, HTTPie Desktop, or CURL\n- **Environment-Aware**: Generate separate collections for development, staging, and production environments\n\n## Features\n\n### Core Capabilities\n\n- **Intelligent Route Detection**: Uses pattern matching and regex to identify route definitions across different framework conventions\n- **Breadth-First Traversal**: Efficiently scans project directories using BFS algorithm, prioritizing top-level routes\n- **Parameter Extraction**: Automatically detects:\n  - Path parameters (`:id`, `{id}`, `\u003cid\u003e`)\n  - Query parameters (from function signatures and annotations)\n  - Request body fields (for POST/PUT operations)\n- **Router Mount Detection**: Understands nested router structures and correctly prefixes base paths\n- **Environment-Specific Exports**: Generate separate collections for different deployment environments\n\n### Supported Frameworks\n\n| Framework | Language | Detection Method |\n|-----------|----------|-----------------|\n| Express.js | JavaScript/TypeScript | `app.get()`, `router.post()`, etc. |\n| Flask | Python | `@app.route()` decorators |\n| Django | Python | `urls.py` with `path()` or `re_path()` |\n| Spring Boot | Java | `@GetMapping()`, `@PostMapping()`, etc. |\n| Laravel | PHP | `Route::get()`, `Route::post()`, etc. |\n\n## Prerequisites\n\n- **Go 1.21+** (for building from source)\n- **Windows, macOS, or Linux** (cross-platform support)\n- Access to your backend project source code\n\n## Installation\n\n### Building from Source\n\n1. **Clone the repository**:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd likhis\n   ```\n\n2. **Build the executable**:\n   \n   **Windows (Batch)**:\n   ```cmd\n   scripts\\build.bat\n   ```\n   \n   **Windows (PowerShell)**:\n   ```powershell\n   scripts\\build.ps1\n   ```\n   \n   **Manual Build**:\n   ```bash\n   go build -o build/likhis.exe main.go\n   ```\n\n3. **Optional: Create symbolic link** (Windows):\n   ```cmd\n   scripts\\link.bat\n   ```\n   or\n   ```powershell\n   scripts\\link.ps1\n   ```\n   \n   This creates a link at `C:\\Bin\\webserve\\likhis.exe` for easy access.\n\nThe compiled executable will be located in the `build/` directory.\n\n## Quick Start\n\n```bash\n# Scan current directory and generate Postman collection\nlikhis -p . -o postman\n\n# Scan specific project with auto-detection\nlikhis -p ./my-backend -o insomnia\n\n# Generate for specific framework\nlikhis -p ./express-app -o postman -F express\n\n# Generate environment-specific exports (dev, staging, prod)\nlikhis -p ./my-api -o postman --full\n```\n\n## Usage\n\n### Command-Line Interface\n\n```bash\nlikhis [OPTIONS]\n```\n\n### Options\n\n| Flag | Short | Description | Default |\n|------|-------|-------------|---------|\n| `--path` | `-p` | Path to project root directory | Current directory |\n| `--output` | `-o` | Output format: `postman`, `insomnia`, `httpie`, `curl` | `postman` |\n| `--file` | `-f` | Custom output file name | Auto-generated based on format |\n| `--output-path` | `-O` | Output directory path | Current directory |\n| `--framework` | `-F` | Target framework: `auto` or plugin name | `auto` |\n| `--full` | | Generate exports for dev, staging, and prod | `false` |\n\n### Examples\n\n#### Basic Usage\n\n```bash\n# Express.js project - Postman export\nlikhis -p ./express-app -o postman -F express\n\n# Flask project - Insomnia export\nlikhis -p ./flask-app -o insomnia -F flask\n\n# Spring Boot project - HTTPie Desktop export\nlikhis -p ./spring-app -o httpie -F spring\n\n# Laravel project - CURL script\nlikhis -p ./laravel-app -o curl -F laravel\n```\n\n#### Advanced Usage\n\n```bash\n# Custom output file name\nlikhis -p ./my-api -o postman -f custom-collection.json\n\n# Custom output directory\nlikhis -p ./my-api -o postman --output-path ./exports\n\n# Custom output directory and file name\nlikhis -p ./my-api -o postman -f my-api -O ./exports\n# Generates: ./exports/my-api.json\n\n# Auto-detect framework\nlikhis -p ./my-project -o postman\n\n# Generate environment-specific collections\nlikhis -p ./my-api -o postman --full\n# Generates:\n# - postman-collection-dev.json\n# - postman-collection-staging.json\n# - postman-collection-prod.json\n\n# Generate environment-specific collections to custom directory\nlikhis -p ./my-api -o postman --full --output-path ./api-exports\n# Generates:\n# - ./api-exports/postman-collection-dev.json\n# - ./api-exports/postman-collection-staging.json\n# - ./api-exports/postman-collection-prod.json\n```\n\n#### Framework-Specific Examples\n\n**Express.js with Router Mounting**:\n```bash\nlikhis -p ./express-app/src -o postman -F express\n```\n\n**Django URL Patterns**:\n```bash\nlikhis -p ./django-project -o insomnia -F django\n```\n\n**Spring Boot Controllers**:\n```bash\nlikhis -p ./spring-app/src/main/java -o postman -F spring\n```\n\n## Supported Frameworks\n\n### Node.js/Express\n\nDetects routes defined using:\n- `app.get()`, `app.post()`, `app.put()`, `app.delete()`, `app.patch()`\n- `router.get()`, `router.post()`, etc.\n- Router mounting: `app.use('/api', router)`\n\n**Example**:\n```javascript\napp.get('/users/:id', handler);\nrouter.post('/products', handler);\n```\n\n### Python/Flask\n\nDetects routes defined using:\n- `@app.route()` decorators\n- HTTP methods specified in `methods` parameter\n\n**Example**:\n```python\n@app.route('/users/\u003cid\u003e', methods=['GET'])\ndef get_user(id):\n    pass\n```\n\n### Django\n\nDetects routes from `urls.py` files:\n- `path()` function\n- `re_path()` function\n\n**Example**:\n```python\npath('users/\u003cint:id\u003e/', views.user_detail)\n```\n\n### Java/Spring Boot\n\nDetects routes from controller classes:\n- `@GetMapping()`, `@PostMapping()`, `@PutMapping()`, `@DeleteMapping()`, `@PatchMapping()`\n- `@RequestMapping()` at class and method level\n- `@RequestParam` for query parameters\n- `@PathVariable` for path parameters\n\n**Example**:\n```java\n@RestController\n@RequestMapping(\"/users\")\npublic class UserController {\n    @GetMapping(\"/{id}\")\n    public ResponseEntity\u003cUser\u003e getUser(@PathVariable String id) {\n        // ...\n    }\n}\n```\n\n### PHP/Laravel\n\nDetects routes from route files:\n- `Route::get()`, `Route::post()`, `Route::put()`, `Route::delete()`, `Route::patch()`\n\n**Example**:\n```php\nRoute::get('/users/{id}', [UserController::class, 'show']);\n```\n\n## Export Formats\n\n### Postman Collection (v2.1)\n\nGenerates a complete Postman Collection v2.1 JSON file ready for import.\n\n**Features**:\n- Environment variables for base URLs\n- Organized request structure\n- Path and query parameters\n- Request body templates\n\n**Usage**:\n```bash\nlikhis -p ./my-api -o postman\n# Output: postman-collection.json\n```\n\n### Insomnia Export\n\nGenerates a native Insomnia export compatible with Insomnia Desktop.\n\n**Features**:\n- Workspace structure\n- Request groups\n- Environment variables\n- Cookie jar support\n\n**Usage**:\n```bash\nlikhis -p ./my-api -o insomnia\n# Output: insomnia-export.json\n```\n\n### HTTPie Desktop Collection\n\nGenerates a collection file compatible with HTTPie Desktop.\n\n**Usage**:\n```bash\nlikhis -p ./my-api -o httpie\n# Output: httpie-collection.json\n```\n\n**Note**: HTTPie Desktop may have limited import support. Consider using the CURL format as an alternative.\n\n### CURL Script\n\nGenerates a shell script containing ready-to-use `curl` commands for each route.\n\n**Usage**:\n```bash\nlikhis -p ./my-api -o curl\n# Output: curl-commands.sh\n```\n\n## Plugin System\n\nLikhis features an extensible YAML-based plugin architecture that allows you to add support for new frameworks without modifying the source code.\n\n### Plugin Structure\n\nPlugins are YAML files located in the `plugins/` directory (next to the executable). Each plugin defines:\n\n```yaml\nname: framework-name\ndescription: Framework description\nextensions:\n  - .ext1\n  - .ext2\npatterns:\n  - method: \"GET|POST|PUT|DELETE|PATCH\"\n    route_regex: \"regex pattern to match routes\"\n    param_regex: \"regex pattern to extract path parameters\"\nrouter_mount:\n  use_pattern: \"regex for router mounting\"\n  require_pattern: \"regex for module imports\"\n  var_pattern: \"regex for variable declarations\"\n```\n\n### Creating a Custom Plugin\n\n1. **Create a YAML file** in the `plugins/` directory:\n   ```bash\n   plugins/myframework.yml\n   ```\n\n2. **Define the plugin structure**:\n   ```yaml\n   name: myframework\n   description: My Custom Framework\n   extensions:\n     - .myext\n   patterns:\n     - method: \"GET|POST\"\n       route_regex: \"route\\\\.(get|post)\\\\s*\\\\(['\\\"]([^'\\\"]+)['\\\"]\"\n       param_regex: \"\\\\{(\\\\w+)\\\\}\"\n   ```\n\n3. **Use your plugin**:\n   ```bash\n   likhis -p ./my-project -o postman -F myframework\n   ```\n\n### Included Plugins\n\nThe following plugins are included by default:\n\n- `express.yml` - Node.js Express.js framework\n- `flask.yml` - Python Flask framework\n- `django.yml` - Python Django framework\n- `spring.yml` - Java Spring Boot framework\n- `laravel.yml` - PHP Laravel framework\n\n### Plugin Location\n\nPlugins are loaded from:\n1. `{executable_directory}/plugins/` (primary location)\n2. `./plugins/` (fallback if executable directory doesn't exist)\n\n## Architecture\n\n### Processing Pipeline\n\n1. **File Traversal**: Performs breadth-first search (BFS) through project directories\n   - Skips common dependency folders (`node_modules`, `vendor`, `.git`, `__pycache__`, etc.)\n   - Filters files by extension based on framework\n\n2. **Route Detection**: Analyzes source files using framework-specific patterns\n   - Regex-based pattern matching\n   - Router mounting detection (for Express.js)\n   - Class-level annotation detection (for Spring Boot)\n\n3. **Parameter Extraction**: Extracts route metadata\n   - Path parameters from route patterns\n   - Query parameters from function signatures\n   - Request body fields (heuristic-based)\n\n4. **Normalization**: Converts framework-specific routes to unified structure\n\n5. **Export Generation**: Transforms normalized routes to target format\n\n### Internal Route Structure\n\nRoutes are normalized to a unified JSON structure:\n\n```json\n{\n  \"path\": \"/users/:id\",\n  \"method\": \"GET\",\n  \"params\": [\"id\"],\n  \"query\": [\"page\", \"limit\"],\n  \"body\": [\"name\", \"email\"],\n  \"file\": \"/path/to/file.js\",\n  \"line\": 42\n}\n```\n\n## Limitations\n\nWhile Likhis provides comprehensive route detection capabilities, please be aware of the following limitations:\n\n- **Heuristic Detection**: Query parameter and body field detection uses heuristic algorithms and may not capture all parameters in complex scenarios\n- **Complex Patterns**: Some advanced or unconventional route patterns may not be detected automatically\n- **Middleware Configuration**: Authentication headers and middleware configurations are not automatically extracted from route definitions\n- **Dynamic Routes**: Routes generated dynamically at runtime through code execution may not be detected during static analysis\n- **Parsing Method**: Currently uses regex-based parsing; future versions may incorporate AST (Abstract Syntax Tree) parsing for improved accuracy and coverage\n\nFor the most up-to-date information on limitations and planned improvements, please refer to the [CHANGELOG.md](CHANGELOG.md) and project issues.\n\n## Contributing\n\nWe welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help makes Likhis better for everyone.\n\nFor detailed information on how to contribute, please see our [Contributing Guide](CONTRIBUTING.md). Key areas where contributions are particularly valuable:\n\n- Additional framework support via plugins\n- Improved parameter detection algorithms\n- AST-based parsing for better accuracy\n- Additional export formats\n- Documentation improvements\n\n### Quick Start for Contributors\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes following our [Development Guidelines](GUIDELINES.md)\n4. Test with the example applications in `exp/`:\n   ```bash\n   scripts\\test.bat\n   ```\n5. Submit a pull request\n\nFor comprehensive development guidelines, coding standards, and plugin creation instructions, please refer to [GUIDELINES.md](GUIDELINES.md).\n\n## Documentation\n\n- **[CONTRIBUTING.md](CONTRIBUTING.md)** - Guidelines for contributing to the project\n- **[GUIDELINES.md](GUIDELINES.md)** - Development guidelines, architecture, and best practices\n- **[CHANGELOG.md](CHANGELOG.md)** - Version history and release notes\n\n## Support\n\n### Sponsorship\n\nIf you find Likhis useful and would like to support its development, please consider sponsoring the project. See [FUNDING.yml](FUNDING.yml) for sponsorship options.\n\n### Getting Help\n\n- **Issues**: Report bugs or request features via [GitHub Issues](https://github.com/marcuwynu23/likhis/issues)\n- **Discussions**: Ask questions and share ideas in [GitHub Discussions](https://github.com/marcuwynu23/likhis/discussions)\n\n## Author\n\n**Mark Wayne Menorca**\n\n## License\n\nThis project is open source and available for use. See the repository for license details.\n\n---\n\n**Note**: This tool is designed to assist with API documentation and testing. Always verify generated routes against your actual API implementation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcuwynu23%2Flikhis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcuwynu23%2Flikhis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcuwynu23%2Flikhis/lists"}