Giter Club home page Giter Club logo

x-launcher's Introduction

X-Launcher ๐Ÿš€

A cross-platform tool-agnostic project automation launcher.

License: MIT OR Apache 2.0 X-Launcher Rust Crate

๐Ÿšง X-Launcher is still experimental and has not been thoroughly tested. ๐Ÿšง

๐Ÿ’ก TL;DR: X-Launcher is a simple binary x which, when executed, scans for an xfile starting in the invocation directory and working its way up. When it finds an xfile, it uses it to launch project-specific tooling either (a) by executing the xfile itself or (b) delegating to a third-party tool (e.g., cargo, make, or npm).

๐Ÿค” Rationale: X-Launcher provides consistency across projects using different tools and languages by making x the universal command to interact with whatever tooling is required to work on a project. In addition, it makes it very easy to add custom freeform tooling in the form of an xfile script (e.g., Bash or Python).

Checkout the examples to get an idea what X-Launcher can do for you. X-Launcher is designed to work with any tool. Just to name a few examples, X-Launcher works well with Cargo, npm, make, just, and Poetry.

Installation

Currently, the official way to install X-Launcher is via Cargo:

cargo install x-launcher

Usage

Simply run x. All arguments are forwarded to the underlying tool.

xfile Reference

An xfile is interpreted in one of two ways:

  • If the xfile starts with a Unix shebang, then the xfile itself is executed. On Unix-like systems, this is done simply by executing the xfile itself. On Windows, x takes care of parsing the shebang and executing the correct program with the xfile as an argument. To this end, if the shebang starts with a path, other than /usr/bin/env, the binary name is looked up using the environment's PATH variable. If the shebang starts with /usr/bin/env the first argument of env is used to lookup the executable.

  • If the xfile does not start with a shebang, then it must have the form !command or >command where command is interpreted as a POSIX shell command (currently without performing any expansions, e.g., of variables or ~). X-Launcher will execute the specified command in the invocation directory, for !command, or in the directory of the xfile, for >command. In the latter case, the environment variable X_INVOCATION_DIR is set to the invocation directory such that it can still be retrieved.

In any case, arguments passed to x are forwarded to whatever is launched.

Note that in both cases, at least on Unix-like systems, the use of X-Launcher is entirely optional. In case of an xfile script with a shebang, the script can still be launched manually, and in case of a command, the command can be directly executed without going through x. Hence, X-Launcher is a mere convenience.

Contributing

We do accept bug fixes and improvements, and are open to discuss ideas. However, note that X-Launcher is intentionally kept very simple. There are already many great tools out there solving different project automation needs. X-Launcher is, as the name suggests, just a launcher and does not aim be more. Hence, we will likely reject any contributions extending X-Launcher beyond the purpose of launching.

Licensing

X-Launcher is licensed under either MIT or Apache 2.0 at your opinion. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache 2.0 license, shall be dual licensed as above, without any additional terms or conditions.


Made with โค๏ธ for OSS by Silitics.

x-launcher's People

Contributors

koehlma avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.