Warning
THIS PROJECT IS WORK IN PROGRESS! USE THIS PROGRAM AT YOUR RISK, FOR NOW ITS BEHAVIOR ISN'T REALLY LOGIC.
devspace helps you to quickly start all the programs you need to dev, like run
tmux
split the window vertically then horizontally, open programs inside your
panes etc ..
Cargo and Rust 1.85.0
.
- Clone the repo,
$ git clone [email protected]:thi8v/devspace.git
- Move into it,
$ cd devspace
- Install it locally through cargo,
$ cargo install --path .
- Use it
$ devspace ...
if it doesn't work make sure the directory where cargo puts the Rust binaries is in yourPATH
environment variable.
$ cargo install devspace
Devspace uses the filesystem to store some stuff and has one directory. This directory contains the following:
config.ron
: the configuration of devspace, the Trees and the default Treedb.ron
: the Space with their working directory and their Tree.
The directory is evaluated based on the following priorities:
- the
--dir <path>
argument. - the
DEVSPACE_DIR
global variable. - and fallbacks to the default
$HOME/.devspace/
.
Space: its a directory and more data, stored in the database, usualy the directory of a project and its tree.
Tree: the programs and its hierarchy that are run when launching a Space.
It's a Tree composed of things like TmuxVSplit(..)
, TmuxHSplit(..)
,
Cmd(..)
, etc.. see more below.
To create a new Space for the current directory,
$ devspace init
Or to create a new Space for a specific directory
$ devspace init /path/to/my/veryspecific/directory
You can print the list of spaces stored,
$ devspace list-spaces
To remove a Space, use the remove
subcommand with the Space name,
$ devspace remove SPACE_NAME_HERE
And the most useful command from all of them, go
!
$ devspace go SPACE_NAME_HERE
it will launch your Space with its configured Tree.
.. or just type
$ devspace --help
to get some help and discover sub commands, arguments flags etc..
Warning
PLEASE NOTE THAT THIS PROJECT IS WORK IN PROGRESS BUT THIS PART IS EVEN MORE IN PROGRESS, EXPECT BUGS AND NON-LOGIC BUG / BEHAVIOR OF THIS PROGRAM.
This Tree will run the specified command in the shell. The command has
placeholders, in the Command String you can put { .. }
and between the
brackets you can put variable names that will be replaced when launched.
Support variable names in placeholders:
Space.wdir
: replaced with the Space's working directory path when launched
That's it actually lmao
Cmd(COMMAND_STRING)
This tree will make a Vertical split in the Tmux session, with one the left (lhs) its own tree, and same on the right (rhs).
TmuxVSplit(
rhs: ANOTHER_TREE, // optional
lhs: ANOTHER_TREE, // optional
)
This tree will make an Horizontal split in the Tmux session, with one the left (lhs) its own tree, and same on the right (rhs).
TmuxVSplit(
rhs: ANOTHER_TREE, // optional
lhs: ANOTHER_TREE, // optional
)
Here is a (working lmao) example of a tree,
TmuxVSplit(
lhs: Cmd("clear && hx "),
rhs: TmuxHSplit(),
)
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Feel free to contribute. For the moment there is no documentation but it will come.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.