Giter Club home page Giter Club logo

krabby's Introduction

krabby

A tiny project manager! ๐Ÿฆ€

Build Status License: MIT/Apache-2.0

What is krabby

Or should I say what it aims to be?

Well, krabby is my take on what project management should be. I was never a huge fan of make and the only thing I like about npm/yarn is their way of handling script stuff. I also am a spoiled programmer and want to access my projects easily without setting every alias on my shell. I missed things in the Rust ecosystem so I thought "Why not handle this myself?". So here it goes!

Installation

You can build the project locally or get the binary at the releases page.

After placing the binary somewhere in your PATH, you should add the following to your .bashrc or .zshrc file:

eval "$(krabby shell bash)"

Currently it only supports bash and zsh.

Features

Project database

Register all your projects and teleport yourself to them whenever you feel like!

Check krabby.example.db to see what it's like.

Some metadata might be useful here, but I have no idea right now.

Project scripts

Language-agnostic project scripts: create, delete and remove scripts to project file.

You cannot compose scripts yet.

You can see an example at krabby.example.toml.

Project hook

Create a hook so it runs automatically after entering the project with kb command! A hook can be a plain command or a sequence of scripts.

name = "krabby"
hook = ["hello", "world"]

[scripts]
hello = "echo hello"
world = "echo world"

and

name = "krabby"
hook = "echo hello; echo world"

are equivalent!

The project hook must be defined before the script session. See this issue for more info!

Examples

  • Manage project: manage project entries in your database (~/.krabby.db).
    kb project add PROJECT PATH
    kb project remove PROJECT
  • Jump to project: go straight to your project directory.
    kb PROJECT
  • Run scripts: execute your scripts
    kb run SCRIPT
  • Define hooks: set scripts to run after loading project
    # Run `setup` script after you check in the project with `kb PROJECT`.
    kb hook set SCRIPT1,SCRIPT2,SCRIPT3
    # or
    kb hook set COMMAND

Roadmap

  • Script composition: I think it would be nice to use scripts inside other scripts, but could not figure out a way to make this work yet.
  • Improve argument parsing: I know that clap can parse the value directly, but this means I'd have to rewrite the parse functions so it returns a Result instead of Self.

This was based on @LukeMathWalker's zero2prod chapter on Parsing vs Validation. I'm still getting the hang of it (I hope). But if you do not know this, I highly recommend it! Zero To Production In Rust

  • Improve feedback: message system seems to have a lot of room for improvement. Also, I'd like to make sure the user knows what's happening.
  • Write better tests: I think the code looks like a huge mess and I'd like to tidy up the place!
  • Provide completion: it would be nice to have it complete the script names when using run command.
  • Improve logs: use log crate to improve verbose output
  • Create new projects and register directly at krabby.db

krabby's People

Contributors

github-actions[bot] avatar jpedrodelacerda avatar

Stargazers

 avatar  avatar

Watchers

 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.