Skip to content

A WIP tool for exporting installed crates, and installing them.

License

Notifications You must be signed in to change notification settings

Phate6660/crate-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crate-manager

To get started, first copy .cm_rules* to your $HOME.
Then export your crates with crate-manager export (there will be no output).
The list of crates will be exported to: $HOME/exported_crates.txt.
Each line consists of at least name=version, and if the crate has any
external deps, they will be listed in the format of name=version=dep,dep.

* This file contains a list of lines formatted as name=dep,dep.
It is used for specifying the external dependencies of crates.

To list the crates you've exported, use crate-manager list:

$ crate-manager list
bat [0.19.0]
bottom [0.6.6]
cargo-edit [0.8.0]
cargo-msrv [0.13.0]
cargo-update [8.1.2]
cavif [1.3.3], which also depends on:
- nasm
deno [1.17.3]
exa [0.10.1]
fd-find [8.3.1]
flamegraph [0.5.1]
git-cliff [0.5.0]
git-delta [0.11.3]
hyperfine [1.12.0]
pastel [0.8.1]
pijul [1.0.0-beta], which also depends on:
- libsodium
- libzstd
- openssl
- pkg-config
- xxhash
ripgrep [13.0.0]
vivid [0.7.0]
xcp [0.9.0]

To install each crate, use crate-manager install.

Usage

  • crate-manager export: Export installed crates to $HOME/exported_crates.txt
  • crate-manager install: Install crates from the above file
  • crate-manager install --exclude crate,crate2: Exclude certain crates from being installed
  • crate-manager install true: Install specific versions of crates*
  • crate-manager list: Lists the packages tracked in $HOME/exported_crates.txt

* NOTE: If using both exclude and installing specific versions, you must pass the exclusions first.
I currently hand-parse the given command line arguments and it relies on certain positioning.

TODO

  • Allow user to install missing external deps
  • Better command line argument parsingm, I will either:
    • Write a library from scratch to handle this
    • Decide on a good crate besides clap or structopt to handle the parsing
      • (Nothing against them, they're just... really bloated. Especially for the basic parsing that I want.)

About

A WIP tool for exporting installed crates, and installing them.

Topics

Resources

License

Stars

Watchers

Forks

Languages