Skip to content

Commit

Permalink
Modify readme slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
saheljalal committed Sep 2, 2019
1 parent 219a096 commit cf62f54
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
# nostromo
<img src="images/nostromo-manifest-show.png" alt="nostromo">

`nostromo` is a CLI to manage aliases through simple commands to add and remove scoped aliases and substitutions.
nostromo is a CLI to manage aliases through simple commands to add and remove scoped aliases and substitutions.

Managing aliases can be tedius and difficult to set up. `nostromo` makes this process easy and reliable. The tool adds shortcuts to your `.bashrc` that call into the `nostromo` binary. It reads and manages all aliases within its own manifest. This is used to find and execute the actual command as well as swap any substitutions to simplify calls.
Managing aliases can be tedius and difficult to set up. nostromo makes this process easy and reliable. The tool adds shortcuts to your `.bashrc` that call into the nostromo binary. It reads and manages all aliases within its own manifest. This is used to find and execute the actual command as well as swap any substitutions to simplify calls.

`nostromo` can potentially help you build complex tools in a declarative way. Tools commonly allow you to run multi-level commands like `git rebase master branch` or `docker rmi b750fe78269d` which seem clear to use. Imagine if you could wrap your aliases / commands / workflow into custom commands that describe things you do often.
nostromo can potentially help you build complex tools in a declarative way. Tools commonly allow you to run multi-level commands like `git rebase master branch` or `docker rmi b750fe78269d` which seem clear to use. Imagine if you could wrap your aliases / commands / workflow into custom commands that describe things you do often.

With `nostromo` you can take aliases like these:
With nostromo you can take aliases like these:
```sh
alias ios-build='pushd $IOS_REPO_PATH;xcodebuild -workspace Foo.xcworkspace -scheme foo_scheme'
alias ios-test='pushd $IOS_REPO_PATH;xcodebuild -workspace Foo.xcworkspace -scheme foo_test_scheme'
Expand All @@ -22,7 +22,7 @@ and turn them into declarative commands like this:
```sh
build ios
build android
test ios --with-some-flag
test ios
test android
```
The possibilities are endless and up to your imagination with the ability to compose commands as you see fit.
Expand Down Expand Up @@ -54,16 +54,16 @@ nostromo manifest init
## Usage

### Managing Aliases
Aliases is one of the core functionalities provided by `nostromo`. Instead of constantly updating shell profiles manually, `nostromo` will automatically keep it updated with the latest additions. **Note** that commands won't take affect until you open a new shell or `source` your `.bashrc` again.
Aliases is one of the core functionalities provided by nostromo. Instead of constantly updating shell profiles manually, nostromo will automatically keep it updated with the latest additions. **Note** that commands won't take affect until you open a new shell or `source` your `.bashrc` again.

To add an alias (or command in `nostromo` parlance), simply run:
To add an alias (or command in nostromo parlance), simply run:
```sh
nostromo add cmd foo "echo doo"
```
Re-source your `.bashrc` and just like that you can run `foo` like any other alias.

#### Keypaths
`nostromo` uses the concept of keypaths to simplify building commands and accessing the command tree. A keypath is simply a `.` delimited string that represents the path to the command.
nostromo uses the concept of keypaths to simplify building commands and accessing the command tree. A keypath is simply a `.` delimited string that represents the path to the command.

For example:
```sh
Expand All @@ -84,18 +84,18 @@ Scope affects a tree of commands such that a parent scope is executed first and
```sh
foo bar baz
```
and the command associated with `foo` runs first, then `bar`, and finally `baz`. So if these commands were configured like this:
then the command associated with `foo` runs first, then `bar`, and finally `baz`. So if these commands were configured like this:
```sh
nostromo add cmd foo 'echo oof'
nostromo add cmd foo.bar 'rab'
nostromo add cmd foo.bar.baz 'zab'
```
then the actual execution would yield:
then the actual execution would result in:
```sh
oof rab zab
```

`nostromo` also provides the ability to add substitutions at each one of these scopes in the command tree. So if want to shorten common strings that are otherwise long into substitutions you can attach them to a parent scope and `nostromo` will replace them at execution time for all instances.
nostromo also provides the ability to add substitutions at each one of these scopes in the command tree. So if want to shorten common strings that are otherwise long into substitutions you can attach them to a parent scope and nostromo will replace them at execution time for all instances.

A substitution can be added with:
```sh
Expand All @@ -119,7 +119,7 @@ nostromo manifest show
```

### Bash Completion
`nostromo` provides bash completion scripts to allow tab completion. You can get this by adding this to your shell init file:
nostromo provides bash completion scripts to allow tab completion. You can get this by adding this to your shell init file:
```sh
eval "$(nostromo completion)"
```
Expand Down

0 comments on commit cf62f54

Please sign in to comment.