Crates.io | krabby-cli |
lib.rs | krabby-cli |
version | 0.1.0 |
source | src |
created_at | 2023-06-15 02:21:50.268395 |
updated_at | 2023-06-15 02:21:50.268395 |
description | A tiny project manager! |
homepage | https://github.com/jpedrodelacerda/krabby |
repository | https://github.com/jpedrodelacerda/krabby |
max_upload_size | |
id | 890734 |
size | 88,171 |
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!
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
andzsh
.
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.
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
.
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!
~/.krabby.db
).
kb project add PROJECT PATH
kb project remove PROJECT
kb PROJECT
kb run SCRIPT
# Run `setup` script after you check in the project with `kb PROJECT`.
kb hook set SCRIPT1,SCRIPT2,SCRIPT3
# or
kb hook set COMMAND
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
run
command.log
crate to improve verbose outputkrabby.db