{"id":47862648,"url":"https://github.com/marcuwynu23/linea","last_synced_at":"2026-04-03T23:50:21.819Z","repository":{"id":328246867,"uuid":"1114740766","full_name":"marcuwynu23/linea","owner":"marcuwynu23","description":"Linea is a cross-platform CLI tool that organizes and runs commands as workflows using YAML.","archived":false,"fork":false,"pushed_at":"2026-03-09T19:49:20.000Z","size":86,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T23:49:50.104Z","etag":null,"topics":["automation","command","scripting","tool","tooling","yaml","yml"],"latest_commit_sha":null,"homepage":"https://linea.marcuwynu.space","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":null,"contributing":"CONTRIBUTING.md","funding":".github/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://www.paypal.com/paypalme/wynumarcu23"]}},"created_at":"2025-12-11T20:20:03.000Z","updated_at":"2026-03-10T22:08:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marcuwynu23/linea","commit_stats":null,"previous_names":["marcuwynu23/linea"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marcuwynu23/linea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flinea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flinea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flinea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flinea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcuwynu23","download_url":"https://codeload.github.com/marcuwynu23/linea/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcuwynu23%2Flinea/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31382355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T23:20:52.058Z","status":"ssl_error","status_checked_at":"2026-04-03T23:20:51.675Z","response_time":107,"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":["automation","command","scripting","tool","tooling","yaml","yml"],"created_at":"2026-04-03T23:50:21.141Z","updated_at":"2026-04-03T23:50:21.801Z","avatar_url":"https://github.com/marcuwynu23.png","language":"Go","funding_links":["https://www.paypal.com/paypalme/wynumarcu23"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003ch1\u003eLinea - Commandline Workflow Tool\u003c/h1\u003e\n\n  \u003cp\u003e\u003cstrong\u003eCross-Platform YAML-Driven Command Execution Tool\u003c/strong\u003e\u003c/p\u003e\n\n  \u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/marcuwynu23/linea?include_prereleases\u0026style=flat-square\" alt=\"Release\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/go-mod/go-version/marcuwynu23/linea?style=flat-square\" alt=\"Go Version\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/marcuwynu23/linea?style=flat-square\" alt=\"GitHub Stars\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/marcuwynu23/linea?style=flat-square\" alt=\"GitHub Forks\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/marcuwynu23/linea?style=flat-square\" alt=\"License\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/marcuwynu23/linea?style=flat-square\" alt=\"GitHub Issues\"/\u003e\n  \u003c/p\u003e\n\n\u003c/div\u003e\n\nLinea is a cross-platform CLI tool that organizes commands into workflows using YAML. It makes defining and managing complex command-line tasks simple and consistent across different environments.\n\nBeyond organization, Linea can execute these workflows directly, enabling developers and sysadmins to streamline their operations and run tasks reliably across Windows, Linux, and macOS.\n\n\n## Why Linea?\n\n### The Problem with Traditional Scripting\n\nTraditional shell scripts (Bash, PowerShell, etc.) have limitations:\n- **Platform-specific**: Different syntax for Windows vs Unix\n- **Hard to version control**: Complex scripts are difficult to review and maintain\n- **No validation**: Errors only surface at runtime\n- **Limited reusability**: Hard to parameterize and share\n- **Poor documentation**: Command intent is buried in code\n\n### The Linea Solution\n\nLinea provides a **declarative, cross-platform approach** to command execution:\n\n✅ **Universal YAML format** - Works identically on Windows, Linux, and macOS  \n✅ **Version control friendly** - Easy to review, diff, and merge  \n✅ **Built-in validation** - Catches errors before execution  \n✅ **Parameterized execution** - Variables and overrides without code changes  \n✅ **Self-documenting** - YAML structure makes intent clear  \n✅ **Team collaboration** - Share command configurations effortlessly  \n\n### Key Advantages Over Scripting\n\n| Feature | Traditional Scripts | Linea |\n|---------|---------------------|------------|\n| **Cross-platform** | Requires separate scripts | Single YAML works everywhere |\n| **Version control** | Hard to review changes | Easy to diff and merge |\n| **Validation** | Runtime errors only | Pre-execution validation |\n| **Documentation** | Comments in code | Self-documenting structure |\n| **Reusability** | Copy-paste or functions | Template-based with variables |\n| **Testing** | Manual execution | Built-in dry-run mode |\n| **Maintenance** | Code complexity grows | Simple YAML structure |\n\n## Features\n\n- **YAML-Driven Execution**: Commands, subcommands, and arguments are defined in YAML files\n- **Cross-Platform Support**: Automatically detects OS and converts paths to proper separators\n- **Variable Substitution**: Use `{variable}` or `$variable` placeholders with validation\n- **Command-Line Overrides**: Pass variables at runtime without modifying files\n- **Linea App**: Create structured app directories with workflows and scripts\n- **Lineash Scripts**: Bash-like script interpreter that executes Linea workflows as commands\n- **Dry-Run Mode**: Test commands without executing them using the `test` subcommand\n- **Help Command**: Display information about commands defined in YAML files\n- **Variable Validation**: Ensures all required variables are defined before execution\n\n## Installation\n\n```bash\ngo build -o bin/linea\n```\n\nOn Windows:\n```bash\ngo build -o bin/linea.exe\n```\n\nOr install directly:\n\n```bash\ngo install\n```\n\n## Usage\n\n```bash\nlinea \u003csubcommand\u003e \u003cyaml-file\u003e\n```\n\n### Subcommands\n\n- `run` - Execute the command defined in the YAML file\n- `test` - Dry-run the command (print without executing)\n- `help` - Display information about the command\n- `init` - Initialize a new workflow YAML file with template and documentation\n- `app create \u003cname\u003e` - Create a Linea App structure with workflows and scripts\n\n## Advanced Features\n\n### Linea App\n\nCreate structured application directories with workflows and scripts:\n\n```bash\nlinea app create my-app\n```\n\nThis creates:\n```\nmy-app/\n├─ .linea/workflows/    # Workflow YAML files (executable as commands)\n├─ scripts/             # Lineash scripts (.lnsh files)\n└─ README.md\n```\n\n**Benefits:**\n- Organize workflows in a structured directory\n- Execute workflows as commands from scripts\n- Share app configurations with teams\n- Version control entire app structures\n\n### Lineash Scripts\n\nExecute bash-like scripts that can run Linea workflows as first-class commands:\n\n```bash\nlineash scripts/deploy.lnsh [args...]\n```\n\n**Features:**\n- **Friendly Syntax**: Simplified conditionals and loops with `end` keyword\n- **Variables**: `VAR=\"value\"` and `$VAR` substitution\n- **Positional Parameters**: `$1`, `$2`, etc. from command-line arguments\n- **Arithmetic Expressions**: `$((expression))` for calculations\n- **Conditionals**: `if condition ... else ... end` with operators `==`, `!=`, `\u003c`, `\u003e`, `\u003c=`, `\u003e=`\n- **Loops**: `for VAR in list ... end` and `while condition ... end`\n- **Workflow Commands**: Workflows in `.linea/workflows/` become executable commands\n- **System Commands**: Unknown commands forwarded to system shell\n- **No Shebang Required**: Scripts can run without `#!/bin/lineash` at the top\n\n**Example Script (Friendly Syntax):**\n```bash\n# No shebang required!\nVM_NAME=\"my-vm\"\nVM_OS=\"alpine\"\n\necho \"Starting deployment...\"\n\n# Friendly conditional\nif $VM_OS == \"alpine\"\n    echo \"Using Alpine Linux\"\n    create-vm -s name=$VM_NAME\nelse\n    echo \"Using different OS\"\nend\n\n# Friendly for loop\nfor env in dev staging prod\n    echo \"Deploying to $env...\"\n    deploy -s environment=$env\nend\n\n# While loop with arithmetic\ncounter=1\nwhile $counter \u003c= 3\n    echo \"Iteration $counter\"\n    counter=$((counter + 1))\nend\n```\n\n**Note:** Traditional bash syntax (`if/then/else/fi`, `for/do/done`) is still supported for backward compatibility.\n\n## Example YAML Files\n\n### Simple Echo Command\n\n```yaml\n# examples/echo-simple.yml\ncommand: echo\nargs:\n  - \"Hello, Linea!\"\n```\n\nRun it:\n```bash\nlinea run examples/echo-simple.yml\n```\n\n### Command with Variables\n\n```yaml\n# examples/echo-variables.yml\ncommand: echo\nargs:\n  - \"Message: {message}\"\n  - \"User: {user}\"\nvariables:\n  message: \"Welcome to Linea CLI\"\n  user: \"Developer\"\n```\n\n### Command with Command-Line Variables (-s/--set)\n\nYou can override or provide variables at runtime using the `-s/--set` flag. **Note:** Only `$variable` syntax can be overridden; `{variable}` syntax always uses YAML defaults.\n\n```yaml\n# examples/greet.yml\ncommand: echo\nargs:\n  - \"Hello, $name! Welcome to $platform.\"\nvariables:\n  platform: \"Linea CLI\"\n```\n\nRun with command-line variables:\n```bash\nlinea run examples/greet.yml -s/--set name=\"John\"\n```\n\nOutput:\n```\nHello, John! Welcome to Linea CLI.\n```\n\nYou can also override YAML variables:\n```bash\nlinea run examples/greet.yml -s/--set name=\"John\" -s/--set platform=\"Commandline Workflow\"\n```\n\nOutput:\n```\nHello, John! Welcome to Commandline Workflow.\n```\n\n\n### Docker Command\n\n```yaml\n# examples/docker-ps.yml\ncommand: docker\nsubcommand: ps\nargs:\n  - -a\n```\n\n### List Directory\n\n```yaml\n# examples/ls-directory.yml\ncommand: ls\nargs:\n  - -l\n  - -a\n  - \"{directory}\"\nvariables:\n  directory: \".\"\n```\n\n## YAML File Structure\n\n### Single Command\n\n```yaml\ncommand: \u003cmain-command\u003e\nsubcommand: \u003coptional-subcommand\u003e\nargs:\n  - \u003carg1\u003e\n  - \u003carg2\u003e\n  - \u003c...\u003e\nvariables:\n  \u003cvar1\u003e: \u003cvalue1\u003e\n  \u003cvar2\u003e: \u003cvalue2\u003e\n```\n\n**Variable Syntax Notes:**\n- Use `{variable}` for protected defaults that cannot be overridden\n- Use `$variable` for values that can be overridden via `-s/--set`\n\n### Multiple Commands\n\nSeparate multiple commands with `---`:\n\n```yaml\ncommand: \u003cmain-command\u003e\nargs:\n  - \u003carg1\u003e\nvariables:\n  \u003cvar1\u003e: \u003cvalue1\u003e\n---\ncommand: \u003canother-command\u003e\nargs:\n  - \u003carg2\u003e\nvariables:\n  \u003cvar2\u003e: \u003cvalue2\u003e\n---\n# More commands...\n```\n\n## Examples\n\n### Initialize a New Workflow\n\nCreate a new workflow file with a template:\n\n```bash\nlinea init workflow.yml\n```\n\nThis creates a new file with:\n- Template structure\n- Documentation comments\n- Example usage\n- Variable examples\n\nOutput:\n```\n✅ Created workflow file: workflow.yml\n\nYou can now:\n  • Edit the file to customize your workflow\n  • Test it: linea test workflow.yml\n  • Run it: linea run workflow.yml\n```\n\n### Dry-Run a Command\n\n```bash\nlinea test examples/docker-ps.yml\n```\n\nOutput:\n```\nDry run - would execute:\ndocker ps -a\n```\n\n### Get Help for a Command\n\n```bash\nlinea help examples/echo-variables.yml\n```\n\n### Multiple Commands in One File (Advanced)\n\nYou can define multiple commands in a single YAML file by separating them with `---`:\n\n```yaml\n# examples/multi.yml\ncommand: echo\nargs:\n  - \"First command: {message}\"\nvariables:\n  message: \"Hello from first command\"\n---\ncommand: echo\nargs:\n  - \"Second command: {message}\"\nvariables:\n  message: \"Hello from second command\"\n---\ncommand: echo\nargs:\n  - \"Third command: {message}\"\nvariables:\n  message: \"Hello from third command\"\n```\n\nRun all commands sequentially:\n```bash\nlinea run -v examples/multi.yml\n```\n\nOutput:\n```\nFound 3 commands in YAML file\n\n[1/3] Executing: echo First command: Hello from first command\nFirst command: Hello from first command\n\n[2/3] Executing: echo Second command: Hello from second command\nSecond command: Hello from second command\n\n[3/3] Executing: echo Third command: Hello from third command\nThird command: Hello from third command\n```\n\nTest multiple commands:\n```bash\nlinea test examples/multi.yml\n```\n\nGet help for all commands:\n```bash\nlinea help examples/multi.yml\n```\n\n**Use Cases:**\n- Execute a sequence of related commands\n- Build workflows with multiple steps\n- Run commands in a specific order\n- Share command sequences with your team\n\n## Running Tests\n\n```bash\ngo test ./tests/...\n```\n\n## Project Structure\n\n```\nlinea/\n  main.go              # CLI entry point\n  cmd/                 # Subcommands (run, test, help)\n  internal/            # Core logic (parser, executor, utils)\n  examples/            # Example YAML files\n  tests/               # Test files\n  bin/                 # Compiled executable (gitignored)\n  go.mod               # Go module definition\n  README.md            # This file\n```\n\n## Use Cases\n\n### DevOps \u0026 Infrastructure\n- **Deployment automation**: Define deployment commands in version-controlled YAML files\n- **Multi-environment management**: Use variables to adapt commands for dev/staging/prod\n- **Team standardization**: Share consistent command configurations across team members\n- **CI/CD integration**: Parameterize pipeline commands for different environments\n\n### Development Workflows\n- **Build processes**: Standardize build commands across projects\n- **Database migrations**: Version control database command sequences\n- **Testing automation**: Define test execution commands declaratively\n- **Code generation**: Template-based code generation with variable substitution\n\n### System Administration\n- **Cross-platform scripts**: Single YAML file works on all operating systems\n- **Configuration management**: Document and version control system commands\n- **Backup automation**: Define backup procedures in YAML\n- **Monitoring setup**: Configure monitoring commands consistently\n\n### Documentation \u0026 Training\n- **Command libraries**: Build reusable command templates\n- **Onboarding**: New team members can understand commands from YAML structure\n- **Knowledge sharing**: Share complex command invocations easily\n- **Documentation**: Self-documenting command configurations\n\n## Documentation\n\n### [FEATURES.md](FEATURES.md)\nComplete feature documentation including:\n- **Core Features**: YAML-driven execution, cross-platform support, variable substitution\n- **Advanced Features**: Nested variables, path normalization, Windows shell support\n- **Use Cases**: DevOps automation, development workflows, system administration\n- **Roadmap**: Planned features and future enhancements\n\n### [DOCUMENTATION.md](DOCUMENTATION.md)\nComprehensive user guide covering:\n- **Installation**: Building from source and installation methods\n- **Quick Start**: Get up and running in minutes\n- **YAML Format**: Complete reference for YAML file structure\n- **Command Reference**: Detailed documentation for `run`, `test`, and `help` commands\n- **Variables**: Variable syntax, sources, substitution, and validation\n- **Cross-Platform**: Path normalization, flag preservation, OS-specific handling\n- **Examples**: Real-world examples and use cases\n- **Troubleshooting**: Common issues and solutions\n\n### [CONTRIBUTING.md](CONTRIBUTING.md)\nGuidelines for contributing to Linea:\n- **Code of Conduct**: Community standards and expectations\n- **How to Contribute**: Reporting bugs, suggesting features, pull requests\n- **Development Setup**: Prerequisites and getting started\n- **Coding Guidelines**: Code style, project structure, testing requirements\n- **Commit Messages**: Format and conventions\n- **Review Process**: What to expect when submitting contributions\n\n### [GUIDELINES.md](GUIDELINES.md)\nDevelopment standards and best practices:\n- **Code Style**: Go conventions, naming, error handling, comments\n- **Project Structure**: Directory organization and package layout\n- **Testing Guidelines**: Test structure, coverage, and best practices\n- **Code Review**: Checklist for pull requests\n- **Git Workflow**: Branch naming and commit message conventions\n- **Performance**: Optimization guidelines and considerations\n- **Security**: Best practices for secure code\n\n## Quick Comparison: Script vs Linea\n\n### Traditional Shell Script\n```bash\n#!/bin/bash\n# Hard to maintain, platform-specific\nif [[ \"$OSTYPE\" == \"msys\" ]]; then\n    docker build -t myapp:latest -f .\\Dockerfile .\nelse\n    docker build -t myapp:latest -f ./Dockerfile .\nfi\n```\n\n### Linea YAML\n```yaml\n# Simple, cross-platform, version-controlled\ncommand: docker\nsubcommand: build\nargs:\n  - -t\n  - \"{image}:{tag}\"\n  - -f\n  - \"{dockerfile}\"\n  - \"{context}\"\nvariables:\n  image: \"myapp\"\n  tag: \"latest\"\n  dockerfile: \"./Dockerfile\"\n  context: \".\"\n```\n\n**Benefits:**\n- ✅ Works on Windows, Linux, macOS without modification\n- ✅ Easy to review in pull requests\n- ✅ Variables can be overridden: `linea run build.yml -s/--set tag=\"v1.0.0\"`\n- ✅ Self-documenting structure\n- ✅ Built-in validation prevents errors\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.\n\n**Quick Start:**\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Add tests for new functionality\n5. Ensure all tests pass (`go test ./tests/...`)\n6. Submit a pull request\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for complete contribution guidelines, code style standards, and development setup instructions.\n\n## Support\n\n- **Issues:** Report bugs or request features on GitHub\n- **Discussions:** Ask questions and share ideas\n- **Funding:** Support the project via [PayPal](https://www.paypal.com/paypalme/wynumarcu23)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Thanks to all contributors who help improve Linea\n- Built with [Go](https://golang.org/)\n- YAML parsing powered by [gopkg.in/yaml.v3](https://github.com/go-yaml/yaml)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcuwynu23%2Flinea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcuwynu23%2Flinea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcuwynu23%2Flinea/lists"}